Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.1% → 78.5%
Time: 15.8s
Alternatives: 19
Speedup: 1.2×

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)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    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 19 alternatives:

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

Initial Program: 66.1% 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)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Alternative 1: 78.5% accurate, 0.2× speedup?

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

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

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{h}{\ell} \cdot \left(t\_5 \cdot -0.5\right), t\_5, 1\right) \cdot t\_4\\


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

    1. Initial program 89.8%

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{h}{\ell} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)}\right) \]
      9. *-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 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\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 \left(1 - \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right)}\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 \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right)}\right) \]
    4. Applied rewrites91.9%

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

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

        \[\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 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(0.5 \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\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 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\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 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
      5. lower-sqrt.f6491.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\sqrt{d \cdot d}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
      19. sqr-neg-revN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \color{blue}{\sqrt{d \cdot d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
      27. sqr-neg-revN/A

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

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

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

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

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

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

    if 5.00000000000000016e-229 < (*.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.9999999999999996e290

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e290 < (*.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 21.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 71.0% accurate, 0.1× speedup?

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

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

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

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

\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;1 \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\frac{h}{\ell \cdot d} \cdot \frac{D \cdot D}{d}\right) \cdot M\right) \cdot \left(-0.125 \cdot M\right)\right) \cdot t\_1\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 52.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.00000000000000016e-229 < (*.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.9999999999999996e290

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 47.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h}{d \cdot d}\right)\right)} \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
            9. Step-by-step derivation
              1. Applied rewrites29.4%

                \[\leadsto \left(\left(\left(\frac{h}{\ell \cdot d} \cdot \frac{D \cdot D}{d}\right) \cdot M\right) \cdot \color{blue}{\left(-0.125 \cdot M\right)}\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
            10. Recombined 5 regimes into one program.
            11. Final simplification74.1%

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

            Alternative 3: 72.4% accurate, 0.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ t_2 := 1 \cdot t\_1\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\ \;\;\;\;\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D}{d} \cdot \frac{\frac{D}{\ell} \cdot h}{d}\right)\right) \cdot t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\frac{h}{\ell \cdot d} \cdot \frac{D \cdot D}{d}\right) \cdot M\right) \cdot \left(-0.125 \cdot M\right)\right) \cdot t\_1\\ \end{array} \end{array} \]
            (FPCore (d h l M D)
             :precision binary64
             (let* ((t_0
                     (*
                      (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                      (-
                       1.0
                       (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                    (t_1 (/ (fabs d) (sqrt (* l h))))
                    (t_2 (* 1.0 t_1)))
               (if (<= t_0 -5e-111)
                 (* (* (* (* M M) -0.125) (* (/ D d) (/ (* (/ D l) h) d))) t_1)
                 (if (<= t_0 5e-229)
                   t_2
                   (if (<= t_0 1e+291)
                     (* (sqrt (/ d l)) (sqrt (/ d h)))
                     (if (<= t_0 INFINITY)
                       t_2
                       (* (* (* (* (/ h (* l d)) (/ (* D D) d)) M) (* -0.125 M)) t_1)))))))
            double code(double d, double h, double l, double M, double D) {
            	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
            	double t_1 = fabs(d) / sqrt((l * h));
            	double t_2 = 1.0 * t_1;
            	double tmp;
            	if (t_0 <= -5e-111) {
            		tmp = (((M * M) * -0.125) * ((D / d) * (((D / l) * h) / d))) * t_1;
            	} else if (t_0 <= 5e-229) {
            		tmp = t_2;
            	} else if (t_0 <= 1e+291) {
            		tmp = sqrt((d / l)) * sqrt((d / h));
            	} else if (t_0 <= ((double) INFINITY)) {
            		tmp = t_2;
            	} else {
            		tmp = ((((h / (l * d)) * ((D * D) / d)) * M) * (-0.125 * M)) * t_1;
            	}
            	return tmp;
            }
            
            public static double code(double d, double h, double l, double M, double D) {
            	double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
            	double t_1 = Math.abs(d) / Math.sqrt((l * h));
            	double t_2 = 1.0 * t_1;
            	double tmp;
            	if (t_0 <= -5e-111) {
            		tmp = (((M * M) * -0.125) * ((D / d) * (((D / l) * h) / d))) * t_1;
            	} else if (t_0 <= 5e-229) {
            		tmp = t_2;
            	} else if (t_0 <= 1e+291) {
            		tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
            	} else if (t_0 <= Double.POSITIVE_INFINITY) {
            		tmp = t_2;
            	} else {
            		tmp = ((((h / (l * d)) * ((D * D) / d)) * M) * (-0.125 * M)) * t_1;
            	}
            	return tmp;
            }
            
            def code(d, h, l, M, D):
            	t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
            	t_1 = math.fabs(d) / math.sqrt((l * h))
            	t_2 = 1.0 * t_1
            	tmp = 0
            	if t_0 <= -5e-111:
            		tmp = (((M * M) * -0.125) * ((D / d) * (((D / l) * h) / d))) * t_1
            	elif t_0 <= 5e-229:
            		tmp = t_2
            	elif t_0 <= 1e+291:
            		tmp = math.sqrt((d / l)) * math.sqrt((d / h))
            	elif t_0 <= math.inf:
            		tmp = t_2
            	else:
            		tmp = ((((h / (l * d)) * ((D * D) / d)) * M) * (-0.125 * M)) * t_1
            	return tmp
            
            function code(d, h, l, M, D)
            	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
            	t_1 = Float64(abs(d) / sqrt(Float64(l * h)))
            	t_2 = Float64(1.0 * t_1)
            	tmp = 0.0
            	if (t_0 <= -5e-111)
            		tmp = Float64(Float64(Float64(Float64(M * M) * -0.125) * Float64(Float64(D / d) * Float64(Float64(Float64(D / l) * h) / d))) * t_1);
            	elseif (t_0 <= 5e-229)
            		tmp = t_2;
            	elseif (t_0 <= 1e+291)
            		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
            	elseif (t_0 <= Inf)
            		tmp = t_2;
            	else
            		tmp = Float64(Float64(Float64(Float64(Float64(h / Float64(l * d)) * Float64(Float64(D * D) / d)) * M) * Float64(-0.125 * M)) * t_1);
            	end
            	return tmp
            end
            
            function tmp_2 = code(d, h, l, M, D)
            	t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
            	t_1 = abs(d) / sqrt((l * h));
            	t_2 = 1.0 * t_1;
            	tmp = 0.0;
            	if (t_0 <= -5e-111)
            		tmp = (((M * M) * -0.125) * ((D / d) * (((D / l) * h) / d))) * t_1;
            	elseif (t_0 <= 5e-229)
            		tmp = t_2;
            	elseif (t_0 <= 1e+291)
            		tmp = sqrt((d / l)) * sqrt((d / h));
            	elseif (t_0 <= Inf)
            		tmp = t_2;
            	else
            		tmp = ((((h / (l * d)) * ((D * D) / d)) * M) * (-0.125 * M)) * t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-111], N[(N[(N[(N[(M * M), $MachinePrecision] * -0.125), $MachinePrecision] * N[(N[(D / d), $MachinePrecision] * N[(N[(N[(D / l), $MachinePrecision] * h), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t$95$0, 5e-229], t$95$2, If[LessEqual[t$95$0, 1e+291], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], t$95$2, N[(N[(N[(N[(N[(h / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * M), $MachinePrecision] * N[(-0.125 * M), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
            t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
            t_2 := 1 \cdot t\_1\\
            \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\
            \;\;\;\;\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D}{d} \cdot \frac{\frac{D}{\ell} \cdot h}{d}\right)\right) \cdot t\_1\\
            
            \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\
            \;\;\;\;t\_2\\
            
            \mathbf{elif}\;t\_0 \leq 10^{+291}:\\
            \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
            
            \mathbf{elif}\;t\_0 \leq \infty:\\
            \;\;\;\;t\_2\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(\left(\frac{h}{\ell \cdot d} \cdot \frac{D \cdot D}{d}\right) \cdot M\right) \cdot \left(-0.125 \cdot M\right)\right) \cdot t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -5.0000000000000003e-111

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -5.0000000000000003e-111 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 5.00000000000000016e-229 or 9.9999999999999996e290 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 5.00000000000000016e-229 < (*.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.9999999999999996e290

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h}{d \cdot d}\right)\right)} \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                      9. Step-by-step derivation
                        1. Applied rewrites29.4%

                          \[\leadsto \left(\left(\left(\frac{h}{\ell \cdot d} \cdot \frac{D \cdot D}{d}\right) \cdot M\right) \cdot \color{blue}{\left(-0.125 \cdot M\right)}\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                      10. Recombined 4 regimes into one program.
                      11. Final simplification75.7%

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

                      Alternative 4: 71.6% accurate, 0.1× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ t_2 := 1 \cdot t\_1\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\ \;\;\;\;\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D}{\ell \cdot d} \cdot \frac{D \cdot h}{d}\right)\right) \cdot t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\frac{h}{\ell \cdot d} \cdot \frac{D \cdot D}{d}\right) \cdot M\right) \cdot \left(-0.125 \cdot M\right)\right) \cdot t\_1\\ \end{array} \end{array} \]
                      (FPCore (d h l M D)
                       :precision binary64
                       (let* ((t_0
                               (*
                                (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                (-
                                 1.0
                                 (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                              (t_1 (/ (fabs d) (sqrt (* l h))))
                              (t_2 (* 1.0 t_1)))
                         (if (<= t_0 -5e-111)
                           (* (* (* (* M M) -0.125) (* (/ D (* l d)) (/ (* D h) d))) t_1)
                           (if (<= t_0 5e-229)
                             t_2
                             (if (<= t_0 1e+291)
                               (* (sqrt (/ d l)) (sqrt (/ d h)))
                               (if (<= t_0 INFINITY)
                                 t_2
                                 (* (* (* (* (/ h (* l d)) (/ (* D D) d)) M) (* -0.125 M)) t_1)))))))
                      double code(double d, double h, double l, double M, double D) {
                      	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                      	double t_1 = fabs(d) / sqrt((l * h));
                      	double t_2 = 1.0 * t_1;
                      	double tmp;
                      	if (t_0 <= -5e-111) {
                      		tmp = (((M * M) * -0.125) * ((D / (l * d)) * ((D * h) / d))) * t_1;
                      	} else if (t_0 <= 5e-229) {
                      		tmp = t_2;
                      	} else if (t_0 <= 1e+291) {
                      		tmp = sqrt((d / l)) * sqrt((d / h));
                      	} else if (t_0 <= ((double) INFINITY)) {
                      		tmp = t_2;
                      	} else {
                      		tmp = ((((h / (l * d)) * ((D * D) / d)) * M) * (-0.125 * M)) * t_1;
                      	}
                      	return tmp;
                      }
                      
                      public static double code(double d, double h, double l, double M, double D) {
                      	double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                      	double t_1 = Math.abs(d) / Math.sqrt((l * h));
                      	double t_2 = 1.0 * t_1;
                      	double tmp;
                      	if (t_0 <= -5e-111) {
                      		tmp = (((M * M) * -0.125) * ((D / (l * d)) * ((D * h) / d))) * t_1;
                      	} else if (t_0 <= 5e-229) {
                      		tmp = t_2;
                      	} else if (t_0 <= 1e+291) {
                      		tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
                      	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                      		tmp = t_2;
                      	} else {
                      		tmp = ((((h / (l * d)) * ((D * D) / d)) * M) * (-0.125 * M)) * t_1;
                      	}
                      	return tmp;
                      }
                      
                      def code(d, h, l, M, D):
                      	t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
                      	t_1 = math.fabs(d) / math.sqrt((l * h))
                      	t_2 = 1.0 * t_1
                      	tmp = 0
                      	if t_0 <= -5e-111:
                      		tmp = (((M * M) * -0.125) * ((D / (l * d)) * ((D * h) / d))) * t_1
                      	elif t_0 <= 5e-229:
                      		tmp = t_2
                      	elif t_0 <= 1e+291:
                      		tmp = math.sqrt((d / l)) * math.sqrt((d / h))
                      	elif t_0 <= math.inf:
                      		tmp = t_2
                      	else:
                      		tmp = ((((h / (l * d)) * ((D * D) / d)) * M) * (-0.125 * M)) * t_1
                      	return tmp
                      
                      function code(d, h, l, M, D)
                      	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                      	t_1 = Float64(abs(d) / sqrt(Float64(l * h)))
                      	t_2 = Float64(1.0 * t_1)
                      	tmp = 0.0
                      	if (t_0 <= -5e-111)
                      		tmp = Float64(Float64(Float64(Float64(M * M) * -0.125) * Float64(Float64(D / Float64(l * d)) * Float64(Float64(D * h) / d))) * t_1);
                      	elseif (t_0 <= 5e-229)
                      		tmp = t_2;
                      	elseif (t_0 <= 1e+291)
                      		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                      	elseif (t_0 <= Inf)
                      		tmp = t_2;
                      	else
                      		tmp = Float64(Float64(Float64(Float64(Float64(h / Float64(l * d)) * Float64(Float64(D * D) / d)) * M) * Float64(-0.125 * M)) * t_1);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(d, h, l, M, D)
                      	t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
                      	t_1 = abs(d) / sqrt((l * h));
                      	t_2 = 1.0 * t_1;
                      	tmp = 0.0;
                      	if (t_0 <= -5e-111)
                      		tmp = (((M * M) * -0.125) * ((D / (l * d)) * ((D * h) / d))) * t_1;
                      	elseif (t_0 <= 5e-229)
                      		tmp = t_2;
                      	elseif (t_0 <= 1e+291)
                      		tmp = sqrt((d / l)) * sqrt((d / h));
                      	elseif (t_0 <= Inf)
                      		tmp = t_2;
                      	else
                      		tmp = ((((h / (l * d)) * ((D * D) / d)) * M) * (-0.125 * M)) * t_1;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-111], N[(N[(N[(N[(M * M), $MachinePrecision] * -0.125), $MachinePrecision] * N[(N[(D / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(N[(D * h), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t$95$0, 5e-229], t$95$2, If[LessEqual[t$95$0, 1e+291], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], t$95$2, N[(N[(N[(N[(N[(h / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * M), $MachinePrecision] * N[(-0.125 * M), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                      t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                      t_2 := 1 \cdot t\_1\\
                      \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\
                      \;\;\;\;\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D}{\ell \cdot d} \cdot \frac{D \cdot h}{d}\right)\right) \cdot t\_1\\
                      
                      \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\
                      \;\;\;\;t\_2\\
                      
                      \mathbf{elif}\;t\_0 \leq 10^{+291}:\\
                      \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
                      
                      \mathbf{elif}\;t\_0 \leq \infty:\\
                      \;\;\;\;t\_2\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(\left(\left(\frac{h}{\ell \cdot d} \cdot \frac{D \cdot D}{d}\right) \cdot M\right) \cdot \left(-0.125 \cdot M\right)\right) \cdot t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 4 regimes
                      2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -5.0000000000000003e-111

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h}{d \cdot d}\right)\right)} \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                        9. Step-by-step derivation
                          1. Applied rewrites73.5%

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

                          if -5.0000000000000003e-111 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 5.00000000000000016e-229 or 9.9999999999999996e290 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                          1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 5.00000000000000016e-229 < (*.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.9999999999999996e290

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

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

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

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

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

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

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

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

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

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

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

                                1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h}{d \cdot d}\right)\right)} \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                9. Step-by-step derivation
                                  1. Applied rewrites29.4%

                                    \[\leadsto \left(\left(\left(\frac{h}{\ell \cdot d} \cdot \frac{D \cdot D}{d}\right) \cdot M\right) \cdot \color{blue}{\left(-0.125 \cdot M\right)}\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                10. Recombined 4 regimes into one program.
                                11. Final simplification74.9%

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

                                Alternative 5: 72.4% accurate, 0.1× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ t_2 := 1 \cdot t\_1\\ t_3 := \left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D}{\ell \cdot d} \cdot \frac{D \cdot h}{d}\right)\right) \cdot t\_1\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
                                (FPCore (d h l M D)
                                 :precision binary64
                                 (let* ((t_0
                                         (*
                                          (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                          (-
                                           1.0
                                           (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                                        (t_1 (/ (fabs d) (sqrt (* l h))))
                                        (t_2 (* 1.0 t_1))
                                        (t_3 (* (* (* (* M M) -0.125) (* (/ D (* l d)) (/ (* D h) d))) t_1)))
                                   (if (<= t_0 -5e-111)
                                     t_3
                                     (if (<= t_0 5e-229)
                                       t_2
                                       (if (<= t_0 1e+291)
                                         (* (sqrt (/ d l)) (sqrt (/ d h)))
                                         (if (<= t_0 INFINITY) t_2 t_3))))))
                                double code(double d, double h, double l, double M, double D) {
                                	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                	double t_1 = fabs(d) / sqrt((l * h));
                                	double t_2 = 1.0 * t_1;
                                	double t_3 = (((M * M) * -0.125) * ((D / (l * d)) * ((D * h) / d))) * t_1;
                                	double tmp;
                                	if (t_0 <= -5e-111) {
                                		tmp = t_3;
                                	} else if (t_0 <= 5e-229) {
                                		tmp = t_2;
                                	} else if (t_0 <= 1e+291) {
                                		tmp = sqrt((d / l)) * sqrt((d / h));
                                	} else if (t_0 <= ((double) INFINITY)) {
                                		tmp = t_2;
                                	} else {
                                		tmp = t_3;
                                	}
                                	return tmp;
                                }
                                
                                public static double code(double d, double h, double l, double M, double D) {
                                	double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                	double t_1 = Math.abs(d) / Math.sqrt((l * h));
                                	double t_2 = 1.0 * t_1;
                                	double t_3 = (((M * M) * -0.125) * ((D / (l * d)) * ((D * h) / d))) * t_1;
                                	double tmp;
                                	if (t_0 <= -5e-111) {
                                		tmp = t_3;
                                	} else if (t_0 <= 5e-229) {
                                		tmp = t_2;
                                	} else if (t_0 <= 1e+291) {
                                		tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
                                	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                                		tmp = t_2;
                                	} else {
                                		tmp = t_3;
                                	}
                                	return tmp;
                                }
                                
                                def code(d, h, l, M, D):
                                	t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
                                	t_1 = math.fabs(d) / math.sqrt((l * h))
                                	t_2 = 1.0 * t_1
                                	t_3 = (((M * M) * -0.125) * ((D / (l * d)) * ((D * h) / d))) * t_1
                                	tmp = 0
                                	if t_0 <= -5e-111:
                                		tmp = t_3
                                	elif t_0 <= 5e-229:
                                		tmp = t_2
                                	elif t_0 <= 1e+291:
                                		tmp = math.sqrt((d / l)) * math.sqrt((d / h))
                                	elif t_0 <= math.inf:
                                		tmp = t_2
                                	else:
                                		tmp = t_3
                                	return tmp
                                
                                function code(d, h, l, M, D)
                                	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                	t_1 = Float64(abs(d) / sqrt(Float64(l * h)))
                                	t_2 = Float64(1.0 * t_1)
                                	t_3 = Float64(Float64(Float64(Float64(M * M) * -0.125) * Float64(Float64(D / Float64(l * d)) * Float64(Float64(D * h) / d))) * t_1)
                                	tmp = 0.0
                                	if (t_0 <= -5e-111)
                                		tmp = t_3;
                                	elseif (t_0 <= 5e-229)
                                		tmp = t_2;
                                	elseif (t_0 <= 1e+291)
                                		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                                	elseif (t_0 <= Inf)
                                		tmp = t_2;
                                	else
                                		tmp = t_3;
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(d, h, l, M, D)
                                	t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                	t_1 = abs(d) / sqrt((l * h));
                                	t_2 = 1.0 * t_1;
                                	t_3 = (((M * M) * -0.125) * ((D / (l * d)) * ((D * h) / d))) * t_1;
                                	tmp = 0.0;
                                	if (t_0 <= -5e-111)
                                		tmp = t_3;
                                	elseif (t_0 <= 5e-229)
                                		tmp = t_2;
                                	elseif (t_0 <= 1e+291)
                                		tmp = sqrt((d / l)) * sqrt((d / h));
                                	elseif (t_0 <= Inf)
                                		tmp = t_2;
                                	else
                                		tmp = t_3;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(M * M), $MachinePrecision] * -0.125), $MachinePrecision] * N[(N[(D / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(N[(D * h), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-111], t$95$3, If[LessEqual[t$95$0, 5e-229], t$95$2, If[LessEqual[t$95$0, 1e+291], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], t$95$2, t$95$3]]]]]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                t_2 := 1 \cdot t\_1\\
                                t_3 := \left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\frac{D}{\ell \cdot d} \cdot \frac{D \cdot h}{d}\right)\right) \cdot t\_1\\
                                \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\
                                \;\;\;\;t\_3\\
                                
                                \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\
                                \;\;\;\;t\_2\\
                                
                                \mathbf{elif}\;t\_0 \leq 10^{+291}:\\
                                \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
                                
                                \mathbf{elif}\;t\_0 \leq \infty:\\
                                \;\;\;\;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)))) < -5.0000000000000003e-111 or +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                  1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -5.0000000000000003e-111 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 5.00000000000000016e-229 or 9.9999999999999996e290 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                    1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 5.00000000000000016e-229 < (*.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.9999999999999996e290

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 6: 67.6% accurate, 0.1× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ t_2 := 1 \cdot t\_1\\ t_3 := \frac{\left(\left(D \cdot D\right) \cdot h\right) \cdot \left(\left(-0.125 \cdot M\right) \cdot M\right)}{\left(\ell \cdot d\right) \cdot d} \cdot t\_1\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
                                        (FPCore (d h l M D)
                                         :precision binary64
                                         (let* ((t_0
                                                 (*
                                                  (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                  (-
                                                   1.0
                                                   (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                                                (t_1 (/ (fabs d) (sqrt (* l h))))
                                                (t_2 (* 1.0 t_1))
                                                (t_3 (* (/ (* (* (* D D) h) (* (* -0.125 M) M)) (* (* l d) d)) t_1)))
                                           (if (<= t_0 -5e-111)
                                             t_3
                                             (if (<= t_0 5e-229)
                                               t_2
                                               (if (<= t_0 1e+291)
                                                 (* (sqrt (/ d l)) (sqrt (/ d h)))
                                                 (if (<= t_0 INFINITY) t_2 t_3))))))
                                        double code(double d, double h, double l, double M, double D) {
                                        	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                        	double t_1 = fabs(d) / sqrt((l * h));
                                        	double t_2 = 1.0 * t_1;
                                        	double t_3 = ((((D * D) * h) * ((-0.125 * M) * M)) / ((l * d) * d)) * t_1;
                                        	double tmp;
                                        	if (t_0 <= -5e-111) {
                                        		tmp = t_3;
                                        	} else if (t_0 <= 5e-229) {
                                        		tmp = t_2;
                                        	} else if (t_0 <= 1e+291) {
                                        		tmp = sqrt((d / l)) * sqrt((d / h));
                                        	} else if (t_0 <= ((double) INFINITY)) {
                                        		tmp = t_2;
                                        	} else {
                                        		tmp = t_3;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        public static double code(double d, double h, double l, double M, double D) {
                                        	double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                        	double t_1 = Math.abs(d) / Math.sqrt((l * h));
                                        	double t_2 = 1.0 * t_1;
                                        	double t_3 = ((((D * D) * h) * ((-0.125 * M) * M)) / ((l * d) * d)) * t_1;
                                        	double tmp;
                                        	if (t_0 <= -5e-111) {
                                        		tmp = t_3;
                                        	} else if (t_0 <= 5e-229) {
                                        		tmp = t_2;
                                        	} else if (t_0 <= 1e+291) {
                                        		tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
                                        	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                                        		tmp = t_2;
                                        	} else {
                                        		tmp = t_3;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(d, h, l, M, D):
                                        	t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
                                        	t_1 = math.fabs(d) / math.sqrt((l * h))
                                        	t_2 = 1.0 * t_1
                                        	t_3 = ((((D * D) * h) * ((-0.125 * M) * M)) / ((l * d) * d)) * t_1
                                        	tmp = 0
                                        	if t_0 <= -5e-111:
                                        		tmp = t_3
                                        	elif t_0 <= 5e-229:
                                        		tmp = t_2
                                        	elif t_0 <= 1e+291:
                                        		tmp = math.sqrt((d / l)) * math.sqrt((d / h))
                                        	elif t_0 <= math.inf:
                                        		tmp = t_2
                                        	else:
                                        		tmp = t_3
                                        	return tmp
                                        
                                        function code(d, h, l, M, D)
                                        	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                        	t_1 = Float64(abs(d) / sqrt(Float64(l * h)))
                                        	t_2 = Float64(1.0 * t_1)
                                        	t_3 = Float64(Float64(Float64(Float64(Float64(D * D) * h) * Float64(Float64(-0.125 * M) * M)) / Float64(Float64(l * d) * d)) * t_1)
                                        	tmp = 0.0
                                        	if (t_0 <= -5e-111)
                                        		tmp = t_3;
                                        	elseif (t_0 <= 5e-229)
                                        		tmp = t_2;
                                        	elseif (t_0 <= 1e+291)
                                        		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                                        	elseif (t_0 <= Inf)
                                        		tmp = t_2;
                                        	else
                                        		tmp = t_3;
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(d, h, l, M, D)
                                        	t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                        	t_1 = abs(d) / sqrt((l * h));
                                        	t_2 = 1.0 * t_1;
                                        	t_3 = ((((D * D) * h) * ((-0.125 * M) * M)) / ((l * d) * d)) * t_1;
                                        	tmp = 0.0;
                                        	if (t_0 <= -5e-111)
                                        		tmp = t_3;
                                        	elseif (t_0 <= 5e-229)
                                        		tmp = t_2;
                                        	elseif (t_0 <= 1e+291)
                                        		tmp = sqrt((d / l)) * sqrt((d / h));
                                        	elseif (t_0 <= Inf)
                                        		tmp = t_2;
                                        	else
                                        		tmp = t_3;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(D * D), $MachinePrecision] * h), $MachinePrecision] * N[(N[(-0.125 * M), $MachinePrecision] * M), $MachinePrecision]), $MachinePrecision] / N[(N[(l * d), $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-111], t$95$3, If[LessEqual[t$95$0, 5e-229], t$95$2, If[LessEqual[t$95$0, 1e+291], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], t$95$2, t$95$3]]]]]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                        t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                        t_2 := 1 \cdot t\_1\\
                                        t_3 := \frac{\left(\left(D \cdot D\right) \cdot h\right) \cdot \left(\left(-0.125 \cdot M\right) \cdot M\right)}{\left(\ell \cdot d\right) \cdot d} \cdot t\_1\\
                                        \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\
                                        \;\;\;\;t\_3\\
                                        
                                        \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\
                                        \;\;\;\;t\_2\\
                                        
                                        \mathbf{elif}\;t\_0 \leq 10^{+291}:\\
                                        \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
                                        
                                        \mathbf{elif}\;t\_0 \leq \infty:\\
                                        \;\;\;\;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)))) < -5.0000000000000003e-111 or +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                          1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if -5.0000000000000003e-111 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 5.00000000000000016e-229 or 9.9999999999999996e290 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                            1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 5.00000000000000016e-229 < (*.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.9999999999999996e290

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 7: 67.0% accurate, 0.1× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ t_2 := 1 \cdot t\_1\\ t_3 := \left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\left(D \cdot D\right) \cdot \frac{h}{\left(\ell \cdot d\right) \cdot d}\right)\right) \cdot t\_1\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
                                                (FPCore (d h l M D)
                                                 :precision binary64
                                                 (let* ((t_0
                                                         (*
                                                          (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                          (-
                                                           1.0
                                                           (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                                                        (t_1 (/ (fabs d) (sqrt (* l h))))
                                                        (t_2 (* 1.0 t_1))
                                                        (t_3 (* (* (* (* M M) -0.125) (* (* D D) (/ h (* (* l d) d)))) t_1)))
                                                   (if (<= t_0 -5e-111)
                                                     t_3
                                                     (if (<= t_0 5e-229)
                                                       t_2
                                                       (if (<= t_0 1e+291)
                                                         (* (sqrt (/ d l)) (sqrt (/ d h)))
                                                         (if (<= t_0 INFINITY) t_2 t_3))))))
                                                double code(double d, double h, double l, double M, double D) {
                                                	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                	double t_1 = fabs(d) / sqrt((l * h));
                                                	double t_2 = 1.0 * t_1;
                                                	double t_3 = (((M * M) * -0.125) * ((D * D) * (h / ((l * d) * d)))) * t_1;
                                                	double tmp;
                                                	if (t_0 <= -5e-111) {
                                                		tmp = t_3;
                                                	} else if (t_0 <= 5e-229) {
                                                		tmp = t_2;
                                                	} else if (t_0 <= 1e+291) {
                                                		tmp = sqrt((d / l)) * sqrt((d / h));
                                                	} else if (t_0 <= ((double) INFINITY)) {
                                                		tmp = t_2;
                                                	} else {
                                                		tmp = t_3;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                public static double code(double d, double h, double l, double M, double D) {
                                                	double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                	double t_1 = Math.abs(d) / Math.sqrt((l * h));
                                                	double t_2 = 1.0 * t_1;
                                                	double t_3 = (((M * M) * -0.125) * ((D * D) * (h / ((l * d) * d)))) * t_1;
                                                	double tmp;
                                                	if (t_0 <= -5e-111) {
                                                		tmp = t_3;
                                                	} else if (t_0 <= 5e-229) {
                                                		tmp = t_2;
                                                	} else if (t_0 <= 1e+291) {
                                                		tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
                                                	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                                                		tmp = t_2;
                                                	} else {
                                                		tmp = t_3;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(d, h, l, M, D):
                                                	t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
                                                	t_1 = math.fabs(d) / math.sqrt((l * h))
                                                	t_2 = 1.0 * t_1
                                                	t_3 = (((M * M) * -0.125) * ((D * D) * (h / ((l * d) * d)))) * t_1
                                                	tmp = 0
                                                	if t_0 <= -5e-111:
                                                		tmp = t_3
                                                	elif t_0 <= 5e-229:
                                                		tmp = t_2
                                                	elif t_0 <= 1e+291:
                                                		tmp = math.sqrt((d / l)) * math.sqrt((d / h))
                                                	elif t_0 <= math.inf:
                                                		tmp = t_2
                                                	else:
                                                		tmp = t_3
                                                	return tmp
                                                
                                                function code(d, h, l, M, D)
                                                	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                	t_1 = Float64(abs(d) / sqrt(Float64(l * h)))
                                                	t_2 = Float64(1.0 * t_1)
                                                	t_3 = Float64(Float64(Float64(Float64(M * M) * -0.125) * Float64(Float64(D * D) * Float64(h / Float64(Float64(l * d) * d)))) * t_1)
                                                	tmp = 0.0
                                                	if (t_0 <= -5e-111)
                                                		tmp = t_3;
                                                	elseif (t_0 <= 5e-229)
                                                		tmp = t_2;
                                                	elseif (t_0 <= 1e+291)
                                                		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                                                	elseif (t_0 <= Inf)
                                                		tmp = t_2;
                                                	else
                                                		tmp = t_3;
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(d, h, l, M, D)
                                                	t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                                	t_1 = abs(d) / sqrt((l * h));
                                                	t_2 = 1.0 * t_1;
                                                	t_3 = (((M * M) * -0.125) * ((D * D) * (h / ((l * d) * d)))) * t_1;
                                                	tmp = 0.0;
                                                	if (t_0 <= -5e-111)
                                                		tmp = t_3;
                                                	elseif (t_0 <= 5e-229)
                                                		tmp = t_2;
                                                	elseif (t_0 <= 1e+291)
                                                		tmp = sqrt((d / l)) * sqrt((d / h));
                                                	elseif (t_0 <= Inf)
                                                		tmp = t_2;
                                                	else
                                                		tmp = t_3;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(M * M), $MachinePrecision] * -0.125), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * N[(h / N[(N[(l * d), $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-111], t$95$3, If[LessEqual[t$95$0, 5e-229], t$95$2, If[LessEqual[t$95$0, 1e+291], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], t$95$2, t$95$3]]]]]]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                t_2 := 1 \cdot t\_1\\
                                                t_3 := \left(\left(\left(M \cdot M\right) \cdot -0.125\right) \cdot \left(\left(D \cdot D\right) \cdot \frac{h}{\left(\ell \cdot d\right) \cdot d}\right)\right) \cdot t\_1\\
                                                \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\
                                                \;\;\;\;t\_3\\
                                                
                                                \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\
                                                \;\;\;\;t\_2\\
                                                
                                                \mathbf{elif}\;t\_0 \leq 10^{+291}:\\
                                                \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
                                                
                                                \mathbf{elif}\;t\_0 \leq \infty:\\
                                                \;\;\;\;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)))) < -5.0000000000000003e-111 or +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                                  1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if -5.0000000000000003e-111 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 5.00000000000000016e-229 or 9.9999999999999996e290 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                                    1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if 5.00000000000000016e-229 < (*.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.9999999999999996e290

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 8: 57.8% accurate, 0.1× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \sqrt{\ell \cdot h}\\ t_2 := 1 \cdot \frac{\left|d\right|}{t\_1}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\ \;\;\;\;\frac{\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot \left(\frac{h}{d} \cdot \frac{M \cdot M}{\ell}\right)}{t\_1}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \end{array} \end{array} \]
                                                        (FPCore (d h l M D)
                                                         :precision binary64
                                                         (let* ((t_0
                                                                 (*
                                                                  (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                                  (-
                                                                   1.0
                                                                   (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                                                                (t_1 (sqrt (* l h)))
                                                                (t_2 (* 1.0 (/ (fabs d) t_1))))
                                                           (if (<= t_0 -5e-111)
                                                             (/ (* (* (* D D) -0.125) (* (/ h d) (/ (* M M) l))) t_1)
                                                             (if (<= t_0 5e-229)
                                                               t_2
                                                               (if (<= t_0 1e+291)
                                                                 (* (sqrt (/ d l)) (sqrt (/ d h)))
                                                                 (if (<= t_0 INFINITY) t_2 (/ (* (- d) (sqrt (/ h l))) h)))))))
                                                        double code(double d, double h, double l, double M, double D) {
                                                        	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                        	double t_1 = sqrt((l * h));
                                                        	double t_2 = 1.0 * (fabs(d) / t_1);
                                                        	double tmp;
                                                        	if (t_0 <= -5e-111) {
                                                        		tmp = (((D * D) * -0.125) * ((h / d) * ((M * M) / l))) / t_1;
                                                        	} else if (t_0 <= 5e-229) {
                                                        		tmp = t_2;
                                                        	} else if (t_0 <= 1e+291) {
                                                        		tmp = sqrt((d / l)) * sqrt((d / h));
                                                        	} else if (t_0 <= ((double) INFINITY)) {
                                                        		tmp = t_2;
                                                        	} else {
                                                        		tmp = (-d * sqrt((h / l))) / h;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        public static double code(double d, double h, double l, double M, double D) {
                                                        	double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                        	double t_1 = Math.sqrt((l * h));
                                                        	double t_2 = 1.0 * (Math.abs(d) / t_1);
                                                        	double tmp;
                                                        	if (t_0 <= -5e-111) {
                                                        		tmp = (((D * D) * -0.125) * ((h / d) * ((M * M) / l))) / t_1;
                                                        	} else if (t_0 <= 5e-229) {
                                                        		tmp = t_2;
                                                        	} else if (t_0 <= 1e+291) {
                                                        		tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
                                                        	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                                                        		tmp = t_2;
                                                        	} else {
                                                        		tmp = (-d * Math.sqrt((h / l))) / h;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(d, h, l, M, D):
                                                        	t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
                                                        	t_1 = math.sqrt((l * h))
                                                        	t_2 = 1.0 * (math.fabs(d) / t_1)
                                                        	tmp = 0
                                                        	if t_0 <= -5e-111:
                                                        		tmp = (((D * D) * -0.125) * ((h / d) * ((M * M) / l))) / t_1
                                                        	elif t_0 <= 5e-229:
                                                        		tmp = t_2
                                                        	elif t_0 <= 1e+291:
                                                        		tmp = math.sqrt((d / l)) * math.sqrt((d / h))
                                                        	elif t_0 <= math.inf:
                                                        		tmp = t_2
                                                        	else:
                                                        		tmp = (-d * math.sqrt((h / l))) / h
                                                        	return tmp
                                                        
                                                        function code(d, h, l, M, D)
                                                        	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                        	t_1 = sqrt(Float64(l * h))
                                                        	t_2 = Float64(1.0 * Float64(abs(d) / t_1))
                                                        	tmp = 0.0
                                                        	if (t_0 <= -5e-111)
                                                        		tmp = Float64(Float64(Float64(Float64(D * D) * -0.125) * Float64(Float64(h / d) * Float64(Float64(M * M) / l))) / t_1);
                                                        	elseif (t_0 <= 5e-229)
                                                        		tmp = t_2;
                                                        	elseif (t_0 <= 1e+291)
                                                        		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                                                        	elseif (t_0 <= Inf)
                                                        		tmp = t_2;
                                                        	else
                                                        		tmp = Float64(Float64(Float64(-d) * sqrt(Float64(h / l))) / h);
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(d, h, l, M, D)
                                                        	t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                                        	t_1 = sqrt((l * h));
                                                        	t_2 = 1.0 * (abs(d) / t_1);
                                                        	tmp = 0.0;
                                                        	if (t_0 <= -5e-111)
                                                        		tmp = (((D * D) * -0.125) * ((h / d) * ((M * M) / l))) / t_1;
                                                        	elseif (t_0 <= 5e-229)
                                                        		tmp = t_2;
                                                        	elseif (t_0 <= 1e+291)
                                                        		tmp = sqrt((d / l)) * sqrt((d / h));
                                                        	elseif (t_0 <= Inf)
                                                        		tmp = t_2;
                                                        	else
                                                        		tmp = (-d * sqrt((h / l))) / h;
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 * N[(N[Abs[d], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-111], N[(N[(N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision] * N[(N[(h / d), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$0, 5e-229], t$95$2, If[LessEqual[t$95$0, 1e+291], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], t$95$2, N[(N[((-d) * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]]]]]]]]
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                        t_1 := \sqrt{\ell \cdot h}\\
                                                        t_2 := 1 \cdot \frac{\left|d\right|}{t\_1}\\
                                                        \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-111}:\\
                                                        \;\;\;\;\frac{\left(\left(D \cdot D\right) \cdot -0.125\right) \cdot \left(\frac{h}{d} \cdot \frac{M \cdot M}{\ell}\right)}{t\_1}\\
                                                        
                                                        \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-229}:\\
                                                        \;\;\;\;t\_2\\
                                                        
                                                        \mathbf{elif}\;t\_0 \leq 10^{+291}:\\
                                                        \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
                                                        
                                                        \mathbf{elif}\;t\_0 \leq \infty:\\
                                                        \;\;\;\;t\_2\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 4 regimes
                                                        2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -5.0000000000000003e-111

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if -5.0000000000000003e-111 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 5.00000000000000016e-229 or 9.9999999999999996e290 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                                          1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 5.00000000000000016e-229 < (*.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.9999999999999996e290

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

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

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

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

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

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

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

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

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

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

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

                                                                1. Initial program 0.0%

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

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

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

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

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

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

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

                                                                Alternative 9: 54.4% accurate, 0.1× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ t_1 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_2 := \frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-229}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                                (FPCore (d h l M D)
                                                                 :precision binary64
                                                                 (let* ((t_0 (* 1.0 (/ (fabs d) (sqrt (* l h)))))
                                                                        (t_1
                                                                         (*
                                                                          (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                                          (-
                                                                           1.0
                                                                           (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                                                                        (t_2 (/ (* (- d) (sqrt (/ h l))) h)))
                                                                   (if (<= t_1 -5e-111)
                                                                     t_2
                                                                     (if (<= t_1 5e-229)
                                                                       t_0
                                                                       (if (<= t_1 1e+291)
                                                                         (* (sqrt (/ d l)) (sqrt (/ d h)))
                                                                         (if (<= t_1 INFINITY) t_0 t_2))))))
                                                                double code(double d, double h, double l, double M, double D) {
                                                                	double t_0 = 1.0 * (fabs(d) / sqrt((l * h)));
                                                                	double t_1 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                	double t_2 = (-d * sqrt((h / l))) / h;
                                                                	double tmp;
                                                                	if (t_1 <= -5e-111) {
                                                                		tmp = t_2;
                                                                	} else if (t_1 <= 5e-229) {
                                                                		tmp = t_0;
                                                                	} else if (t_1 <= 1e+291) {
                                                                		tmp = sqrt((d / l)) * sqrt((d / h));
                                                                	} else if (t_1 <= ((double) INFINITY)) {
                                                                		tmp = t_0;
                                                                	} else {
                                                                		tmp = t_2;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                public static double code(double d, double h, double l, double M, double D) {
                                                                	double t_0 = 1.0 * (Math.abs(d) / Math.sqrt((l * h)));
                                                                	double t_1 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                	double t_2 = (-d * Math.sqrt((h / l))) / h;
                                                                	double tmp;
                                                                	if (t_1 <= -5e-111) {
                                                                		tmp = t_2;
                                                                	} else if (t_1 <= 5e-229) {
                                                                		tmp = t_0;
                                                                	} else if (t_1 <= 1e+291) {
                                                                		tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
                                                                	} else if (t_1 <= Double.POSITIVE_INFINITY) {
                                                                		tmp = t_0;
                                                                	} else {
                                                                		tmp = t_2;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                def code(d, h, l, M, D):
                                                                	t_0 = 1.0 * (math.fabs(d) / math.sqrt((l * h)))
                                                                	t_1 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
                                                                	t_2 = (-d * math.sqrt((h / l))) / h
                                                                	tmp = 0
                                                                	if t_1 <= -5e-111:
                                                                		tmp = t_2
                                                                	elif t_1 <= 5e-229:
                                                                		tmp = t_0
                                                                	elif t_1 <= 1e+291:
                                                                		tmp = math.sqrt((d / l)) * math.sqrt((d / h))
                                                                	elif t_1 <= math.inf:
                                                                		tmp = t_0
                                                                	else:
                                                                		tmp = t_2
                                                                	return tmp
                                                                
                                                                function code(d, h, l, M, D)
                                                                	t_0 = Float64(1.0 * Float64(abs(d) / sqrt(Float64(l * h))))
                                                                	t_1 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                                	t_2 = Float64(Float64(Float64(-d) * sqrt(Float64(h / l))) / h)
                                                                	tmp = 0.0
                                                                	if (t_1 <= -5e-111)
                                                                		tmp = t_2;
                                                                	elseif (t_1 <= 5e-229)
                                                                		tmp = t_0;
                                                                	elseif (t_1 <= 1e+291)
                                                                		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                                                                	elseif (t_1 <= Inf)
                                                                		tmp = t_0;
                                                                	else
                                                                		tmp = t_2;
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                function tmp_2 = code(d, h, l, M, D)
                                                                	t_0 = 1.0 * (abs(d) / sqrt((l * h)));
                                                                	t_1 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                                                	t_2 = (-d * sqrt((h / l))) / h;
                                                                	tmp = 0.0;
                                                                	if (t_1 <= -5e-111)
                                                                		tmp = t_2;
                                                                	elseif (t_1 <= 5e-229)
                                                                		tmp = t_0;
                                                                	elseif (t_1 <= 1e+291)
                                                                		tmp = sqrt((d / l)) * sqrt((d / h));
                                                                	elseif (t_1 <= Inf)
                                                                		tmp = t_0;
                                                                	else
                                                                		tmp = t_2;
                                                                	end
                                                                	tmp_2 = tmp;
                                                                end
                                                                
                                                                code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(1.0 * N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-d) * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-111], t$95$2, If[LessEqual[t$95$1, 5e-229], t$95$0, If[LessEqual[t$95$1, 1e+291], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$0, t$95$2]]]]]]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                t_0 := 1 \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                                t_1 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                                t_2 := \frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                                                                \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-111}:\\
                                                                \;\;\;\;t\_2\\
                                                                
                                                                \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-229}:\\
                                                                \;\;\;\;t\_0\\
                                                                
                                                                \mathbf{elif}\;t\_1 \leq 10^{+291}:\\
                                                                \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
                                                                
                                                                \mathbf{elif}\;t\_1 \leq \infty:\\
                                                                \;\;\;\;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)))) < -5.0000000000000003e-111 or +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                                                  1. Initial program 58.5%

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

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

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

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

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

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

                                                                    if -5.0000000000000003e-111 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 5.00000000000000016e-229 or 9.9999999999999996e290 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                                                    1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      if 5.00000000000000016e-229 < (*.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.9999999999999996e290

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

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

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

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

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

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

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

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

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

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

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

                                                                        Alternative 10: 52.5% accurate, 0.1× speedup?

                                                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ t_1 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_2 := \frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-156}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 10^{+98}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                                        (FPCore (d h l M D)
                                                                         :precision binary64
                                                                         (let* ((t_0 (* 1.0 (/ (fabs d) (sqrt (* l h)))))
                                                                                (t_1
                                                                                 (*
                                                                                  (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                                                  (-
                                                                                   1.0
                                                                                   (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                                                                                (t_2 (/ (* (- d) (sqrt (/ h l))) h)))
                                                                           (if (<= t_1 -5e-111)
                                                                             t_2
                                                                             (if (<= t_1 2e-156)
                                                                               t_0
                                                                               (if (<= t_1 1e+98)
                                                                                 (sqrt (* (/ d l) (/ d h)))
                                                                                 (if (<= t_1 INFINITY) t_0 t_2))))))
                                                                        double code(double d, double h, double l, double M, double D) {
                                                                        	double t_0 = 1.0 * (fabs(d) / sqrt((l * h)));
                                                                        	double t_1 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                        	double t_2 = (-d * sqrt((h / l))) / h;
                                                                        	double tmp;
                                                                        	if (t_1 <= -5e-111) {
                                                                        		tmp = t_2;
                                                                        	} else if (t_1 <= 2e-156) {
                                                                        		tmp = t_0;
                                                                        	} else if (t_1 <= 1e+98) {
                                                                        		tmp = sqrt(((d / l) * (d / h)));
                                                                        	} else if (t_1 <= ((double) INFINITY)) {
                                                                        		tmp = t_0;
                                                                        	} else {
                                                                        		tmp = t_2;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        public static double code(double d, double h, double l, double M, double D) {
                                                                        	double t_0 = 1.0 * (Math.abs(d) / Math.sqrt((l * h)));
                                                                        	double t_1 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                        	double t_2 = (-d * Math.sqrt((h / l))) / h;
                                                                        	double tmp;
                                                                        	if (t_1 <= -5e-111) {
                                                                        		tmp = t_2;
                                                                        	} else if (t_1 <= 2e-156) {
                                                                        		tmp = t_0;
                                                                        	} else if (t_1 <= 1e+98) {
                                                                        		tmp = Math.sqrt(((d / l) * (d / h)));
                                                                        	} else if (t_1 <= Double.POSITIVE_INFINITY) {
                                                                        		tmp = t_0;
                                                                        	} else {
                                                                        		tmp = t_2;
                                                                        	}
                                                                        	return tmp;
                                                                        }
                                                                        
                                                                        def code(d, h, l, M, D):
                                                                        	t_0 = 1.0 * (math.fabs(d) / math.sqrt((l * h)))
                                                                        	t_1 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
                                                                        	t_2 = (-d * math.sqrt((h / l))) / h
                                                                        	tmp = 0
                                                                        	if t_1 <= -5e-111:
                                                                        		tmp = t_2
                                                                        	elif t_1 <= 2e-156:
                                                                        		tmp = t_0
                                                                        	elif t_1 <= 1e+98:
                                                                        		tmp = math.sqrt(((d / l) * (d / h)))
                                                                        	elif t_1 <= math.inf:
                                                                        		tmp = t_0
                                                                        	else:
                                                                        		tmp = t_2
                                                                        	return tmp
                                                                        
                                                                        function code(d, h, l, M, D)
                                                                        	t_0 = Float64(1.0 * Float64(abs(d) / sqrt(Float64(l * h))))
                                                                        	t_1 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                                        	t_2 = Float64(Float64(Float64(-d) * sqrt(Float64(h / l))) / h)
                                                                        	tmp = 0.0
                                                                        	if (t_1 <= -5e-111)
                                                                        		tmp = t_2;
                                                                        	elseif (t_1 <= 2e-156)
                                                                        		tmp = t_0;
                                                                        	elseif (t_1 <= 1e+98)
                                                                        		tmp = sqrt(Float64(Float64(d / l) * Float64(d / h)));
                                                                        	elseif (t_1 <= Inf)
                                                                        		tmp = t_0;
                                                                        	else
                                                                        		tmp = t_2;
                                                                        	end
                                                                        	return tmp
                                                                        end
                                                                        
                                                                        function tmp_2 = code(d, h, l, M, D)
                                                                        	t_0 = 1.0 * (abs(d) / sqrt((l * h)));
                                                                        	t_1 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                                                        	t_2 = (-d * sqrt((h / l))) / h;
                                                                        	tmp = 0.0;
                                                                        	if (t_1 <= -5e-111)
                                                                        		tmp = t_2;
                                                                        	elseif (t_1 <= 2e-156)
                                                                        		tmp = t_0;
                                                                        	elseif (t_1 <= 1e+98)
                                                                        		tmp = sqrt(((d / l) * (d / h)));
                                                                        	elseif (t_1 <= Inf)
                                                                        		tmp = t_0;
                                                                        	else
                                                                        		tmp = t_2;
                                                                        	end
                                                                        	tmp_2 = tmp;
                                                                        end
                                                                        
                                                                        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(1.0 * N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-d) * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-111], t$95$2, If[LessEqual[t$95$1, 2e-156], t$95$0, If[LessEqual[t$95$1, 1e+98], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$0, t$95$2]]]]]]]
                                                                        
                                                                        \begin{array}{l}
                                                                        
                                                                        \\
                                                                        \begin{array}{l}
                                                                        t_0 := 1 \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                                        t_1 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                                        t_2 := \frac{\left(-d\right) \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                                                                        \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-111}:\\
                                                                        \;\;\;\;t\_2\\
                                                                        
                                                                        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-156}:\\
                                                                        \;\;\;\;t\_0\\
                                                                        
                                                                        \mathbf{elif}\;t\_1 \leq 10^{+98}:\\
                                                                        \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
                                                                        
                                                                        \mathbf{elif}\;t\_1 \leq \infty:\\
                                                                        \;\;\;\;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)))) < -5.0000000000000003e-111 or +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                                                          1. Initial program 58.5%

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

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

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

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

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

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

                                                                            if -5.0000000000000003e-111 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 2.00000000000000008e-156 or 9.99999999999999998e97 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                                                            1. Initial program 61.8%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto \color{blue}{1} \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                            7. Step-by-step derivation
                                                                              1. Applied rewrites86.8%

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

                                                                              if 2.00000000000000008e-156 < (*.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.99999999999999998e97

                                                                              1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                Alternative 11: 49.5% accurate, 0.2× speedup?

                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-83}:\\ \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-156} \lor \neg \left(t\_0 \leq 10^{+98}\right):\\ \;\;\;\;1 \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \end{array} \end{array} \]
                                                                                (FPCore (d h l M D)
                                                                                 :precision binary64
                                                                                 (let* ((t_0
                                                                                         (*
                                                                                          (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                                                          (-
                                                                                           1.0
                                                                                           (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))))
                                                                                   (if (<= t_0 -1e-83)
                                                                                     (* (sqrt (pow (* l h) -1.0)) d)
                                                                                     (if (or (<= t_0 2e-156) (not (<= t_0 1e+98)))
                                                                                       (* 1.0 (/ (fabs d) (sqrt (* l h))))
                                                                                       (sqrt (* (/ d l) (/ d h)))))))
                                                                                double code(double d, double h, double l, double M, double D) {
                                                                                	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                                	double tmp;
                                                                                	if (t_0 <= -1e-83) {
                                                                                		tmp = sqrt(pow((l * h), -1.0)) * d;
                                                                                	} else if ((t_0 <= 2e-156) || !(t_0 <= 1e+98)) {
                                                                                		tmp = 1.0 * (fabs(d) / sqrt((l * h)));
                                                                                	} else {
                                                                                		tmp = sqrt(((d / l) * (d / h)));
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                module fmin_fmax_functions
                                                                                    implicit none
                                                                                    private
                                                                                    public fmax
                                                                                    public fmin
                                                                                
                                                                                    interface fmax
                                                                                        module procedure fmax88
                                                                                        module procedure fmax44
                                                                                        module procedure fmax84
                                                                                        module procedure fmax48
                                                                                    end interface
                                                                                    interface fmin
                                                                                        module procedure fmin88
                                                                                        module procedure fmin44
                                                                                        module procedure fmin84
                                                                                        module procedure fmin48
                                                                                    end interface
                                                                                contains
                                                                                    real(8) function fmax88(x, y) result (res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(4) function fmax44(x, y) result (res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmax84(x, y) result(res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmax48(x, y) result(res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmin88(x, y) result (res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(4) function fmin44(x, y) result (res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmin84(x, y) result(res)
                                                                                        real(8), intent (in) :: x
                                                                                        real(4), intent (in) :: y
                                                                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                    end function
                                                                                    real(8) function fmin48(x, y) result(res)
                                                                                        real(4), intent (in) :: x
                                                                                        real(8), intent (in) :: y
                                                                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                    end function
                                                                                end module
                                                                                
                                                                                real(8) function code(d, h, l, m, d_1)
                                                                                use fmin_fmax_functions
                                                                                    real(8), intent (in) :: d
                                                                                    real(8), intent (in) :: h
                                                                                    real(8), intent (in) :: l
                                                                                    real(8), intent (in) :: m
                                                                                    real(8), intent (in) :: d_1
                                                                                    real(8) :: t_0
                                                                                    real(8) :: tmp
                                                                                    t_0 = (((d / h) ** (2.0d0 ** (-1.0d0))) * ((d / l) ** (2.0d0 ** (-1.0d0)))) * (1.0d0 - (((2.0d0 ** (-1.0d0)) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
                                                                                    if (t_0 <= (-1d-83)) then
                                                                                        tmp = sqrt(((l * h) ** (-1.0d0))) * d
                                                                                    else if ((t_0 <= 2d-156) .or. (.not. (t_0 <= 1d+98))) then
                                                                                        tmp = 1.0d0 * (abs(d) / sqrt((l * h)))
                                                                                    else
                                                                                        tmp = sqrt(((d / l) * (d / h)))
                                                                                    end if
                                                                                    code = tmp
                                                                                end function
                                                                                
                                                                                public static double code(double d, double h, double l, double M, double D) {
                                                                                	double t_0 = (Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                                	double tmp;
                                                                                	if (t_0 <= -1e-83) {
                                                                                		tmp = Math.sqrt(Math.pow((l * h), -1.0)) * d;
                                                                                	} else if ((t_0 <= 2e-156) || !(t_0 <= 1e+98)) {
                                                                                		tmp = 1.0 * (Math.abs(d) / Math.sqrt((l * h)));
                                                                                	} else {
                                                                                		tmp = Math.sqrt(((d / l) * (d / h)));
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                def code(d, h, l, M, D):
                                                                                	t_0 = (math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
                                                                                	tmp = 0
                                                                                	if t_0 <= -1e-83:
                                                                                		tmp = math.sqrt(math.pow((l * h), -1.0)) * d
                                                                                	elif (t_0 <= 2e-156) or not (t_0 <= 1e+98):
                                                                                		tmp = 1.0 * (math.fabs(d) / math.sqrt((l * h)))
                                                                                	else:
                                                                                		tmp = math.sqrt(((d / l) * (d / h)))
                                                                                	return tmp
                                                                                
                                                                                function code(d, h, l, M, D)
                                                                                	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                                                	tmp = 0.0
                                                                                	if (t_0 <= -1e-83)
                                                                                		tmp = Float64(sqrt((Float64(l * h) ^ -1.0)) * d);
                                                                                	elseif ((t_0 <= 2e-156) || !(t_0 <= 1e+98))
                                                                                		tmp = Float64(1.0 * Float64(abs(d) / sqrt(Float64(l * h))));
                                                                                	else
                                                                                		tmp = sqrt(Float64(Float64(d / l) * Float64(d / h)));
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                function tmp_2 = code(d, h, l, M, D)
                                                                                	t_0 = (((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                                                                	tmp = 0.0;
                                                                                	if (t_0 <= -1e-83)
                                                                                		tmp = sqrt(((l * h) ^ -1.0)) * d;
                                                                                	elseif ((t_0 <= 2e-156) || ~((t_0 <= 1e+98)))
                                                                                		tmp = 1.0 * (abs(d) / sqrt((l * h)));
                                                                                	else
                                                                                		tmp = sqrt(((d / l) * (d / h)));
                                                                                	end
                                                                                	tmp_2 = tmp;
                                                                                end
                                                                                
                                                                                code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-83], N[(N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision], If[Or[LessEqual[t$95$0, 2e-156], N[Not[LessEqual[t$95$0, 1e+98]], $MachinePrecision]], N[(1.0 * N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                \begin{array}{l}
                                                                                t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                                                \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-83}:\\
                                                                                \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\
                                                                                
                                                                                \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-156} \lor \neg \left(t\_0 \leq 10^{+98}\right):\\
                                                                                \;\;\;\;1 \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 3 regimes
                                                                                2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -1e-83

                                                                                  1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

                                                                                  if -1e-83 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 2.00000000000000008e-156 or 9.99999999999999998e97 < (*.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 40.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-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    if 2.00000000000000008e-156 < (*.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.99999999999999998e97

                                                                                    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                      Alternative 12: 77.5% accurate, 0.3× speedup?

                                                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{D}{d}}{-2} \cdot M\\ t_1 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_1 \leq 0 \lor \neg \left(t\_1 \leq 10^{+291}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{h}{\ell} \cdot \left(t\_0 \cdot -0.5\right), t\_0, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \end{array} \end{array} \]
                                                                                      (FPCore (d h l M D)
                                                                                       :precision binary64
                                                                                       (let* ((t_0 (* (/ (/ D d) -2.0) M))
                                                                                              (t_1
                                                                                               (*
                                                                                                (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                                                                (-
                                                                                                 1.0
                                                                                                 (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))))
                                                                                         (if (or (<= t_1 0.0) (not (<= t_1 1e+291)))
                                                                                           (* (fma (* (/ h l) (* t_0 -0.5)) t_0 1.0) (/ (fabs d) (sqrt (* l h))))
                                                                                           (* (sqrt (/ d l)) (sqrt (/ d h))))))
                                                                                      double code(double d, double h, double l, double M, double D) {
                                                                                      	double t_0 = ((D / d) / -2.0) * M;
                                                                                      	double t_1 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                                      	double tmp;
                                                                                      	if ((t_1 <= 0.0) || !(t_1 <= 1e+291)) {
                                                                                      		tmp = fma(((h / l) * (t_0 * -0.5)), t_0, 1.0) * (fabs(d) / sqrt((l * h)));
                                                                                      	} else {
                                                                                      		tmp = sqrt((d / l)) * sqrt((d / h));
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      function code(d, h, l, M, D)
                                                                                      	t_0 = Float64(Float64(Float64(D / d) / -2.0) * M)
                                                                                      	t_1 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                                                      	tmp = 0.0
                                                                                      	if ((t_1 <= 0.0) || !(t_1 <= 1e+291))
                                                                                      		tmp = Float64(fma(Float64(Float64(h / l) * Float64(t_0 * -0.5)), t_0, 1.0) * Float64(abs(d) / sqrt(Float64(l * h))));
                                                                                      	else
                                                                                      		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[(D / d), $MachinePrecision] / -2.0), $MachinePrecision] * M), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 1e+291]], $MachinePrecision]], N[(N[(N[(N[(h / l), $MachinePrecision] * N[(t$95$0 * -0.5), $MachinePrecision]), $MachinePrecision] * t$95$0 + 1.0), $MachinePrecision] * N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      
                                                                                      \\
                                                                                      \begin{array}{l}
                                                                                      t_0 := \frac{\frac{D}{d}}{-2} \cdot M\\
                                                                                      t_1 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                                                      \mathbf{if}\;t\_1 \leq 0 \lor \neg \left(t\_1 \leq 10^{+291}\right):\\
                                                                                      \;\;\;\;\mathsf{fma}\left(\frac{h}{\ell} \cdot \left(t\_0 \cdot -0.5\right), t\_0, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 2 regimes
                                                                                      2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 9.9999999999999996e290 < (*.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.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                          11. associate-/l*N/A

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                          12. metadata-evalN/A

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{\color{blue}{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                          13. unpow2N/A

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                          14. associate-/r*N/A

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{\frac{M \cdot D}{2}}{d}} \cdot \frac{M \cdot D}{2 \cdot d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                          15. associate-/r*N/A

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{\frac{M \cdot D}{2}}{d} \cdot \color{blue}{\frac{\frac{M \cdot D}{2}}{d}}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                          16. frac-timesN/A

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\frac{\frac{M \cdot D}{2} \cdot \frac{M \cdot D}{2}}{d \cdot d}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                          17. sqr-neg-revN/A

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\frac{M \cdot D}{2} \cdot \frac{M \cdot D}{2}}{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \left(\mathsf{neg}\left(d\right)\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                          18. times-fracN/A

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)} \cdot \frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                          19. lower-*.f64N/A

                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)} \cdot \frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                        7. Applied rewrites70.9%

                                                                                          \[\leadsto \mathsf{fma}\left(-0.5 \cdot \color{blue}{\left(\frac{D \cdot \frac{M}{2}}{-d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                        8. Applied rewrites74.9%

                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{h}{\ell} \cdot \left(\left(\frac{\frac{D}{d}}{-2} \cdot M\right) \cdot -0.5\right), \frac{\frac{D}{d}}{-2} \cdot M, 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.9999999999999996e290

                                                                                        1. Initial program 99.1%

                                                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                        2. Add Preprocessing
                                                                                        3. Taylor expanded in d around inf

                                                                                          \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. *-commutativeN/A

                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                          2. lower-*.f64N/A

                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                          3. lower-sqrt.f64N/A

                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                          4. lower-/.f64N/A

                                                                                            \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                          5. *-commutativeN/A

                                                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                          6. lower-*.f6439.9

                                                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                        5. Applied rewrites39.9%

                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                        6. Step-by-step derivation
                                                                                          1. Applied rewrites40.0%

                                                                                            \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                                                                                          2. Step-by-step derivation
                                                                                            1. Applied rewrites98.1%

                                                                                              \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]
                                                                                          3. Recombined 2 regimes into one program.
                                                                                          4. Final simplification81.0%

                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 0 \lor \neg \left(\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+291}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{h}{\ell} \cdot \left(\left(\frac{\frac{D}{d}}{-2} \cdot M\right) \cdot -0.5\right), \frac{\frac{D}{d}}{-2} \cdot M, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \end{array} \]
                                                                                          5. Add Preprocessing

                                                                                          Alternative 13: 75.9% accurate, 0.3× speedup?

                                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \frac{\frac{D}{d}}{2} \cdot M\\ t_2 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;t\_0 \leq 5 \cdot 10^{-229}:\\ \;\;\;\;\mathsf{fma}\left(\left(--0.5\right) \cdot \left(\frac{M \cdot D}{-2 \cdot d} \cdot \frac{D \cdot \frac{M}{2}}{d}\right), \frac{h}{\ell}, 1\right) \cdot t\_2\\ \mathbf{elif}\;t\_0 \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t\_1 \cdot \left(t\_1 \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot t\_2\\ \end{array} \end{array} \]
                                                                                          (FPCore (d h l M D)
                                                                                           :precision binary64
                                                                                           (let* ((t_0
                                                                                                   (*
                                                                                                    (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                                                                    (-
                                                                                                     1.0
                                                                                                     (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                                                                                                  (t_1 (* (/ (/ D d) 2.0) M))
                                                                                                  (t_2 (/ (fabs d) (sqrt (* l h)))))
                                                                                             (if (<= t_0 5e-229)
                                                                                               (*
                                                                                                (fma
                                                                                                 (* (- -0.5) (* (/ (* M D) (* -2.0 d)) (/ (* D (/ M 2.0)) d)))
                                                                                                 (/ h l)
                                                                                                 1.0)
                                                                                                t_2)
                                                                                               (if (<= t_0 1e+291)
                                                                                                 (* (sqrt (/ d l)) (sqrt (/ d h)))
                                                                                                 (* (fma (* t_1 (* t_1 -0.5)) (/ h l) 1.0) t_2)))))
                                                                                          double code(double d, double h, double l, double M, double D) {
                                                                                          	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                                          	double t_1 = ((D / d) / 2.0) * M;
                                                                                          	double t_2 = fabs(d) / sqrt((l * h));
                                                                                          	double tmp;
                                                                                          	if (t_0 <= 5e-229) {
                                                                                          		tmp = fma((-(-0.5) * (((M * D) / (-2.0 * d)) * ((D * (M / 2.0)) / d))), (h / l), 1.0) * t_2;
                                                                                          	} else if (t_0 <= 1e+291) {
                                                                                          		tmp = sqrt((d / l)) * sqrt((d / h));
                                                                                          	} else {
                                                                                          		tmp = fma((t_1 * (t_1 * -0.5)), (h / l), 1.0) * t_2;
                                                                                          	}
                                                                                          	return tmp;
                                                                                          }
                                                                                          
                                                                                          function code(d, h, l, M, D)
                                                                                          	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                                                          	t_1 = Float64(Float64(Float64(D / d) / 2.0) * M)
                                                                                          	t_2 = Float64(abs(d) / sqrt(Float64(l * h)))
                                                                                          	tmp = 0.0
                                                                                          	if (t_0 <= 5e-229)
                                                                                          		tmp = Float64(fma(Float64(Float64(-(-0.5)) * Float64(Float64(Float64(M * D) / Float64(-2.0 * d)) * Float64(Float64(D * Float64(M / 2.0)) / d))), Float64(h / l), 1.0) * t_2);
                                                                                          	elseif (t_0 <= 1e+291)
                                                                                          		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                                                                                          	else
                                                                                          		tmp = Float64(fma(Float64(t_1 * Float64(t_1 * -0.5)), Float64(h / l), 1.0) * t_2);
                                                                                          	end
                                                                                          	return tmp
                                                                                          end
                                                                                          
                                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(D / d), $MachinePrecision] / 2.0), $MachinePrecision] * M), $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-229], N[(N[(N[((--0.5) * N[(N[(N[(M * D), $MachinePrecision] / N[(-2.0 * d), $MachinePrecision]), $MachinePrecision] * N[(N[(D * N[(M / 2.0), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t$95$0, 1e+291], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$1 * N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$2), $MachinePrecision]]]]]]
                                                                                          
                                                                                          \begin{array}{l}
                                                                                          
                                                                                          \\
                                                                                          \begin{array}{l}
                                                                                          t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                                                          t_1 := \frac{\frac{D}{d}}{2} \cdot M\\
                                                                                          t_2 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                                                          \mathbf{if}\;t\_0 \leq 5 \cdot 10^{-229}:\\
                                                                                          \;\;\;\;\mathsf{fma}\left(\left(--0.5\right) \cdot \left(\frac{M \cdot D}{-2 \cdot d} \cdot \frac{D \cdot \frac{M}{2}}{d}\right), \frac{h}{\ell}, 1\right) \cdot t\_2\\
                                                                                          
                                                                                          \mathbf{elif}\;t\_0 \leq 10^{+291}:\\
                                                                                          \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
                                                                                          
                                                                                          \mathbf{else}:\\
                                                                                          \;\;\;\;\mathsf{fma}\left(t\_1 \cdot \left(t\_1 \cdot -0.5\right), \frac{h}{\ell}, 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)))) < 5.00000000000000016e-229

                                                                                            1. Initial program 81.0%

                                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            2. Add Preprocessing
                                                                                            3. Step-by-step derivation
                                                                                              1. lift-pow.f64N/A

                                                                                                \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              2. lift-/.f64N/A

                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              3. metadata-evalN/A

                                                                                                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              4. unpow1/2N/A

                                                                                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              5. lift-/.f64N/A

                                                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              6. sqrt-divN/A

                                                                                                \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              7. lower-/.f64N/A

                                                                                                \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              8. lower-sqrt.f64N/A

                                                                                                \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              9. lower-sqrt.f6446.3

                                                                                                \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            4. Applied rewrites46.3%

                                                                                              \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            5. Applied rewrites84.9%

                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                            6. Step-by-step derivation
                                                                                              1. unpow1N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}\right)}^{1}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              2. lift-pow.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}\right)}}^{1}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              3. unpow2N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \left(M \cdot \frac{\frac{D}{d}}{2}\right)\right)}}^{1}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              4. pow-prod-downN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{1} \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{1}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              5. pow-sqrN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{\left(2 \cdot 1\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              6. lift-*.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              7. lift-/.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \color{blue}{\frac{\frac{D}{d}}{2}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              8. lift-/.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{\color{blue}{\frac{D}{d}}}{2}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              9. associate-/l/N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \color{blue}{\frac{D}{d \cdot 2}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              10. *-commutativeN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              11. associate-/l*N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              12. metadata-evalN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{\color{blue}{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              13. unpow2N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              14. associate-/r*N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{\frac{M \cdot D}{2}}{d}} \cdot \frac{M \cdot D}{2 \cdot d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              15. associate-/r*N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{\frac{M \cdot D}{2}}{d} \cdot \color{blue}{\frac{\frac{M \cdot D}{2}}{d}}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              16. frac-timesN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\frac{\frac{M \cdot D}{2} \cdot \frac{M \cdot D}{2}}{d \cdot d}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              17. sqr-neg-revN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\frac{M \cdot D}{2} \cdot \frac{M \cdot D}{2}}{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \left(\mathsf{neg}\left(d\right)\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              18. times-fracN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)} \cdot \frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              19. lower-*.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)} \cdot \frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                            7. Applied rewrites86.2%

                                                                                              \[\leadsto \mathsf{fma}\left(-0.5 \cdot \color{blue}{\left(\frac{D \cdot \frac{M}{2}}{-d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                            8. Step-by-step derivation
                                                                                              1. rem-square-sqrtN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\color{blue}{\sqrt{-d} \cdot \sqrt{-d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              2. sqrt-prodN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\color{blue}{\sqrt{\left(-d\right) \cdot \left(-d\right)}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              3. lift-neg.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \left(-d\right)}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              4. lift-neg.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\sqrt{\left(\mathsf{neg}\left(d\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(d\right)\right)}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              5. sqr-neg-revN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\sqrt{\color{blue}{d \cdot d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              6. sqrt-prodN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\color{blue}{\sqrt{d} \cdot \sqrt{d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              7. rem-square-sqrt15.6

                                                                                                \[\leadsto \mathsf{fma}\left(-0.5 \cdot \left(\frac{D \cdot \frac{M}{2}}{\color{blue}{d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              8. lower-/.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{D \cdot \frac{M}{2}}{d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              9. lift-*.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{\color{blue}{D \cdot \frac{M}{2}}}{d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              10. *-commutativeN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{\color{blue}{\frac{M}{2} \cdot D}}{d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              11. associate-*r/N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              12. lift-/.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\color{blue}{\frac{M}{2}} \cdot \frac{D}{d}\right) \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              13. times-fracN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              14. lift-*.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              15. lower-/.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              16. count-2-revN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{d + d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              17. rem-square-sqrtN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\sqrt{d} \cdot \sqrt{d}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              18. sqrt-prodN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\sqrt{d \cdot d}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              19. sqr-neg-revN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \left(\mathsf{neg}\left(d\right)\right)}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              20. lift-neg.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\sqrt{\color{blue}{\left(-d\right)} \cdot \left(\mathsf{neg}\left(d\right)\right)} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              21. lift-neg.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\sqrt{\left(-d\right) \cdot \color{blue}{\left(-d\right)}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              22. sqrt-prodN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\sqrt{-d} \cdot \sqrt{-d}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              23. rem-square-sqrtN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\left(-d\right)} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              24. lift-neg.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\left(\mathsf{neg}\left(d\right)\right)} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              25. rem-square-sqrtN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \color{blue}{\sqrt{d} \cdot \sqrt{d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              26. sqrt-prodN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \color{blue}{\sqrt{d \cdot d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              27. sqr-neg-revN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \left(\mathsf{neg}\left(d\right)\right)}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              28. lift-neg.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \sqrt{\color{blue}{\left(-d\right)} \cdot \left(\mathsf{neg}\left(d\right)\right)}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              29. lift-neg.f64N/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \sqrt{\left(-d\right) \cdot \color{blue}{\left(-d\right)}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              30. sqrt-prodN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \color{blue}{\sqrt{-d} \cdot \sqrt{-d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              31. rem-square-sqrtN/A

                                                                                                \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \color{blue}{\left(-d\right)}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                            9. Applied rewrites86.2%

                                                                                              \[\leadsto \mathsf{fma}\left(-0.5 \cdot \left(\color{blue}{\frac{M \cdot D}{-2 \cdot d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]

                                                                                            if 5.00000000000000016e-229 < (*.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.9999999999999996e290

                                                                                            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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                            4. Step-by-step derivation
                                                                                              1. *-commutativeN/A

                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                              2. lower-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                              3. lower-sqrt.f64N/A

                                                                                                \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                              4. lower-/.f64N/A

                                                                                                \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                              5. *-commutativeN/A

                                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                              6. lower-*.f6439.5

                                                                                                \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                            5. Applied rewrites39.5%

                                                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                            6. Step-by-step derivation
                                                                                              1. Applied rewrites39.6%

                                                                                                \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                                                                                              2. Step-by-step derivation
                                                                                                1. Applied rewrites98.3%

                                                                                                  \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]

                                                                                                if 9.9999999999999996e290 < (*.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 21.6%

                                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                2. Add Preprocessing
                                                                                                3. Step-by-step derivation
                                                                                                  1. lift-pow.f64N/A

                                                                                                    \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  2. lift-/.f64N/A

                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  3. metadata-evalN/A

                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  4. unpow1/2N/A

                                                                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  5. lift-/.f64N/A

                                                                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  6. sqrt-divN/A

                                                                                                    \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  7. lower-/.f64N/A

                                                                                                    \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  8. lower-sqrt.f64N/A

                                                                                                    \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  9. lower-sqrt.f6423.5

                                                                                                    \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                4. Applied rewrites23.5%

                                                                                                  \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                5. Applied rewrites54.0%

                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                                6. Step-by-step derivation
                                                                                                  1. lift-*.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{2} \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  2. *-commutativeN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2} \cdot \frac{-1}{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  3. lift-pow.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  4. unpow2N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \left(M \cdot \frac{\frac{D}{d}}{2}\right)\right)} \cdot \frac{-1}{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  5. associate-*l*N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \frac{-1}{2}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  6. lower-*.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \frac{-1}{2}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  7. lift-*.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)} \cdot \left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \frac{-1}{2}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  8. *-commutativeN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\frac{\frac{D}{d}}{2} \cdot M\right)} \cdot \left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \frac{-1}{2}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  9. lower-*.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\frac{\frac{D}{d}}{2} \cdot M\right)} \cdot \left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \frac{-1}{2}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  10. lower-*.f6454.0

                                                                                                    \[\leadsto \mathsf{fma}\left(\left(\frac{\frac{D}{d}}{2} \cdot M\right) \cdot \color{blue}{\left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot -0.5\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  11. lift-*.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\left(\frac{\frac{D}{d}}{2} \cdot M\right) \cdot \left(\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)} \cdot \frac{-1}{2}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  12. *-commutativeN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\left(\frac{\frac{D}{d}}{2} \cdot M\right) \cdot \left(\color{blue}{\left(\frac{\frac{D}{d}}{2} \cdot M\right)} \cdot \frac{-1}{2}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  13. lower-*.f6454.0

                                                                                                    \[\leadsto \mathsf{fma}\left(\left(\frac{\frac{D}{d}}{2} \cdot M\right) \cdot \left(\color{blue}{\left(\frac{\frac{D}{d}}{2} \cdot M\right)} \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                7. Applied rewrites54.0%

                                                                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\frac{\frac{D}{d}}{2} \cdot M\right) \cdot \left(\left(\frac{\frac{D}{d}}{2} \cdot M\right) \cdot -0.5\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                              3. Recombined 3 regimes into one program.
                                                                                              4. Final simplification78.5%

                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 5 \cdot 10^{-229}:\\ \;\;\;\;\mathsf{fma}\left(\left(--0.5\right) \cdot \left(\frac{M \cdot D}{-2 \cdot d} \cdot \frac{D \cdot \frac{M}{2}}{d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(\frac{\frac{D}{d}}{2} \cdot M\right) \cdot \left(\left(\frac{\frac{D}{d}}{2} \cdot M\right) \cdot -0.5\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                                              5. Add Preprocessing

                                                                                              Alternative 14: 74.6% accurate, 0.3× speedup?

                                                                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_0 \leq 0 \lor \neg \left(t\_0 \leq 10^{+291}\right):\\ \;\;\;\;\mathsf{fma}\left(-0.5 \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot \left(D \cdot M\right)}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \end{array} \end{array} \]
                                                                                              (FPCore (d h l M D)
                                                                                               :precision binary64
                                                                                               (let* ((t_0
                                                                                                       (*
                                                                                                        (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                                                                        (-
                                                                                                         1.0
                                                                                                         (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))))
                                                                                                 (if (or (<= t_0 0.0) (not (<= t_0 1e+291)))
                                                                                                   (*
                                                                                                    (fma
                                                                                                     (* -0.5 (/ (* (* (/ D d) M) (* D M)) (* 2.0 (* 2.0 d))))
                                                                                                     (/ h l)
                                                                                                     1.0)
                                                                                                    (/ (fabs d) (sqrt (* l h))))
                                                                                                   (* (sqrt (/ d l)) (sqrt (/ d h))))))
                                                                                              double code(double d, double h, double l, double M, double D) {
                                                                                              	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                                              	double tmp;
                                                                                              	if ((t_0 <= 0.0) || !(t_0 <= 1e+291)) {
                                                                                              		tmp = fma((-0.5 * ((((D / d) * M) * (D * M)) / (2.0 * (2.0 * d)))), (h / l), 1.0) * (fabs(d) / sqrt((l * h)));
                                                                                              	} else {
                                                                                              		tmp = sqrt((d / l)) * sqrt((d / h));
                                                                                              	}
                                                                                              	return tmp;
                                                                                              }
                                                                                              
                                                                                              function code(d, h, l, M, D)
                                                                                              	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                                                              	tmp = 0.0
                                                                                              	if ((t_0 <= 0.0) || !(t_0 <= 1e+291))
                                                                                              		tmp = Float64(fma(Float64(-0.5 * Float64(Float64(Float64(Float64(D / d) * M) * Float64(D * M)) / Float64(2.0 * Float64(2.0 * d)))), Float64(h / l), 1.0) * Float64(abs(d) / sqrt(Float64(l * h))));
                                                                                              	else
                                                                                              		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                                                                                              	end
                                                                                              	return tmp
                                                                                              end
                                                                                              
                                                                                              code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, 0.0], N[Not[LessEqual[t$95$0, 1e+291]], $MachinePrecision]], N[(N[(N[(-0.5 * N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * N[(D * M), $MachinePrecision]), $MachinePrecision] / N[(2.0 * N[(2.0 * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
                                                                                              
                                                                                              \begin{array}{l}
                                                                                              
                                                                                              \\
                                                                                              \begin{array}{l}
                                                                                              t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                                                              \mathbf{if}\;t\_0 \leq 0 \lor \neg \left(t\_0 \leq 10^{+291}\right):\\
                                                                                              \;\;\;\;\mathsf{fma}\left(-0.5 \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot \left(D \cdot M\right)}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                                                              
                                                                                              \mathbf{else}:\\
                                                                                              \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
                                                                                              
                                                                                              
                                                                                              \end{array}
                                                                                              \end{array}
                                                                                              
                                                                                              Derivation
                                                                                              1. Split input into 2 regimes
                                                                                              2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 9.9999999999999996e290 < (*.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.8%

                                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                2. Add Preprocessing
                                                                                                3. Step-by-step derivation
                                                                                                  1. lift-pow.f64N/A

                                                                                                    \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  2. lift-/.f64N/A

                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  3. metadata-evalN/A

                                                                                                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  4. unpow1/2N/A

                                                                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  5. lift-/.f64N/A

                                                                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  6. sqrt-divN/A

                                                                                                    \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  7. lower-/.f64N/A

                                                                                                    \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  8. lower-sqrt.f64N/A

                                                                                                    \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  9. lower-sqrt.f6435.9

                                                                                                    \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                4. Applied rewrites35.9%

                                                                                                  \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                5. Applied rewrites70.7%

                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                                6. Step-by-step derivation
                                                                                                  1. unpow1N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}\right)}^{1}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  2. lift-pow.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}\right)}}^{1}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  3. unpow2N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \left(M \cdot \frac{\frac{D}{d}}{2}\right)\right)}}^{1}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  4. pow-prod-downN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{1} \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{1}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  5. pow-sqrN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{\left(2 \cdot 1\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  6. lift-*.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  7. lift-/.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \color{blue}{\frac{\frac{D}{d}}{2}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  8. lift-/.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{\color{blue}{\frac{D}{d}}}{2}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  9. associate-/l/N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \color{blue}{\frac{D}{d \cdot 2}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  10. *-commutativeN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  11. associate-/l*N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  12. metadata-evalN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{\color{blue}{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  13. unpow2N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  14. times-fracN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)} \cdot \frac{M \cdot D}{2 \cdot d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  15. lift-/.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{M}{2} \cdot \color{blue}{\frac{D}{d}}\right) \cdot \frac{M \cdot D}{2 \cdot d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  16. associate-*l/N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{M \cdot \frac{D}{d}}{2}} \cdot \frac{M \cdot D}{2 \cdot d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  17. frac-timesN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\frac{\left(M \cdot \frac{D}{d}\right) \cdot \left(M \cdot D\right)}{2 \cdot \left(2 \cdot d\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  18. lower-/.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\frac{\left(M \cdot \frac{D}{d}\right) \cdot \left(M \cdot D\right)}{2 \cdot \left(2 \cdot d\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  19. lower-*.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\color{blue}{\left(M \cdot \frac{D}{d}\right) \cdot \left(M \cdot D\right)}}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  20. *-commutativeN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\color{blue}{\left(\frac{D}{d} \cdot M\right)} \cdot \left(M \cdot D\right)}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  21. lower-*.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\color{blue}{\left(\frac{D}{d} \cdot M\right)} \cdot \left(M \cdot D\right)}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  22. *-commutativeN/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot \color{blue}{\left(D \cdot M\right)}}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                  23. lower-*.f64N/A

                                                                                                    \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot \color{blue}{\left(D \cdot M\right)}}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                7. Applied rewrites69.4%

                                                                                                  \[\leadsto \mathsf{fma}\left(-0.5 \cdot \color{blue}{\frac{\left(\frac{D}{d} \cdot M\right) \cdot \left(D \cdot M\right)}{2 \cdot \left(2 \cdot d\right)}}, \frac{h}{\ell}, 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.9999999999999996e290

                                                                                                1. Initial program 99.1%

                                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                2. Add Preprocessing
                                                                                                3. Taylor expanded in d around inf

                                                                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. *-commutativeN/A

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                  2. lower-*.f64N/A

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                  3. lower-sqrt.f64N/A

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                  4. lower-/.f64N/A

                                                                                                    \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                  5. *-commutativeN/A

                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                  6. lower-*.f6439.9

                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                5. Applied rewrites39.9%

                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                6. Step-by-step derivation
                                                                                                  1. Applied rewrites40.0%

                                                                                                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                                                                                                  2. Step-by-step derivation
                                                                                                    1. Applied rewrites98.1%

                                                                                                      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]
                                                                                                  3. Recombined 2 regimes into one program.
                                                                                                  4. Final simplification76.9%

                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 0 \lor \neg \left(\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+291}\right):\\ \;\;\;\;\mathsf{fma}\left(-0.5 \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot \left(D \cdot M\right)}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \end{array} \]
                                                                                                  5. Add Preprocessing

                                                                                                  Alternative 15: 75.4% accurate, 0.3× speedup?

                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;t\_0 \leq 5 \cdot 10^{-229}:\\ \;\;\;\;\mathsf{fma}\left(\left(--0.5\right) \cdot \left(\frac{M \cdot D}{-2 \cdot d} \cdot \frac{D \cdot \frac{M}{2}}{d}\right), \frac{h}{\ell}, 1\right) \cdot t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5 \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot \left(D \cdot M\right)}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot t\_1\\ \end{array} \end{array} \]
                                                                                                  (FPCore (d h l M D)
                                                                                                   :precision binary64
                                                                                                   (let* ((t_0
                                                                                                           (*
                                                                                                            (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                                                                            (-
                                                                                                             1.0
                                                                                                             (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                                                                                                          (t_1 (/ (fabs d) (sqrt (* l h)))))
                                                                                                     (if (<= t_0 5e-229)
                                                                                                       (*
                                                                                                        (fma
                                                                                                         (* (- -0.5) (* (/ (* M D) (* -2.0 d)) (/ (* D (/ M 2.0)) d)))
                                                                                                         (/ h l)
                                                                                                         1.0)
                                                                                                        t_1)
                                                                                                       (if (<= t_0 1e+291)
                                                                                                         (* (sqrt (/ d l)) (sqrt (/ d h)))
                                                                                                         (*
                                                                                                          (fma
                                                                                                           (* -0.5 (/ (* (* (/ D d) M) (* D M)) (* 2.0 (* 2.0 d))))
                                                                                                           (/ h l)
                                                                                                           1.0)
                                                                                                          t_1)))))
                                                                                                  double code(double d, double h, double l, double M, double D) {
                                                                                                  	double t_0 = (pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                                                  	double t_1 = fabs(d) / sqrt((l * h));
                                                                                                  	double tmp;
                                                                                                  	if (t_0 <= 5e-229) {
                                                                                                  		tmp = fma((-(-0.5) * (((M * D) / (-2.0 * d)) * ((D * (M / 2.0)) / d))), (h / l), 1.0) * t_1;
                                                                                                  	} else if (t_0 <= 1e+291) {
                                                                                                  		tmp = sqrt((d / l)) * sqrt((d / h));
                                                                                                  	} else {
                                                                                                  		tmp = fma((-0.5 * ((((D / d) * M) * (D * M)) / (2.0 * (2.0 * d)))), (h / l), 1.0) * t_1;
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  function code(d, h, l, M, D)
                                                                                                  	t_0 = Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                                                                  	t_1 = Float64(abs(d) / sqrt(Float64(l * h)))
                                                                                                  	tmp = 0.0
                                                                                                  	if (t_0 <= 5e-229)
                                                                                                  		tmp = Float64(fma(Float64(Float64(-(-0.5)) * Float64(Float64(Float64(M * D) / Float64(-2.0 * d)) * Float64(Float64(D * Float64(M / 2.0)) / d))), Float64(h / l), 1.0) * t_1);
                                                                                                  	elseif (t_0 <= 1e+291)
                                                                                                  		tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)));
                                                                                                  	else
                                                                                                  		tmp = Float64(fma(Float64(-0.5 * Float64(Float64(Float64(Float64(D / d) * M) * Float64(D * M)) / Float64(2.0 * Float64(2.0 * d)))), Float64(h / l), 1.0) * t_1);
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-229], N[(N[(N[((--0.5) * N[(N[(N[(M * D), $MachinePrecision] / N[(-2.0 * d), $MachinePrecision]), $MachinePrecision] * N[(N[(D * N[(M / 2.0), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t$95$0, 1e+291], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.5 * N[(N[(N[(N[(D / d), $MachinePrecision] * M), $MachinePrecision] * N[(D * M), $MachinePrecision]), $MachinePrecision] / N[(2.0 * N[(2.0 * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  
                                                                                                  \\
                                                                                                  \begin{array}{l}
                                                                                                  t_0 := \left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                                                                  t_1 := \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                                                                  \mathbf{if}\;t\_0 \leq 5 \cdot 10^{-229}:\\
                                                                                                  \;\;\;\;\mathsf{fma}\left(\left(--0.5\right) \cdot \left(\frac{M \cdot D}{-2 \cdot d} \cdot \frac{D \cdot \frac{M}{2}}{d}\right), \frac{h}{\ell}, 1\right) \cdot t\_1\\
                                                                                                  
                                                                                                  \mathbf{elif}\;t\_0 \leq 10^{+291}:\\
                                                                                                  \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;\mathsf{fma}\left(-0.5 \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot \left(D \cdot M\right)}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 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)))) < 5.00000000000000016e-229

                                                                                                    1. Initial program 81.0%

                                                                                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    2. Add Preprocessing
                                                                                                    3. Step-by-step derivation
                                                                                                      1. lift-pow.f64N/A

                                                                                                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      2. lift-/.f64N/A

                                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      3. metadata-evalN/A

                                                                                                        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      4. unpow1/2N/A

                                                                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      5. lift-/.f64N/A

                                                                                                        \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      6. sqrt-divN/A

                                                                                                        \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      7. lower-/.f64N/A

                                                                                                        \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      8. lower-sqrt.f64N/A

                                                                                                        \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      9. lower-sqrt.f6446.3

                                                                                                        \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    4. Applied rewrites46.3%

                                                                                                      \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    5. Applied rewrites84.9%

                                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                                    6. Step-by-step derivation
                                                                                                      1. unpow1N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}\right)}^{1}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      2. lift-pow.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}\right)}}^{1}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      3. unpow2N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \left(M \cdot \frac{\frac{D}{d}}{2}\right)\right)}}^{1}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      4. pow-prod-downN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{1} \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{1}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      5. pow-sqrN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{\left(2 \cdot 1\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      6. lift-*.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      7. lift-/.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \color{blue}{\frac{\frac{D}{d}}{2}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      8. lift-/.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{\color{blue}{\frac{D}{d}}}{2}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      9. associate-/l/N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \color{blue}{\frac{D}{d \cdot 2}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      10. *-commutativeN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      11. associate-/l*N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      12. metadata-evalN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{\color{blue}{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      13. unpow2N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      14. associate-/r*N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{\frac{M \cdot D}{2}}{d}} \cdot \frac{M \cdot D}{2 \cdot d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      15. associate-/r*N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{\frac{M \cdot D}{2}}{d} \cdot \color{blue}{\frac{\frac{M \cdot D}{2}}{d}}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      16. frac-timesN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\frac{\frac{M \cdot D}{2} \cdot \frac{M \cdot D}{2}}{d \cdot d}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      17. sqr-neg-revN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\frac{M \cdot D}{2} \cdot \frac{M \cdot D}{2}}{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \left(\mathsf{neg}\left(d\right)\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      18. times-fracN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)} \cdot \frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      19. lower-*.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)} \cdot \frac{\frac{M \cdot D}{2}}{\mathsf{neg}\left(d\right)}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                    7. Applied rewrites86.2%

                                                                                                      \[\leadsto \mathsf{fma}\left(-0.5 \cdot \color{blue}{\left(\frac{D \cdot \frac{M}{2}}{-d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                    8. Step-by-step derivation
                                                                                                      1. rem-square-sqrtN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\color{blue}{\sqrt{-d} \cdot \sqrt{-d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      2. sqrt-prodN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\color{blue}{\sqrt{\left(-d\right) \cdot \left(-d\right)}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      3. lift-neg.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \cdot \left(-d\right)}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      4. lift-neg.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\sqrt{\left(\mathsf{neg}\left(d\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(d\right)\right)}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      5. sqr-neg-revN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\sqrt{\color{blue}{d \cdot d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      6. sqrt-prodN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{D \cdot \frac{M}{2}}{\color{blue}{\sqrt{d} \cdot \sqrt{d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      7. rem-square-sqrt15.6

                                                                                                        \[\leadsto \mathsf{fma}\left(-0.5 \cdot \left(\frac{D \cdot \frac{M}{2}}{\color{blue}{d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      8. lower-/.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{D \cdot \frac{M}{2}}{d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      9. lift-*.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{\color{blue}{D \cdot \frac{M}{2}}}{d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      10. *-commutativeN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{\color{blue}{\frac{M}{2} \cdot D}}{d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      11. associate-*r/N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      12. lift-/.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\color{blue}{\frac{M}{2}} \cdot \frac{D}{d}\right) \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      13. times-fracN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      14. lift-*.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      15. lower-/.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      16. count-2-revN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{d + d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      17. rem-square-sqrtN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\sqrt{d} \cdot \sqrt{d}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      18. sqrt-prodN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\sqrt{d \cdot d}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      19. sqr-neg-revN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \left(\mathsf{neg}\left(d\right)\right)}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      20. lift-neg.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\sqrt{\color{blue}{\left(-d\right)} \cdot \left(\mathsf{neg}\left(d\right)\right)} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      21. lift-neg.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\sqrt{\left(-d\right) \cdot \color{blue}{\left(-d\right)}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      22. sqrt-prodN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\sqrt{-d} \cdot \sqrt{-d}} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      23. rem-square-sqrtN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\left(-d\right)} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      24. lift-neg.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\color{blue}{\left(\mathsf{neg}\left(d\right)\right)} + d} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      25. rem-square-sqrtN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \color{blue}{\sqrt{d} \cdot \sqrt{d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      26. sqrt-prodN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \color{blue}{\sqrt{d \cdot d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      27. sqr-neg-revN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \left(\mathsf{neg}\left(d\right)\right)}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      28. lift-neg.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \sqrt{\color{blue}{\left(-d\right)} \cdot \left(\mathsf{neg}\left(d\right)\right)}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      29. lift-neg.f64N/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \sqrt{\left(-d\right) \cdot \color{blue}{\left(-d\right)}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      30. sqrt-prodN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \color{blue}{\sqrt{-d} \cdot \sqrt{-d}}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      31. rem-square-sqrtN/A

                                                                                                        \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\frac{M \cdot D}{\left(\mathsf{neg}\left(d\right)\right) + \color{blue}{\left(-d\right)}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                    9. Applied rewrites86.2%

                                                                                                      \[\leadsto \mathsf{fma}\left(-0.5 \cdot \left(\color{blue}{\frac{M \cdot D}{-2 \cdot d}} \cdot \frac{D \cdot \frac{M}{2}}{-d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]

                                                                                                    if 5.00000000000000016e-229 < (*.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.9999999999999996e290

                                                                                                    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 \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. *-commutativeN/A

                                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                      2. lower-*.f64N/A

                                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                      3. lower-sqrt.f64N/A

                                                                                                        \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                      4. lower-/.f64N/A

                                                                                                        \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                      5. *-commutativeN/A

                                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                      6. lower-*.f6439.5

                                                                                                        \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                    5. Applied rewrites39.5%

                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                    6. Step-by-step derivation
                                                                                                      1. Applied rewrites39.6%

                                                                                                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                                                                                                      2. Step-by-step derivation
                                                                                                        1. Applied rewrites98.3%

                                                                                                          \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}} \]

                                                                                                        if 9.9999999999999996e290 < (*.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 21.6%

                                                                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        2. Add Preprocessing
                                                                                                        3. Step-by-step derivation
                                                                                                          1. lift-pow.f64N/A

                                                                                                            \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          2. lift-/.f64N/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          3. metadata-evalN/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          4. unpow1/2N/A

                                                                                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          5. lift-/.f64N/A

                                                                                                            \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          6. sqrt-divN/A

                                                                                                            \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          7. lower-/.f64N/A

                                                                                                            \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          8. lower-sqrt.f64N/A

                                                                                                            \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          9. lower-sqrt.f6423.5

                                                                                                            \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        4. Applied rewrites23.5%

                                                                                                          \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        5. Applied rewrites54.0%

                                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                                        6. Step-by-step derivation
                                                                                                          1. unpow1N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}\right)}^{1}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          2. lift-pow.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}\right)}}^{1}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          3. unpow2N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(\left(M \cdot \frac{\frac{D}{d}}{2}\right) \cdot \left(M \cdot \frac{\frac{D}{d}}{2}\right)\right)}}^{1}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          4. pow-prod-downN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{1} \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{1}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          5. pow-sqrN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{\left(2 \cdot 1\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          6. lift-*.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(M \cdot \frac{\frac{D}{d}}{2}\right)}}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          7. lift-/.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \color{blue}{\frac{\frac{D}{d}}{2}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          8. lift-/.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{\color{blue}{\frac{D}{d}}}{2}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          9. associate-/l/N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \color{blue}{\frac{D}{d \cdot 2}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          10. *-commutativeN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{D}{\color{blue}{2 \cdot d}}\right)}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          11. associate-/l*N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{\left(2 \cdot 1\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          12. metadata-evalN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{\color{blue}{2}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          13. unpow2N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          14. times-fracN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)} \cdot \frac{M \cdot D}{2 \cdot d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          15. lift-/.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\left(\frac{M}{2} \cdot \color{blue}{\frac{D}{d}}\right) \cdot \frac{M \cdot D}{2 \cdot d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          16. associate-*l/N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \left(\color{blue}{\frac{M \cdot \frac{D}{d}}{2}} \cdot \frac{M \cdot D}{2 \cdot d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          17. frac-timesN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\frac{\left(M \cdot \frac{D}{d}\right) \cdot \left(M \cdot D\right)}{2 \cdot \left(2 \cdot d\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          18. lower-/.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \color{blue}{\frac{\left(M \cdot \frac{D}{d}\right) \cdot \left(M \cdot D\right)}{2 \cdot \left(2 \cdot d\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          19. lower-*.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\color{blue}{\left(M \cdot \frac{D}{d}\right) \cdot \left(M \cdot D\right)}}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          20. *-commutativeN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\color{blue}{\left(\frac{D}{d} \cdot M\right)} \cdot \left(M \cdot D\right)}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          21. lower-*.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\color{blue}{\left(\frac{D}{d} \cdot M\right)} \cdot \left(M \cdot D\right)}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          22. *-commutativeN/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot \color{blue}{\left(D \cdot M\right)}}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                          23. lower-*.f64N/A

                                                                                                            \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot \color{blue}{\left(D \cdot M\right)}}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                        7. Applied rewrites52.8%

                                                                                                          \[\leadsto \mathsf{fma}\left(-0.5 \cdot \color{blue}{\frac{\left(\frac{D}{d} \cdot M\right) \cdot \left(D \cdot M\right)}{2 \cdot \left(2 \cdot d\right)}}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                      3. Recombined 3 regimes into one program.
                                                                                                      4. Final simplification78.1%

                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 5 \cdot 10^{-229}:\\ \;\;\;\;\mathsf{fma}\left(\left(--0.5\right) \cdot \left(\frac{M \cdot D}{-2 \cdot d} \cdot \frac{D \cdot \frac{M}{2}}{d}\right), \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+291}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-0.5 \cdot \frac{\left(\frac{D}{d} \cdot M\right) \cdot \left(D \cdot M\right)}{2 \cdot \left(2 \cdot d\right)}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                                                      5. Add Preprocessing

                                                                                                      Alternative 16: 45.6% accurate, 0.5× speedup?

                                                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -1 \cdot 10^{-83}:\\ \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
                                                                                                      (FPCore (d h l M D)
                                                                                                       :precision binary64
                                                                                                       (if (<=
                                                                                                            (*
                                                                                                             (* (pow (/ d h) (pow 2.0 -1.0)) (pow (/ d l) (pow 2.0 -1.0)))
                                                                                                             (- 1.0 (* (* (pow 2.0 -1.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))
                                                                                                            -1e-83)
                                                                                                         (* (sqrt (pow (* l h) -1.0)) d)
                                                                                                         (* 1.0 (/ (fabs d) (sqrt (* l h))))))
                                                                                                      double code(double d, double h, double l, double M, double D) {
                                                                                                      	double tmp;
                                                                                                      	if (((pow((d / h), pow(2.0, -1.0)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((pow(2.0, -1.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))) <= -1e-83) {
                                                                                                      		tmp = sqrt(pow((l * h), -1.0)) * d;
                                                                                                      	} else {
                                                                                                      		tmp = 1.0 * (fabs(d) / sqrt((l * h)));
                                                                                                      	}
                                                                                                      	return tmp;
                                                                                                      }
                                                                                                      
                                                                                                      module fmin_fmax_functions
                                                                                                          implicit none
                                                                                                          private
                                                                                                          public fmax
                                                                                                          public fmin
                                                                                                      
                                                                                                          interface fmax
                                                                                                              module procedure fmax88
                                                                                                              module procedure fmax44
                                                                                                              module procedure fmax84
                                                                                                              module procedure fmax48
                                                                                                          end interface
                                                                                                          interface fmin
                                                                                                              module procedure fmin88
                                                                                                              module procedure fmin44
                                                                                                              module procedure fmin84
                                                                                                              module procedure fmin48
                                                                                                          end interface
                                                                                                      contains
                                                                                                          real(8) function fmax88(x, y) result (res)
                                                                                                              real(8), intent (in) :: x
                                                                                                              real(8), intent (in) :: y
                                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(4) function fmax44(x, y) result (res)
                                                                                                              real(4), intent (in) :: x
                                                                                                              real(4), intent (in) :: y
                                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(8) function fmax84(x, y) result(res)
                                                                                                              real(8), intent (in) :: x
                                                                                                              real(4), intent (in) :: y
                                                                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(8) function fmax48(x, y) result(res)
                                                                                                              real(4), intent (in) :: x
                                                                                                              real(8), intent (in) :: y
                                                                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(8) function fmin88(x, y) result (res)
                                                                                                              real(8), intent (in) :: x
                                                                                                              real(8), intent (in) :: y
                                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(4) function fmin44(x, y) result (res)
                                                                                                              real(4), intent (in) :: x
                                                                                                              real(4), intent (in) :: y
                                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(8) function fmin84(x, y) result(res)
                                                                                                              real(8), intent (in) :: x
                                                                                                              real(4), intent (in) :: y
                                                                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                          end function
                                                                                                          real(8) function fmin48(x, y) result(res)
                                                                                                              real(4), intent (in) :: x
                                                                                                              real(8), intent (in) :: y
                                                                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                          end function
                                                                                                      end module
                                                                                                      
                                                                                                      real(8) function code(d, h, l, m, d_1)
                                                                                                      use fmin_fmax_functions
                                                                                                          real(8), intent (in) :: d
                                                                                                          real(8), intent (in) :: h
                                                                                                          real(8), intent (in) :: l
                                                                                                          real(8), intent (in) :: m
                                                                                                          real(8), intent (in) :: d_1
                                                                                                          real(8) :: tmp
                                                                                                          if (((((d / h) ** (2.0d0 ** (-1.0d0))) * ((d / l) ** (2.0d0 ** (-1.0d0)))) * (1.0d0 - (((2.0d0 ** (-1.0d0)) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))) <= (-1d-83)) then
                                                                                                              tmp = sqrt(((l * h) ** (-1.0d0))) * d
                                                                                                          else
                                                                                                              tmp = 1.0d0 * (abs(d) / sqrt((l * h)))
                                                                                                          end if
                                                                                                          code = tmp
                                                                                                      end function
                                                                                                      
                                                                                                      public static double code(double d, double h, double l, double M, double D) {
                                                                                                      	double tmp;
                                                                                                      	if (((Math.pow((d / h), Math.pow(2.0, -1.0)) * Math.pow((d / l), Math.pow(2.0, -1.0))) * (1.0 - ((Math.pow(2.0, -1.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))) <= -1e-83) {
                                                                                                      		tmp = Math.sqrt(Math.pow((l * h), -1.0)) * d;
                                                                                                      	} else {
                                                                                                      		tmp = 1.0 * (Math.abs(d) / Math.sqrt((l * h)));
                                                                                                      	}
                                                                                                      	return tmp;
                                                                                                      }
                                                                                                      
                                                                                                      def code(d, h, l, M, D):
                                                                                                      	tmp = 0
                                                                                                      	if ((math.pow((d / h), math.pow(2.0, -1.0)) * math.pow((d / l), math.pow(2.0, -1.0))) * (1.0 - ((math.pow(2.0, -1.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))) <= -1e-83:
                                                                                                      		tmp = math.sqrt(math.pow((l * h), -1.0)) * d
                                                                                                      	else:
                                                                                                      		tmp = 1.0 * (math.fabs(d) / math.sqrt((l * h)))
                                                                                                      	return tmp
                                                                                                      
                                                                                                      function code(d, h, l, M, D)
                                                                                                      	tmp = 0.0
                                                                                                      	if (Float64(Float64((Float64(d / h) ^ (2.0 ^ -1.0)) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64((2.0 ^ -1.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) <= -1e-83)
                                                                                                      		tmp = Float64(sqrt((Float64(l * h) ^ -1.0)) * d);
                                                                                                      	else
                                                                                                      		tmp = Float64(1.0 * Float64(abs(d) / sqrt(Float64(l * h))));
                                                                                                      	end
                                                                                                      	return tmp
                                                                                                      end
                                                                                                      
                                                                                                      function tmp_2 = code(d, h, l, M, D)
                                                                                                      	tmp = 0.0;
                                                                                                      	if (((((d / h) ^ (2.0 ^ -1.0)) * ((d / l) ^ (2.0 ^ -1.0))) * (1.0 - (((2.0 ^ -1.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)))) <= -1e-83)
                                                                                                      		tmp = sqrt(((l * h) ^ -1.0)) * d;
                                                                                                      	else
                                                                                                      		tmp = 1.0 * (abs(d) / sqrt((l * h)));
                                                                                                      	end
                                                                                                      	tmp_2 = tmp;
                                                                                                      end
                                                                                                      
                                                                                                      code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(N[Power[N[(d / h), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[2.0, -1.0], $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-83], N[(N[Sqrt[N[Power[N[(l * h), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision], N[(1.0 * N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                                      
                                                                                                      \begin{array}{l}
                                                                                                      
                                                                                                      \\
                                                                                                      \begin{array}{l}
                                                                                                      \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -1 \cdot 10^{-83}:\\
                                                                                                      \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\
                                                                                                      
                                                                                                      \mathbf{else}:\\
                                                                                                      \;\;\;\;1 \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\
                                                                                                      
                                                                                                      
                                                                                                      \end{array}
                                                                                                      \end{array}
                                                                                                      
                                                                                                      Derivation
                                                                                                      1. Split input into 2 regimes
                                                                                                      2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -1e-83

                                                                                                        1. Initial program 90.8%

                                                                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        2. Add Preprocessing
                                                                                                        3. Taylor expanded in d around inf

                                                                                                          \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                        4. Step-by-step derivation
                                                                                                          1. *-commutativeN/A

                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                          2. lower-*.f64N/A

                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                          3. lower-sqrt.f64N/A

                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                          4. lower-/.f64N/A

                                                                                                            \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                          5. *-commutativeN/A

                                                                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                          6. lower-*.f6412.9

                                                                                                            \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                        5. Applied rewrites12.9%

                                                                                                          \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]

                                                                                                        if -1e-83 < (*.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.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-pow.f64N/A

                                                                                                            \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          2. lift-/.f64N/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          3. metadata-evalN/A

                                                                                                            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          4. unpow1/2N/A

                                                                                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          5. lift-/.f64N/A

                                                                                                            \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          6. sqrt-divN/A

                                                                                                            \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          7. lower-/.f64N/A

                                                                                                            \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          8. lower-sqrt.f64N/A

                                                                                                            \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          9. lower-sqrt.f6434.0

                                                                                                            \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        4. Applied rewrites34.0%

                                                                                                          \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        5. Applied rewrites65.5%

                                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                                        6. Taylor expanded in d around inf

                                                                                                          \[\leadsto \color{blue}{1} \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                        7. Step-by-step derivation
                                                                                                          1. Applied rewrites61.2%

                                                                                                            \[\leadsto \color{blue}{1} \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \]
                                                                                                        8. Recombined 2 regimes into one program.
                                                                                                        9. Final simplification45.3%

                                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left({2}^{-1}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left({2}^{-1} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -1 \cdot 10^{-83}:\\ \;\;\;\;\sqrt{{\left(\ell \cdot h\right)}^{-1}} \cdot d\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                                                        10. Add Preprocessing

                                                                                                        Alternative 17: 77.6% accurate, 1.2× speedup?

                                                                                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{D}{d}}{2}\\ \mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left(t\_0 \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(0.5 \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right)\\ \mathbf{elif}\;d \leq 1.12 \cdot 10^{-169}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{h}{\ell}, {\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2} \cdot -0.5, 1\right) \cdot d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot t\_0\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \end{array} \]
                                                                                                        (FPCore (d h l M D)
                                                                                                         :precision binary64
                                                                                                         (let* ((t_0 (/ (/ D d) 2.0)))
                                                                                                           (if (<= d -2e-310)
                                                                                                             (*
                                                                                                              (* (/ (sqrt (- d)) (sqrt (- h))) (pow (/ d l) (pow 2.0 -1.0)))
                                                                                                              (- 1.0 (* (* t_0 (* M (/ h l))) (* (* 0.5 (/ D 2.0)) (/ M d)))))
                                                                                                             (if (<= d 1.12e-169)
                                                                                                               (/
                                                                                                                (* (fma (/ h l) (* (pow (* 0.5 (/ (* M D) d)) 2.0) -0.5) 1.0) d)
                                                                                                                (sqrt (* l h)))
                                                                                                               (/
                                                                                                                (*
                                                                                                                 (fma (* -0.5 (pow (* M t_0) 2.0)) (/ h l) 1.0)
                                                                                                                 (/ (fabs d) (sqrt l)))
                                                                                                                (sqrt h))))))
                                                                                                        double code(double d, double h, double l, double M, double D) {
                                                                                                        	double t_0 = (D / d) / 2.0;
                                                                                                        	double tmp;
                                                                                                        	if (d <= -2e-310) {
                                                                                                        		tmp = ((sqrt(-d) / sqrt(-h)) * pow((d / l), pow(2.0, -1.0))) * (1.0 - ((t_0 * (M * (h / l))) * ((0.5 * (D / 2.0)) * (M / d))));
                                                                                                        	} else if (d <= 1.12e-169) {
                                                                                                        		tmp = (fma((h / l), (pow((0.5 * ((M * D) / d)), 2.0) * -0.5), 1.0) * d) / sqrt((l * h));
                                                                                                        	} else {
                                                                                                        		tmp = (fma((-0.5 * pow((M * t_0), 2.0)), (h / l), 1.0) * (fabs(d) / sqrt(l))) / sqrt(h);
                                                                                                        	}
                                                                                                        	return tmp;
                                                                                                        }
                                                                                                        
                                                                                                        function code(d, h, l, M, D)
                                                                                                        	t_0 = Float64(Float64(D / d) / 2.0)
                                                                                                        	tmp = 0.0
                                                                                                        	if (d <= -2e-310)
                                                                                                        		tmp = Float64(Float64(Float64(sqrt(Float64(-d)) / sqrt(Float64(-h))) * (Float64(d / l) ^ (2.0 ^ -1.0))) * Float64(1.0 - Float64(Float64(t_0 * Float64(M * Float64(h / l))) * Float64(Float64(0.5 * Float64(D / 2.0)) * Float64(M / d)))));
                                                                                                        	elseif (d <= 1.12e-169)
                                                                                                        		tmp = Float64(Float64(fma(Float64(h / l), Float64((Float64(0.5 * Float64(Float64(M * D) / d)) ^ 2.0) * -0.5), 1.0) * d) / sqrt(Float64(l * h)));
                                                                                                        	else
                                                                                                        		tmp = Float64(Float64(fma(Float64(-0.5 * (Float64(M * t_0) ^ 2.0)), Float64(h / l), 1.0) * Float64(abs(d) / sqrt(l))) / sqrt(h));
                                                                                                        	end
                                                                                                        	return tmp
                                                                                                        end
                                                                                                        
                                                                                                        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D / d), $MachinePrecision] / 2.0), $MachinePrecision]}, If[LessEqual[d, -2e-310], N[(N[(N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[Power[2.0, -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(t$95$0 * N[(M * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(0.5 * N[(D / 2.0), $MachinePrecision]), $MachinePrecision] * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.12e-169], N[(N[(N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(0.5 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision] + 1.0), $MachinePrecision] * d), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(-0.5 * N[Power[N[(M * t$95$0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[Abs[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]]]]
                                                                                                        
                                                                                                        \begin{array}{l}
                                                                                                        
                                                                                                        \\
                                                                                                        \begin{array}{l}
                                                                                                        t_0 := \frac{\frac{D}{d}}{2}\\
                                                                                                        \mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\
                                                                                                        \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left(t\_0 \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(0.5 \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right)\\
                                                                                                        
                                                                                                        \mathbf{elif}\;d \leq 1.12 \cdot 10^{-169}:\\
                                                                                                        \;\;\;\;\frac{\mathsf{fma}\left(\frac{h}{\ell}, {\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2} \cdot -0.5, 1\right) \cdot d}{\sqrt{\ell \cdot h}}\\
                                                                                                        
                                                                                                        \mathbf{else}:\\
                                                                                                        \;\;\;\;\frac{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot t\_0\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell}}}{\sqrt{h}}\\
                                                                                                        
                                                                                                        
                                                                                                        \end{array}
                                                                                                        \end{array}
                                                                                                        
                                                                                                        Derivation
                                                                                                        1. Split input into 3 regimes
                                                                                                        2. if d < -1.999999999999994e-310

                                                                                                          1. Initial program 62.7%

                                                                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          2. Add Preprocessing
                                                                                                          3. Step-by-step derivation
                                                                                                            1. lift-*.f64N/A

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
                                                                                                            2. *-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 - \color{blue}{\frac{h}{\ell} \cdot \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}\right) \]
                                                                                                            3. 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{h}{\ell} \cdot \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)}\right) \]
                                                                                                            4. *-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{h}{\ell} \cdot \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)}\right) \]
                                                                                                            5. 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{h}{\ell} \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right)\right) \]
                                                                                                            6. 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{h}{\ell} \cdot \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right)\right) \]
                                                                                                            7. 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{h}{\ell} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)}\right) \]
                                                                                                            8. associate-*r*N/A

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{h}{\ell} \cdot \frac{M \cdot D}{2 \cdot d}\right) \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)}\right) \]
                                                                                                            9. *-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 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right)} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\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 \left(1 - \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right) \cdot \color{blue}{\left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right)}\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 \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{h}{\ell}\right) \cdot \left(\frac{1}{2} \cdot \frac{M \cdot D}{2 \cdot d}\right)}\right) \]
                                                                                                          4. Applied rewrites60.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 - \color{blue}{\left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(0.5 \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)}\right) \]
                                                                                                          5. Step-by-step derivation
                                                                                                            1. lift-/.f64N/A

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            2. metadata-eval60.2

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(0.5 \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            3. lift-pow.f64N/A

                                                                                                              \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            4. unpow1/2N/A

                                                                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            5. lift-/.f64N/A

                                                                                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            6. frac-2negN/A

                                                                                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            7. sqrt-divN/A

                                                                                                              \[\leadsto \left(\color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            8. lower-/.f64N/A

                                                                                                              \[\leadsto \left(\color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            9. lower-sqrt.f64N/A

                                                                                                              \[\leadsto \left(\frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(h\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            10. lower-neg.f64N/A

                                                                                                              \[\leadsto \left(\frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(h\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            11. lower-sqrt.f64N/A

                                                                                                              \[\leadsto \left(\frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(h\right)}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(\frac{1}{2} \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                            12. lower-neg.f6473.5

                                                                                                              \[\leadsto \left(\frac{\sqrt{-d}}{\sqrt{\color{blue}{-h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(0.5 \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]
                                                                                                          6. Applied rewrites73.5%

                                                                                                            \[\leadsto \left(\color{blue}{\frac{\sqrt{-d}}{\sqrt{-h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(0.5 \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right) \]

                                                                                                          if -1.999999999999994e-310 < d < 1.11999999999999998e-169

                                                                                                          1. Initial program 42.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(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            2. lift-/.f64N/A

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            3. metadata-evalN/A

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            4. unpow1/2N/A

                                                                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            5. lift-/.f64N/A

                                                                                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            6. sqrt-divN/A

                                                                                                              \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            7. lower-/.f64N/A

                                                                                                              \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            8. lower-sqrt.f64N/A

                                                                                                              \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            9. lower-sqrt.f6449.4

                                                                                                              \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          4. Applied rewrites49.4%

                                                                                                            \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          5. Applied rewrites62.2%

                                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                                          6. Step-by-step derivation
                                                                                                            1. lift-*.f64N/A

                                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                                            2. lift-/.f64N/A

                                                                                                              \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                                            3. associate-*r/N/A

                                                                                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                                            4. lower-/.f64N/A

                                                                                                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{-1}{2} \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \left|d\right|}{\sqrt{\ell \cdot h}}} \]
                                                                                                          7. Applied rewrites73.0%

                                                                                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{h}{\ell}, {\left(\frac{\frac{D}{d}}{2} \cdot M\right)}^{2} \cdot -0.5, 1\right) \cdot d}{\sqrt{\ell \cdot h}}} \]
                                                                                                          8. Taylor expanded in d around 0

                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\frac{h}{\ell}, {\color{blue}{\left(\frac{1}{2} \cdot \frac{D \cdot M}{d}\right)}}^{2} \cdot \frac{-1}{2}, 1\right) \cdot d}{\sqrt{\ell \cdot h}} \]
                                                                                                          9. Step-by-step derivation
                                                                                                            1. lower-*.f64N/A

                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\frac{h}{\ell}, {\color{blue}{\left(\frac{1}{2} \cdot \frac{D \cdot M}{d}\right)}}^{2} \cdot \frac{-1}{2}, 1\right) \cdot d}{\sqrt{\ell \cdot h}} \]
                                                                                                            2. lower-/.f64N/A

                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\frac{h}{\ell}, {\left(\frac{1}{2} \cdot \color{blue}{\frac{D \cdot M}{d}}\right)}^{2} \cdot \frac{-1}{2}, 1\right) \cdot d}{\sqrt{\ell \cdot h}} \]
                                                                                                            3. *-commutativeN/A

                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\frac{h}{\ell}, {\left(\frac{1}{2} \cdot \frac{\color{blue}{M \cdot D}}{d}\right)}^{2} \cdot \frac{-1}{2}, 1\right) \cdot d}{\sqrt{\ell \cdot h}} \]
                                                                                                            4. lower-*.f6476.4

                                                                                                              \[\leadsto \frac{\mathsf{fma}\left(\frac{h}{\ell}, {\left(0.5 \cdot \frac{\color{blue}{M \cdot D}}{d}\right)}^{2} \cdot -0.5, 1\right) \cdot d}{\sqrt{\ell \cdot h}} \]
                                                                                                          10. Applied rewrites76.4%

                                                                                                            \[\leadsto \frac{\mathsf{fma}\left(\frac{h}{\ell}, {\color{blue}{\left(0.5 \cdot \frac{M \cdot D}{d}\right)}}^{2} \cdot -0.5, 1\right) \cdot d}{\sqrt{\ell \cdot h}} \]

                                                                                                          if 1.11999999999999998e-169 < d

                                                                                                          1. Initial program 76.1%

                                                                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          2. Add Preprocessing
                                                                                                          3. Step-by-step derivation
                                                                                                            1. lift-pow.f64N/A

                                                                                                              \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            2. lift-/.f64N/A

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            3. metadata-evalN/A

                                                                                                              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            4. unpow1/2N/A

                                                                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            5. lift-/.f64N/A

                                                                                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            6. sqrt-divN/A

                                                                                                              \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            7. lower-/.f64N/A

                                                                                                              \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            8. lower-sqrt.f64N/A

                                                                                                              \[\leadsto \left(\frac{\color{blue}{\sqrt{d}}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            9. lower-sqrt.f6484.4

                                                                                                              \[\leadsto \left(\frac{\sqrt{d}}{\color{blue}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          4. Applied rewrites84.4%

                                                                                                            \[\leadsto \left(\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          5. Applied rewrites90.0%

                                                                                                            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell}}}{\sqrt{h}}} \]
                                                                                                        3. Recombined 3 regimes into one program.
                                                                                                        4. Final simplification80.3%

                                                                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot {\left(\frac{d}{\ell}\right)}^{\left({2}^{-1}\right)}\right) \cdot \left(1 - \left(\frac{\frac{D}{d}}{2} \cdot \left(M \cdot \frac{h}{\ell}\right)\right) \cdot \left(\left(0.5 \cdot \frac{D}{2}\right) \cdot \frac{M}{d}\right)\right)\\ \mathbf{elif}\;d \leq 1.12 \cdot 10^{-169}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{h}{\ell}, {\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2} \cdot -0.5, 1\right) \cdot d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.5 \cdot {\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{h}{\ell}, 1\right) \cdot \frac{\left|d\right|}{\sqrt{\ell}}}{\sqrt{h}}\\ \end{array} \]
                                                                                                        5. Add Preprocessing

                                                                                                        Alternative 18: 42.6% accurate, 11.8× speedup?

                                                                                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ \mathbf{if}\;\ell \leq -9.8 \cdot 10^{-266}:\\ \;\;\;\;\frac{-d}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{t\_0}\\ \end{array} \end{array} \]
                                                                                                        (FPCore (d h l M D)
                                                                                                         :precision binary64
                                                                                                         (let* ((t_0 (sqrt (* l h)))) (if (<= l -9.8e-266) (/ (- d) t_0) (/ d t_0))))
                                                                                                        double code(double d, double h, double l, double M, double D) {
                                                                                                        	double t_0 = sqrt((l * h));
                                                                                                        	double tmp;
                                                                                                        	if (l <= -9.8e-266) {
                                                                                                        		tmp = -d / t_0;
                                                                                                        	} else {
                                                                                                        		tmp = d / t_0;
                                                                                                        	}
                                                                                                        	return tmp;
                                                                                                        }
                                                                                                        
                                                                                                        module fmin_fmax_functions
                                                                                                            implicit none
                                                                                                            private
                                                                                                            public fmax
                                                                                                            public fmin
                                                                                                        
                                                                                                            interface fmax
                                                                                                                module procedure fmax88
                                                                                                                module procedure fmax44
                                                                                                                module procedure fmax84
                                                                                                                module procedure fmax48
                                                                                                            end interface
                                                                                                            interface fmin
                                                                                                                module procedure fmin88
                                                                                                                module procedure fmin44
                                                                                                                module procedure fmin84
                                                                                                                module procedure fmin48
                                                                                                            end interface
                                                                                                        contains
                                                                                                            real(8) function fmax88(x, y) result (res)
                                                                                                                real(8), intent (in) :: x
                                                                                                                real(8), intent (in) :: y
                                                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                            end function
                                                                                                            real(4) function fmax44(x, y) result (res)
                                                                                                                real(4), intent (in) :: x
                                                                                                                real(4), intent (in) :: y
                                                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                            end function
                                                                                                            real(8) function fmax84(x, y) result(res)
                                                                                                                real(8), intent (in) :: x
                                                                                                                real(4), intent (in) :: y
                                                                                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                            end function
                                                                                                            real(8) function fmax48(x, y) result(res)
                                                                                                                real(4), intent (in) :: x
                                                                                                                real(8), intent (in) :: y
                                                                                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                            end function
                                                                                                            real(8) function fmin88(x, y) result (res)
                                                                                                                real(8), intent (in) :: x
                                                                                                                real(8), intent (in) :: y
                                                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                            end function
                                                                                                            real(4) function fmin44(x, y) result (res)
                                                                                                                real(4), intent (in) :: x
                                                                                                                real(4), intent (in) :: y
                                                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                            end function
                                                                                                            real(8) function fmin84(x, y) result(res)
                                                                                                                real(8), intent (in) :: x
                                                                                                                real(4), intent (in) :: y
                                                                                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                            end function
                                                                                                            real(8) function fmin48(x, y) result(res)
                                                                                                                real(4), intent (in) :: x
                                                                                                                real(8), intent (in) :: y
                                                                                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                            end function
                                                                                                        end module
                                                                                                        
                                                                                                        real(8) function code(d, h, l, m, d_1)
                                                                                                        use fmin_fmax_functions
                                                                                                            real(8), intent (in) :: d
                                                                                                            real(8), intent (in) :: h
                                                                                                            real(8), intent (in) :: l
                                                                                                            real(8), intent (in) :: m
                                                                                                            real(8), intent (in) :: d_1
                                                                                                            real(8) :: t_0
                                                                                                            real(8) :: tmp
                                                                                                            t_0 = sqrt((l * h))
                                                                                                            if (l <= (-9.8d-266)) then
                                                                                                                tmp = -d / t_0
                                                                                                            else
                                                                                                                tmp = d / t_0
                                                                                                            end if
                                                                                                            code = tmp
                                                                                                        end function
                                                                                                        
                                                                                                        public static double code(double d, double h, double l, double M, double D) {
                                                                                                        	double t_0 = Math.sqrt((l * h));
                                                                                                        	double tmp;
                                                                                                        	if (l <= -9.8e-266) {
                                                                                                        		tmp = -d / t_0;
                                                                                                        	} else {
                                                                                                        		tmp = d / t_0;
                                                                                                        	}
                                                                                                        	return tmp;
                                                                                                        }
                                                                                                        
                                                                                                        def code(d, h, l, M, D):
                                                                                                        	t_0 = math.sqrt((l * h))
                                                                                                        	tmp = 0
                                                                                                        	if l <= -9.8e-266:
                                                                                                        		tmp = -d / t_0
                                                                                                        	else:
                                                                                                        		tmp = d / t_0
                                                                                                        	return tmp
                                                                                                        
                                                                                                        function code(d, h, l, M, D)
                                                                                                        	t_0 = sqrt(Float64(l * h))
                                                                                                        	tmp = 0.0
                                                                                                        	if (l <= -9.8e-266)
                                                                                                        		tmp = Float64(Float64(-d) / t_0);
                                                                                                        	else
                                                                                                        		tmp = Float64(d / t_0);
                                                                                                        	end
                                                                                                        	return tmp
                                                                                                        end
                                                                                                        
                                                                                                        function tmp_2 = code(d, h, l, M, D)
                                                                                                        	t_0 = sqrt((l * h));
                                                                                                        	tmp = 0.0;
                                                                                                        	if (l <= -9.8e-266)
                                                                                                        		tmp = -d / t_0;
                                                                                                        	else
                                                                                                        		tmp = d / t_0;
                                                                                                        	end
                                                                                                        	tmp_2 = tmp;
                                                                                                        end
                                                                                                        
                                                                                                        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -9.8e-266], N[((-d) / t$95$0), $MachinePrecision], N[(d / t$95$0), $MachinePrecision]]]
                                                                                                        
                                                                                                        \begin{array}{l}
                                                                                                        
                                                                                                        \\
                                                                                                        \begin{array}{l}
                                                                                                        t_0 := \sqrt{\ell \cdot h}\\
                                                                                                        \mathbf{if}\;\ell \leq -9.8 \cdot 10^{-266}:\\
                                                                                                        \;\;\;\;\frac{-d}{t\_0}\\
                                                                                                        
                                                                                                        \mathbf{else}:\\
                                                                                                        \;\;\;\;\frac{d}{t\_0}\\
                                                                                                        
                                                                                                        
                                                                                                        \end{array}
                                                                                                        \end{array}
                                                                                                        
                                                                                                        Derivation
                                                                                                        1. Split input into 2 regimes
                                                                                                        2. if l < -9.8000000000000005e-266

                                                                                                          1. Initial program 61.8%

                                                                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          2. Add Preprocessing
                                                                                                          3. Taylor expanded in d around inf

                                                                                                            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. *-commutativeN/A

                                                                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                            2. lower-*.f64N/A

                                                                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                            3. lower-sqrt.f64N/A

                                                                                                              \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                            4. lower-/.f64N/A

                                                                                                              \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                            5. *-commutativeN/A

                                                                                                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                            6. lower-*.f647.6

                                                                                                              \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                          5. Applied rewrites7.6%

                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                          6. Step-by-step derivation
                                                                                                            1. Applied rewrites6.8%

                                                                                                              \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                                                                                                            2. Step-by-step derivation
                                                                                                              1. Applied rewrites6.8%

                                                                                                                \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                                                              2. Step-by-step derivation
                                                                                                                1. Applied rewrites40.4%

                                                                                                                  \[\leadsto \frac{d}{\color{blue}{-\sqrt{\ell \cdot h}}} \]

                                                                                                                if -9.8000000000000005e-266 < l

                                                                                                                1. Initial program 68.9%

                                                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                2. Add Preprocessing
                                                                                                                3. Taylor expanded in d around inf

                                                                                                                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. *-commutativeN/A

                                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                                  2. lower-*.f64N/A

                                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                                  3. lower-sqrt.f64N/A

                                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                                  4. lower-/.f64N/A

                                                                                                                    \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                                  5. *-commutativeN/A

                                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                  6. lower-*.f6445.0

                                                                                                                    \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                5. Applied rewrites45.0%

                                                                                                                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                6. Step-by-step derivation
                                                                                                                  1. Applied rewrites45.0%

                                                                                                                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                                                                                                                  2. Step-by-step derivation
                                                                                                                    1. Applied rewrites45.1%

                                                                                                                      \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                                                                  3. Recombined 2 regimes into one program.
                                                                                                                  4. Final simplification42.9%

                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -9.8 \cdot 10^{-266}:\\ \;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
                                                                                                                  5. Add Preprocessing

                                                                                                                  Alternative 19: 26.3% accurate, 15.3× speedup?

                                                                                                                  \[\begin{array}{l} \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
                                                                                                                  (FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
                                                                                                                  double code(double d, double h, double l, double M, double D) {
                                                                                                                  	return d / sqrt((l * h));
                                                                                                                  }
                                                                                                                  
                                                                                                                  module fmin_fmax_functions
                                                                                                                      implicit none
                                                                                                                      private
                                                                                                                      public fmax
                                                                                                                      public fmin
                                                                                                                  
                                                                                                                      interface fmax
                                                                                                                          module procedure fmax88
                                                                                                                          module procedure fmax44
                                                                                                                          module procedure fmax84
                                                                                                                          module procedure fmax48
                                                                                                                      end interface
                                                                                                                      interface fmin
                                                                                                                          module procedure fmin88
                                                                                                                          module procedure fmin44
                                                                                                                          module procedure fmin84
                                                                                                                          module procedure fmin48
                                                                                                                      end interface
                                                                                                                  contains
                                                                                                                      real(8) function fmax88(x, y) result (res)
                                                                                                                          real(8), intent (in) :: x
                                                                                                                          real(8), intent (in) :: y
                                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(4) function fmax44(x, y) result (res)
                                                                                                                          real(4), intent (in) :: x
                                                                                                                          real(4), intent (in) :: y
                                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(8) function fmax84(x, y) result(res)
                                                                                                                          real(8), intent (in) :: x
                                                                                                                          real(4), intent (in) :: y
                                                                                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(8) function fmax48(x, y) result(res)
                                                                                                                          real(4), intent (in) :: x
                                                                                                                          real(8), intent (in) :: y
                                                                                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(8) function fmin88(x, y) result (res)
                                                                                                                          real(8), intent (in) :: x
                                                                                                                          real(8), intent (in) :: y
                                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(4) function fmin44(x, y) result (res)
                                                                                                                          real(4), intent (in) :: x
                                                                                                                          real(4), intent (in) :: y
                                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(8) function fmin84(x, y) result(res)
                                                                                                                          real(8), intent (in) :: x
                                                                                                                          real(4), intent (in) :: y
                                                                                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(8) function fmin48(x, y) result(res)
                                                                                                                          real(4), intent (in) :: x
                                                                                                                          real(8), intent (in) :: y
                                                                                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                  end module
                                                                                                                  
                                                                                                                  real(8) function code(d, h, l, m, d_1)
                                                                                                                  use fmin_fmax_functions
                                                                                                                      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 65.7%

                                                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                  2. Add Preprocessing
                                                                                                                  3. Taylor expanded in d around inf

                                                                                                                    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                                                                                                                  4. Step-by-step derivation
                                                                                                                    1. *-commutativeN/A

                                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                                    2. lower-*.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot d} \]
                                                                                                                    3. lower-sqrt.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                                    4. lower-/.f64N/A

                                                                                                                      \[\leadsto \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \cdot d \]
                                                                                                                    5. *-commutativeN/A

                                                                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                    6. lower-*.f6427.8

                                                                                                                      \[\leadsto \sqrt{\frac{1}{\color{blue}{\ell \cdot h}}} \cdot d \]
                                                                                                                  5. Applied rewrites27.8%

                                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                                                                                                                  6. Step-by-step derivation
                                                                                                                    1. Applied rewrites27.4%

                                                                                                                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                                                                                                                    2. Step-by-step derivation
                                                                                                                      1. Applied rewrites27.5%

                                                                                                                        \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                                                                      2. Add Preprocessing

                                                                                                                      Reproduce

                                                                                                                      ?
                                                                                                                      herbie shell --seed 2024358 
                                                                                                                      (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)))))