Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.6% → 73.7%
Time: 9.4s
Alternatives: 24
Speedup: 1.8×

Specification

?
\[\begin{array}{l} \\ \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (*
  (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
  (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
double code(double d, double h, double l, double M, double D) {
	return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
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}

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 24 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.6% 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: 73.7% accurate, 1.6× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ t_1 := M \cdot \frac{D}{d + d}\\ t_2 := 1 - \frac{\left(\left(t\_1 \cdot t\_1\right) \cdot 0.5\right) \cdot h}{\ell}\\ \mathbf{if}\;\ell \leq -4.8 \cdot 10^{+53}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{t\_1 \cdot \left(\frac{\left(M \cdot D\right) \cdot 0.5}{d + d} \cdot h\right)}{\ell}\right)\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t\_0 \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(-t\_0\right) \cdot t\_2\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* d (- (sqrt (/ 1.0 (* l h))))))
        (t_1 (* M (/ D (+ d d))))
        (t_2 (- 1.0 (/ (* (* (* t_1 t_1) 0.5) h) l))))
   (if (<= l -4.8e+53)
     (*
      (* (sqrt (/ d l)) (sqrt (/ d h)))
      (- 1.0 (/ (* t_1 (* (/ (* (* M D) 0.5) (+ d d)) h)) l)))
     (if (<= l -5e-310) (* t_0 t_2) (* (- t_0) t_2)))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = d * -sqrt((1.0 / (l * h)));
	double t_1 = M * (D / (d + d));
	double t_2 = 1.0 - ((((t_1 * t_1) * 0.5) * h) / l);
	double tmp;
	if (l <= -4.8e+53) {
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((t_1 * ((((M * D) * 0.5) / (d + d)) * h)) / l));
	} else if (l <= -5e-310) {
		tmp = t_0 * t_2;
	} else {
		tmp = -t_0 * t_2;
	}
	return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = d * -sqrt((1.0d0 / (l * h)))
    t_1 = m * (d_1 / (d + d))
    t_2 = 1.0d0 - ((((t_1 * t_1) * 0.5d0) * h) / l)
    if (l <= (-4.8d+53)) then
        tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - ((t_1 * ((((m * d_1) * 0.5d0) / (d + d)) * h)) / l))
    else if (l <= (-5d-310)) then
        tmp = t_0 * t_2
    else
        tmp = -t_0 * t_2
    end if
    code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = d * -Math.sqrt((1.0 / (l * h)));
	double t_1 = M * (D / (d + d));
	double t_2 = 1.0 - ((((t_1 * t_1) * 0.5) * h) / l);
	double tmp;
	if (l <= -4.8e+53) {
		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - ((t_1 * ((((M * D) * 0.5) / (d + d)) * h)) / l));
	} else if (l <= -5e-310) {
		tmp = t_0 * t_2;
	} else {
		tmp = -t_0 * t_2;
	}
	return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D])
def code(d, h, l, M, D):
	t_0 = d * -math.sqrt((1.0 / (l * h)))
	t_1 = M * (D / (d + d))
	t_2 = 1.0 - ((((t_1 * t_1) * 0.5) * h) / l)
	tmp = 0
	if l <= -4.8e+53:
		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - ((t_1 * ((((M * D) * 0.5) / (d + d)) * h)) / l))
	elif l <= -5e-310:
		tmp = t_0 * t_2
	else:
		tmp = -t_0 * t_2
	return tmp
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(d * Float64(-sqrt(Float64(1.0 / Float64(l * h)))))
	t_1 = Float64(M * Float64(D / Float64(d + d)))
	t_2 = Float64(1.0 - Float64(Float64(Float64(Float64(t_1 * t_1) * 0.5) * h) / l))
	tmp = 0.0
	if (l <= -4.8e+53)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(t_1 * Float64(Float64(Float64(Float64(M * D) * 0.5) / Float64(d + d)) * h)) / l)));
	elseif (l <= -5e-310)
		tmp = Float64(t_0 * t_2);
	else
		tmp = Float64(Float64(-t_0) * t_2);
	end
	return tmp
end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = d * -sqrt((1.0 / (l * h)));
	t_1 = M * (D / (d + d));
	t_2 = 1.0 - ((((t_1 * t_1) * 0.5) * h) / l);
	tmp = 0.0;
	if (l <= -4.8e+53)
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((t_1 * ((((M * D) * 0.5) / (d + d)) * h)) / l));
	elseif (l <= -5e-310)
		tmp = t_0 * t_2;
	else
		tmp = -t_0 * t_2;
	end
	tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d * (-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$1 = N[(M * N[(D / N[(d + d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - N[(N[(N[(N[(t$95$1 * t$95$1), $MachinePrecision] * 0.5), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -4.8e+53], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(t$95$1 * N[(N[(N[(N[(M * D), $MachinePrecision] * 0.5), $MachinePrecision] / N[(d + d), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -5e-310], N[(t$95$0 * t$95$2), $MachinePrecision], N[((-t$95$0) * t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\
t_1 := M \cdot \frac{D}{d + d}\\
t_2 := 1 - \frac{\left(\left(t\_1 \cdot t\_1\right) \cdot 0.5\right) \cdot h}{\ell}\\
\mathbf{if}\;\ell \leq -4.8 \cdot 10^{+53}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{t\_1 \cdot \left(\frac{\left(M \cdot D\right) \cdot 0.5}{d + d} \cdot h\right)}{\ell}\right)\\

\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_0 \cdot t\_2\\

\mathbf{else}:\\
\;\;\;\;\left(-t\_0\right) \cdot t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -4.8e53

    1. Initial program 56.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      13. lower-*.f6455.4

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6455.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8e53 < l < -4.999999999999985e-310

    1. Initial program 72.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      16. lift-*.f6484.8

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    6. Applied rewrites84.8%

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

    if -4.999999999999985e-310 < l

    1. Initial program 67.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-d \cdot \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      13. mul-1-negN/A

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

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

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

      \[\leadsto \color{blue}{\left(-d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 2: 73.5% accurate, 1.6× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ t_1 := M \cdot \frac{D}{d + d}\\ t_2 := 1 - \frac{\left(\left(t\_1 \cdot t\_1\right) \cdot 0.5\right) \cdot h}{\ell}\\ \mathbf{if}\;\ell \leq -4.8 \cdot 10^{+53}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right)\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t\_0 \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(-t\_0\right) \cdot t\_2\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* d (- (sqrt (/ 1.0 (* l h))))))
        (t_1 (* M (/ D (+ d d))))
        (t_2 (- 1.0 (/ (* (* (* t_1 t_1) 0.5) h) l))))
   (if (<= l -4.8e+53)
     (*
      (* (sqrt (/ d l)) (sqrt (/ d h)))
      (- 1.0 (/ (* (* (/ (* D M) (+ d d)) (* 0.25 (/ (* M D) d))) h) l)))
     (if (<= l -5e-310) (* t_0 t_2) (* (- t_0) t_2)))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = d * -sqrt((1.0 / (l * h)));
	double t_1 = M * (D / (d + d));
	double t_2 = 1.0 - ((((t_1 * t_1) * 0.5) * h) / l);
	double tmp;
	if (l <= -4.8e+53) {
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((((D * M) / (d + d)) * (0.25 * ((M * D) / d))) * h) / l));
	} else if (l <= -5e-310) {
		tmp = t_0 * t_2;
	} else {
		tmp = -t_0 * t_2;
	}
	return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = d * -sqrt((1.0d0 / (l * h)))
    t_1 = m * (d_1 / (d + d))
    t_2 = 1.0d0 - ((((t_1 * t_1) * 0.5d0) * h) / l)
    if (l <= (-4.8d+53)) then
        tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - (((((d_1 * m) / (d + d)) * (0.25d0 * ((m * d_1) / d))) * h) / l))
    else if (l <= (-5d-310)) then
        tmp = t_0 * t_2
    else
        tmp = -t_0 * t_2
    end if
    code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = d * -Math.sqrt((1.0 / (l * h)));
	double t_1 = M * (D / (d + d));
	double t_2 = 1.0 - ((((t_1 * t_1) * 0.5) * h) / l);
	double tmp;
	if (l <= -4.8e+53) {
		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - (((((D * M) / (d + d)) * (0.25 * ((M * D) / d))) * h) / l));
	} else if (l <= -5e-310) {
		tmp = t_0 * t_2;
	} else {
		tmp = -t_0 * t_2;
	}
	return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D])
def code(d, h, l, M, D):
	t_0 = d * -math.sqrt((1.0 / (l * h)))
	t_1 = M * (D / (d + d))
	t_2 = 1.0 - ((((t_1 * t_1) * 0.5) * h) / l)
	tmp = 0
	if l <= -4.8e+53:
		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - (((((D * M) / (d + d)) * (0.25 * ((M * D) / d))) * h) / l))
	elif l <= -5e-310:
		tmp = t_0 * t_2
	else:
		tmp = -t_0 * t_2
	return tmp
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(d * Float64(-sqrt(Float64(1.0 / Float64(l * h)))))
	t_1 = Float64(M * Float64(D / Float64(d + d)))
	t_2 = Float64(1.0 - Float64(Float64(Float64(Float64(t_1 * t_1) * 0.5) * h) / l))
	tmp = 0.0
	if (l <= -4.8e+53)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(D * M) / Float64(d + d)) * Float64(0.25 * Float64(Float64(M * D) / d))) * h) / l)));
	elseif (l <= -5e-310)
		tmp = Float64(t_0 * t_2);
	else
		tmp = Float64(Float64(-t_0) * t_2);
	end
	return tmp
end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = d * -sqrt((1.0 / (l * h)));
	t_1 = M * (D / (d + d));
	t_2 = 1.0 - ((((t_1 * t_1) * 0.5) * h) / l);
	tmp = 0.0;
	if (l <= -4.8e+53)
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((((D * M) / (d + d)) * (0.25 * ((M * D) / d))) * h) / l));
	elseif (l <= -5e-310)
		tmp = t_0 * t_2;
	else
		tmp = -t_0 * t_2;
	end
	tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d * (-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$1 = N[(M * N[(D / N[(d + d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - N[(N[(N[(N[(t$95$1 * t$95$1), $MachinePrecision] * 0.5), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -4.8e+53], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(D * M), $MachinePrecision] / N[(d + d), $MachinePrecision]), $MachinePrecision] * N[(0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -5e-310], N[(t$95$0 * t$95$2), $MachinePrecision], N[((-t$95$0) * t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\
t_1 := M \cdot \frac{D}{d + d}\\
t_2 := 1 - \frac{\left(\left(t\_1 \cdot t\_1\right) \cdot 0.5\right) \cdot h}{\ell}\\
\mathbf{if}\;\ell \leq -4.8 \cdot 10^{+53}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right)\\

\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_0 \cdot t\_2\\

\mathbf{else}:\\
\;\;\;\;\left(-t\_0\right) \cdot t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -4.8e53

    1. Initial program 56.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      13. lower-*.f6455.4

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6455.9

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{1}{4} \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right) \]
      4. lower-*.f6455.9

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites55.9%

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

    if -4.8e53 < l < -4.999999999999985e-310

    1. Initial program 72.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      16. lift-*.f6484.8

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    6. Applied rewrites84.8%

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

    if -4.999999999999985e-310 < l

    1. Initial program 67.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-d \cdot \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      13. mul-1-negN/A

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

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

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

      \[\leadsto \color{blue}{\left(-d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 73.4% accurate, 1.6× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \frac{D \cdot M}{d + d}\\ t_1 := M \cdot \frac{D}{d + d}\\ \mathbf{if}\;\ell \leq -4.8 \cdot 10^{+53}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(t\_0 \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right)\\ \mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\left(d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\right) \cdot \left(1 - \frac{\left(\left(t\_1 \cdot t\_1\right) \cdot 0.5\right) \cdot h}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot \left(1 - \frac{\left(t\_0 \cdot \left(t\_0 \cdot 0.5\right)\right) \cdot h}{\ell}\right)\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ (* D M) (+ d d))) (t_1 (* M (/ D (+ d d)))))
   (if (<= l -4.8e+53)
     (*
      (* (sqrt (/ d l)) (sqrt (/ d h)))
      (- 1.0 (/ (* (* t_0 (* 0.25 (/ (* M D) d))) h) l)))
     (if (<= l -5e-310)
       (*
        (* d (- (sqrt (/ 1.0 (* l h)))))
        (- 1.0 (/ (* (* (* t_1 t_1) 0.5) h) l)))
       (*
        (* (sqrt (/ 1.0 (* h l))) d)
        (- 1.0 (/ (* (* t_0 (* t_0 0.5)) h) l)))))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * M) / (d + d);
	double t_1 = M * (D / (d + d));
	double tmp;
	if (l <= -4.8e+53) {
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l));
	} else if (l <= -5e-310) {
		tmp = (d * -sqrt((1.0 / (l * h)))) * (1.0 - ((((t_1 * t_1) * 0.5) * h) / l));
	} else {
		tmp = (sqrt((1.0 / (h * l))) * d) * (1.0 - (((t_0 * (t_0 * 0.5)) * h) / l));
	}
	return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
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) :: t_1
    real(8) :: tmp
    t_0 = (d_1 * m) / (d + d)
    t_1 = m * (d_1 / (d + d))
    if (l <= (-4.8d+53)) then
        tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - (((t_0 * (0.25d0 * ((m * d_1) / d))) * h) / l))
    else if (l <= (-5d-310)) then
        tmp = (d * -sqrt((1.0d0 / (l * h)))) * (1.0d0 - ((((t_1 * t_1) * 0.5d0) * h) / l))
    else
        tmp = (sqrt((1.0d0 / (h * l))) * d) * (1.0d0 - (((t_0 * (t_0 * 0.5d0)) * h) / l))
    end if
    code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * M) / (d + d);
	double t_1 = M * (D / (d + d));
	double tmp;
	if (l <= -4.8e+53) {
		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l));
	} else if (l <= -5e-310) {
		tmp = (d * -Math.sqrt((1.0 / (l * h)))) * (1.0 - ((((t_1 * t_1) * 0.5) * h) / l));
	} else {
		tmp = (Math.sqrt((1.0 / (h * l))) * d) * (1.0 - (((t_0 * (t_0 * 0.5)) * h) / l));
	}
	return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D])
def code(d, h, l, M, D):
	t_0 = (D * M) / (d + d)
	t_1 = M * (D / (d + d))
	tmp = 0
	if l <= -4.8e+53:
		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l))
	elif l <= -5e-310:
		tmp = (d * -math.sqrt((1.0 / (l * h)))) * (1.0 - ((((t_1 * t_1) * 0.5) * h) / l))
	else:
		tmp = (math.sqrt((1.0 / (h * l))) * d) * (1.0 - (((t_0 * (t_0 * 0.5)) * h) / l))
	return tmp
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(D * M) / Float64(d + d))
	t_1 = Float64(M * Float64(D / Float64(d + d)))
	tmp = 0.0
	if (l <= -4.8e+53)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(t_0 * Float64(0.25 * Float64(Float64(M * D) / d))) * h) / l)));
	elseif (l <= -5e-310)
		tmp = Float64(Float64(d * Float64(-sqrt(Float64(1.0 / Float64(l * h))))) * Float64(1.0 - Float64(Float64(Float64(Float64(t_1 * t_1) * 0.5) * h) / l)));
	else
		tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(h * l))) * d) * Float64(1.0 - Float64(Float64(Float64(t_0 * Float64(t_0 * 0.5)) * h) / l)));
	end
	return tmp
end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (D * M) / (d + d);
	t_1 = M * (D / (d + d));
	tmp = 0.0;
	if (l <= -4.8e+53)
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l));
	elseif (l <= -5e-310)
		tmp = (d * -sqrt((1.0 / (l * h)))) * (1.0 - ((((t_1 * t_1) * 0.5) * h) / l));
	else
		tmp = (sqrt((1.0 / (h * l))) * d) * (1.0 - (((t_0 * (t_0 * 0.5)) * h) / l));
	end
	tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * M), $MachinePrecision] / N[(d + d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(M * N[(D / N[(d + d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -4.8e+53], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(t$95$0 * N[(0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -5e-310], N[(N[(d * (-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(t$95$1 * t$95$1), $MachinePrecision] * 0.5), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision] * N[(1.0 - N[(N[(N[(t$95$0 * N[(t$95$0 * 0.5), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \frac{D \cdot M}{d + d}\\
t_1 := M \cdot \frac{D}{d + d}\\
\mathbf{if}\;\ell \leq -4.8 \cdot 10^{+53}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(t\_0 \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right)\\

\mathbf{elif}\;\ell \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\right) \cdot \left(1 - \frac{\left(\left(t\_1 \cdot t\_1\right) \cdot 0.5\right) \cdot h}{\ell}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot \left(1 - \frac{\left(t\_0 \cdot \left(t\_0 \cdot 0.5\right)\right) \cdot h}{\ell}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -4.8e53

    1. Initial program 56.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      13. lower-*.f6455.4

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6455.9

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{1}{4} \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right) \]
      4. lower-*.f6455.9

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites55.9%

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

    if -4.8e53 < l < -4.999999999999985e-310

    1. Initial program 72.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      16. lift-*.f6484.8

        \[\leadsto \left(d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    6. Applied rewrites84.8%

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

    if -4.999999999999985e-310 < l

    1. Initial program 67.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      13. lower-*.f6468.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      6. lift-*.f6474.4

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

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

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      9. lift-*.f6474.4

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot 0.5\right)\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites74.4%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right)} \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot 0.5\right)\right) \cdot h}{\ell}\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 71.1% accurate, 1.8× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \frac{D \cdot M}{d + d}\\ \mathbf{if}\;h \leq 1.65 \cdot 10^{-294}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(t\_0 \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot \left(1 - \frac{\left(t\_0 \cdot \left(t\_0 \cdot 0.5\right)\right) \cdot h}{\ell}\right)\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ (* D M) (+ d d))))
   (if (<= h 1.65e-294)
     (*
      (* (sqrt (/ d l)) (sqrt (/ d h)))
      (- 1.0 (/ (* (* t_0 (* 0.25 (/ (* M D) d))) h) l)))
     (*
      (* (sqrt (/ 1.0 (* h l))) d)
      (- 1.0 (/ (* (* t_0 (* t_0 0.5)) h) l))))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * M) / (d + d);
	double tmp;
	if (h <= 1.65e-294) {
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l));
	} else {
		tmp = (sqrt((1.0 / (h * l))) * d) * (1.0 - (((t_0 * (t_0 * 0.5)) * h) / l));
	}
	return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
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_1 * m) / (d + d)
    if (h <= 1.65d-294) then
        tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - (((t_0 * (0.25d0 * ((m * d_1) / d))) * h) / l))
    else
        tmp = (sqrt((1.0d0 / (h * l))) * d) * (1.0d0 - (((t_0 * (t_0 * 0.5d0)) * h) / l))
    end if
    code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * M) / (d + d);
	double tmp;
	if (h <= 1.65e-294) {
		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l));
	} else {
		tmp = (Math.sqrt((1.0 / (h * l))) * d) * (1.0 - (((t_0 * (t_0 * 0.5)) * h) / l));
	}
	return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D])
def code(d, h, l, M, D):
	t_0 = (D * M) / (d + d)
	tmp = 0
	if h <= 1.65e-294:
		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l))
	else:
		tmp = (math.sqrt((1.0 / (h * l))) * d) * (1.0 - (((t_0 * (t_0 * 0.5)) * h) / l))
	return tmp
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(D * M) / Float64(d + d))
	tmp = 0.0
	if (h <= 1.65e-294)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(t_0 * Float64(0.25 * Float64(Float64(M * D) / d))) * h) / l)));
	else
		tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(h * l))) * d) * Float64(1.0 - Float64(Float64(Float64(t_0 * Float64(t_0 * 0.5)) * h) / l)));
	end
	return tmp
end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (D * M) / (d + d);
	tmp = 0.0;
	if (h <= 1.65e-294)
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l));
	else
		tmp = (sqrt((1.0 / (h * l))) * d) * (1.0 - (((t_0 * (t_0 * 0.5)) * h) / l));
	end
	tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * M), $MachinePrecision] / N[(d + d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, 1.65e-294], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(t$95$0 * N[(0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision] * N[(1.0 - N[(N[(N[(t$95$0 * N[(t$95$0 * 0.5), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \frac{D \cdot M}{d + d}\\
\mathbf{if}\;h \leq 1.65 \cdot 10^{-294}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(t\_0 \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot \left(1 - \frac{\left(t\_0 \cdot \left(t\_0 \cdot 0.5\right)\right) \cdot h}{\ell}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if h < 1.65e-294

    1. Initial program 65.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6467.9

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{1}{4} \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right) \]
      4. lower-*.f6467.9

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites67.9%

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

    if 1.65e-294 < h

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6469.0

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      6. lift-*.f6474.5

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

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

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      9. lift-*.f6474.5

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot 0.5\right)\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites74.5%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right)} \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot 0.5\right)\right) \cdot h}{\ell}\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 69.5% accurate, 1.7× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2.2 \cdot 10^{-111}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right)\\ \mathbf{elif}\;\ell \leq 5.4 \cdot 10^{+102}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(\left(D \cdot M\right) \cdot \left(D \cdot M\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, -0.125, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (if (<= l 2.2e-111)
   (*
    (* (sqrt (/ d l)) (sqrt (/ d h)))
    (- 1.0 (/ (* (* (/ (* D M) (+ d d)) (* 0.25 (/ (* M D) d))) h) l)))
   (if (<= l 5.4e+102)
     (/
      (fma
       (/ (* (* (* D M) (* D M)) (sqrt (* l h))) d)
       -0.125
       (* (sqrt (/ (* (* l l) l) h)) d))
      (* l l))
     (* (/ 1.0 (* (sqrt l) (sqrt h))) d))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= 2.2e-111) {
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((((D * M) / (d + d)) * (0.25 * ((M * D) / d))) * h) / l));
	} else if (l <= 5.4e+102) {
		tmp = fma(((((D * M) * (D * M)) * sqrt((l * h))) / d), -0.125, (sqrt((((l * l) * l) / h)) * d)) / (l * l);
	} else {
		tmp = (1.0 / (sqrt(l) * sqrt(h))) * d;
	}
	return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	tmp = 0.0
	if (l <= 2.2e-111)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(D * M) / Float64(d + d)) * Float64(0.25 * Float64(Float64(M * D) / d))) * h) / l)));
	elseif (l <= 5.4e+102)
		tmp = Float64(fma(Float64(Float64(Float64(Float64(D * M) * Float64(D * M)) * sqrt(Float64(l * h))) / d), -0.125, Float64(sqrt(Float64(Float64(Float64(l * l) * l) / h)) * d)) / Float64(l * l));
	else
		tmp = Float64(Float64(1.0 / Float64(sqrt(l) * sqrt(h))) * d);
	end
	return tmp
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 2.2e-111], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(D * M), $MachinePrecision] / N[(d + d), $MachinePrecision]), $MachinePrecision] * N[(0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 5.4e+102], N[(N[(N[(N[(N[(N[(D * M), $MachinePrecision] * N[(D * M), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * -0.125 + N[(N[Sqrt[N[(N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.2 \cdot 10^{-111}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right)\\

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

\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 2.2e-111

    1. Initial program 67.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      13. lower-*.f6469.6

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6470.4

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{1}{4} \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right) \]
      4. lower-*.f6470.4

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites70.4%

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

    if 2.2e-111 < l < 5.4000000000000002e102

    1. Initial program 72.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. Taylor expanded in l around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.4000000000000002e102 < l

    1. Initial program 56.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. Taylor expanded in d around inf

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

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

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

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

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

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      6. lower-*.f6449.3

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
    4. Applied rewrites49.3%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    5. Step-by-step derivation
      1. lift-sqrt.f64N/A

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

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

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

        \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
      5. metadata-evalN/A

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

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

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

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

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      10. lift-*.f6449.2

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    6. Applied rewrites49.2%

      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      3. sqrt-prodN/A

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

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

        \[\leadsto \frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d \]
      6. lower-sqrt.f6463.4

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

      \[\leadsto \frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 67.7% accurate, 1.8× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \frac{D \cdot M}{d + d}\\ \mathbf{if}\;h \leq 1.3 \cdot 10^{-156}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(t\_0 \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - \left(\left(\left(t\_0 \cdot \frac{D}{d + d}\right) \cdot M\right) \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right)\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ (* D M) (+ d d))))
   (if (<= h 1.3e-156)
     (*
      (* (sqrt (/ d l)) (sqrt (/ d h)))
      (- 1.0 (/ (* (* t_0 (* 0.25 (/ (* M D) d))) h) l)))
     (*
      (- 1.0 (* (* (* (* t_0 (/ D (+ d d))) M) 0.5) (/ h l)))
      (* (sqrt (/ 1.0 (* h l))) d)))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * M) / (d + d);
	double tmp;
	if (h <= 1.3e-156) {
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l));
	} else {
		tmp = (1.0 - ((((t_0 * (D / (d + d))) * M) * 0.5) * (h / l))) * (sqrt((1.0 / (h * l))) * d);
	}
	return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
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_1 * m) / (d + d)
    if (h <= 1.3d-156) then
        tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - (((t_0 * (0.25d0 * ((m * d_1) / d))) * h) / l))
    else
        tmp = (1.0d0 - ((((t_0 * (d_1 / (d + d))) * m) * 0.5d0) * (h / l))) * (sqrt((1.0d0 / (h * l))) * d)
    end if
    code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (D * M) / (d + d);
	double tmp;
	if (h <= 1.3e-156) {
		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l));
	} else {
		tmp = (1.0 - ((((t_0 * (D / (d + d))) * M) * 0.5) * (h / l))) * (Math.sqrt((1.0 / (h * l))) * d);
	}
	return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D])
def code(d, h, l, M, D):
	t_0 = (D * M) / (d + d)
	tmp = 0
	if h <= 1.3e-156:
		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l))
	else:
		tmp = (1.0 - ((((t_0 * (D / (d + d))) * M) * 0.5) * (h / l))) * (math.sqrt((1.0 / (h * l))) * d)
	return tmp
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(D * M) / Float64(d + d))
	tmp = 0.0
	if (h <= 1.3e-156)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(t_0 * Float64(0.25 * Float64(Float64(M * D) / d))) * h) / l)));
	else
		tmp = Float64(Float64(1.0 - Float64(Float64(Float64(Float64(t_0 * Float64(D / Float64(d + d))) * M) * 0.5) * Float64(h / l))) * Float64(sqrt(Float64(1.0 / Float64(h * l))) * d));
	end
	return tmp
end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (D * M) / (d + d);
	tmp = 0.0;
	if (h <= 1.3e-156)
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((t_0 * (0.25 * ((M * D) / d))) * h) / l));
	else
		tmp = (1.0 - ((((t_0 * (D / (d + d))) * M) * 0.5) * (h / l))) * (sqrt((1.0 / (h * l))) * d);
	end
	tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * M), $MachinePrecision] / N[(d + d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[h, 1.3e-156], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(t$95$0 * N[(0.25 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(N[(N[(N[(t$95$0 * N[(D / N[(d + d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * M), $MachinePrecision] * 0.5), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \frac{D \cdot M}{d + d}\\
\mathbf{if}\;h \leq 1.3 \cdot 10^{-156}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(t\_0 \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(1 - \left(\left(\left(t\_0 \cdot \frac{D}{d + d}\right) \cdot M\right) \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if h < 1.3e-156

    1. Initial program 66.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6468.1

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{1}{4} \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right) \]
      4. lower-*.f6468.1

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(0.25 \cdot \frac{M \cdot D}{d}\right)\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites68.1%

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

    if 1.3e-156 < h

    1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(1 - \left(\left(\left(\frac{D \cdot M}{d + d} \cdot \frac{D}{d + d}\right) \cdot M\right) \cdot 0.5\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 62.8% accurate, 1.5× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\ell \cdot \ell\right) \cdot \ell\\ t_1 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right)\\ \mathbf{if}\;d \leq -6.6 \cdot 10^{+154}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\ \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{t\_0}}\\ \mathbf{elif}\;d \leq 1.02 \cdot 10^{-84}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(\left(D \cdot M\right) \cdot \left(D \cdot M\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, -0.125, \sqrt{\frac{t\_0}{h}} \cdot d\right)}{\ell \cdot \ell}\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{+145}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (* l l) l))
        (t_1
         (*
          (* (sqrt (/ d l)) (sqrt (/ d h)))
          (- 1.0 (/ (* (* (* (* (* M M) D) (/ D (* d d))) 0.125) h) l)))))
   (if (<= d -6.6e+154)
     (* (- (sqrt (/ 1.0 (* l h)))) d)
     (if (<= d -8.5e-157)
       t_1
       (if (<= d -2.6e-302)
         (* (* 0.125 (* (* D D) (* M (/ M d)))) (sqrt (/ h t_0)))
         (if (<= d 1.02e-84)
           (/
            (fma
             (/ (* (* (* D M) (* D M)) (sqrt (* l h))) d)
             -0.125
             (* (sqrt (/ t_0 h)) d))
            (* l l))
           (if (<= d 3.8e+145) t_1 (/ (* 1.0 d) (* (sqrt h) (sqrt l))))))))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (l * l) * l;
	double t_1 = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l));
	double tmp;
	if (d <= -6.6e+154) {
		tmp = -sqrt((1.0 / (l * h))) * d;
	} else if (d <= -8.5e-157) {
		tmp = t_1;
	} else if (d <= -2.6e-302) {
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * sqrt((h / t_0));
	} else if (d <= 1.02e-84) {
		tmp = fma(((((D * M) * (D * M)) * sqrt((l * h))) / d), -0.125, (sqrt((t_0 / h)) * d)) / (l * l);
	} else if (d <= 3.8e+145) {
		tmp = t_1;
	} else {
		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(l * l) * l)
	t_1 = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(Float64(M * M) * D) * Float64(D / Float64(d * d))) * 0.125) * h) / l)))
	tmp = 0.0
	if (d <= -6.6e+154)
		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
	elseif (d <= -8.5e-157)
		tmp = t_1;
	elseif (d <= -2.6e-302)
		tmp = Float64(Float64(0.125 * Float64(Float64(D * D) * Float64(M * Float64(M / d)))) * sqrt(Float64(h / t_0)));
	elseif (d <= 1.02e-84)
		tmp = Float64(fma(Float64(Float64(Float64(Float64(D * M) * Float64(D * M)) * sqrt(Float64(l * h))) / d), -0.125, Float64(sqrt(Float64(t_0 / h)) * d)) / Float64(l * l));
	elseif (d <= 3.8e+145)
		tmp = t_1;
	else
		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * D), $MachinePrecision] * N[(D / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -6.6e+154], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], If[LessEqual[d, -8.5e-157], t$95$1, If[LessEqual[d, -2.6e-302], N[(N[(0.125 * N[(N[(D * D), $MachinePrecision] * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.02e-84], N[(N[(N[(N[(N[(N[(D * M), $MachinePrecision] * N[(D * M), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * -0.125 + N[(N[Sqrt[N[(t$95$0 / h), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.8e+145], t$95$1, N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\ell \cdot \ell\right) \cdot \ell\\
t_1 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right)\\
\mathbf{if}\;d \leq -6.6 \cdot 10^{+154}:\\
\;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\

\mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\
\;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{t\_0}}\\

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

\mathbf{elif}\;d \leq 3.8 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -6.6e154

    1. Initial program 68.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. Taylor expanded in d around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      10. lift-*.f6470.7

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
    7. Applied rewrites70.7%

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

    if -6.6e154 < d < -8.49999999999999976e-157 or 1.02000000000000004e-84 < d < 3.80000000000000012e145

    1. Initial program 77.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      17. lift-/.f6479.0

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      13. lower-*.f6479.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      13. lift-*.f6469.1

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

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

    if -8.49999999999999976e-157 < d < -2.60000000000000011e-302

    1. Initial program 42.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. Taylor expanded in h around -inf

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      9. pow2N/A

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

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      11. pow3N/A

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

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

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

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      15. lift-sqrt.f6438.6

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    7. Applied rewrites38.6%

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

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

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

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

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      5. lower-/.f6442.4

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    9. Applied rewrites42.4%

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

    if -2.60000000000000011e-302 < d < 1.02000000000000004e-84

    1. Initial program 49.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. Taylor expanded in l around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.80000000000000012e145 < d

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    5. Step-by-step derivation
      1. lift-sqrt.f64N/A

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

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

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

        \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
      5. metadata-evalN/A

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

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

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

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

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      10. lift-*.f6468.5

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

      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      5. associate-*l/N/A

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

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

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

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

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

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

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      12. lower-*.f6468.5

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

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

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

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      3. sqrt-prodN/A

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

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

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

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
    10. Applied rewrites77.2%

      \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 8: 62.2% accurate, 1.5× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\ell \cdot \ell\right) \cdot \ell\\ t_1 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right)\\ \mathbf{if}\;d \leq -6.6 \cdot 10^{+154}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\ \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{t\_0}}\\ \mathbf{elif}\;d \leq 7.6 \cdot 10^{-152}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, -0.125, \sqrt{\frac{t\_0}{h}} \cdot d\right)}{\ell \cdot \ell}\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{+145}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (* l l) l))
        (t_1
         (*
          (* (sqrt (/ d l)) (sqrt (/ d h)))
          (- 1.0 (/ (* (* (* (* (* M M) D) (/ D (* d d))) 0.125) h) l)))))
   (if (<= d -6.6e+154)
     (* (- (sqrt (/ 1.0 (* l h)))) d)
     (if (<= d -8.5e-157)
       t_1
       (if (<= d -2.6e-302)
         (* (* 0.125 (* (* D D) (* M (/ M d)))) (sqrt (/ h t_0)))
         (if (<= d 7.6e-152)
           (/
            (fma
             (/ (* (* M (* M (* D D))) (sqrt (* l h))) d)
             -0.125
             (* (sqrt (/ t_0 h)) d))
            (* l l))
           (if (<= d 3.8e+145) t_1 (/ (* 1.0 d) (* (sqrt h) (sqrt l))))))))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (l * l) * l;
	double t_1 = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l));
	double tmp;
	if (d <= -6.6e+154) {
		tmp = -sqrt((1.0 / (l * h))) * d;
	} else if (d <= -8.5e-157) {
		tmp = t_1;
	} else if (d <= -2.6e-302) {
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * sqrt((h / t_0));
	} else if (d <= 7.6e-152) {
		tmp = fma((((M * (M * (D * D))) * sqrt((l * h))) / d), -0.125, (sqrt((t_0 / h)) * d)) / (l * l);
	} else if (d <= 3.8e+145) {
		tmp = t_1;
	} else {
		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(l * l) * l)
	t_1 = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(Float64(M * M) * D) * Float64(D / Float64(d * d))) * 0.125) * h) / l)))
	tmp = 0.0
	if (d <= -6.6e+154)
		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
	elseif (d <= -8.5e-157)
		tmp = t_1;
	elseif (d <= -2.6e-302)
		tmp = Float64(Float64(0.125 * Float64(Float64(D * D) * Float64(M * Float64(M / d)))) * sqrt(Float64(h / t_0)));
	elseif (d <= 7.6e-152)
		tmp = Float64(fma(Float64(Float64(Float64(M * Float64(M * Float64(D * D))) * sqrt(Float64(l * h))) / d), -0.125, Float64(sqrt(Float64(t_0 / h)) * d)) / Float64(l * l));
	elseif (d <= 3.8e+145)
		tmp = t_1;
	else
		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * D), $MachinePrecision] * N[(D / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -6.6e+154], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], If[LessEqual[d, -8.5e-157], t$95$1, If[LessEqual[d, -2.6e-302], N[(N[(0.125 * N[(N[(D * D), $MachinePrecision] * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7.6e-152], N[(N[(N[(N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * -0.125 + N[(N[Sqrt[N[(t$95$0 / h), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.8e+145], t$95$1, N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\ell \cdot \ell\right) \cdot \ell\\
t_1 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right)\\
\mathbf{if}\;d \leq -6.6 \cdot 10^{+154}:\\
\;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\

\mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\
\;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{t\_0}}\\

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

\mathbf{elif}\;d \leq 3.8 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -6.6e154

    1. Initial program 68.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. Taylor expanded in d around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      10. lift-*.f6470.7

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
    7. Applied rewrites70.7%

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

    if -6.6e154 < d < -8.49999999999999976e-157 or 7.60000000000000024e-152 < d < 3.80000000000000012e145

    1. Initial program 75.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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6478.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      13. lift-*.f6467.6

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites67.6%

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

    if -8.49999999999999976e-157 < d < -2.60000000000000011e-302

    1. Initial program 42.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. Taylor expanded in h around -inf

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      6. pow2N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      7. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      8. lower-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      9. pow2N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      10. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      11. pow3N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      12. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      13. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      14. lift-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      15. lift-sqrt.f6438.6

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    7. Applied rewrites38.6%

      \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \color{blue}{\sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      2. lift-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      3. associate-/l*N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      4. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      5. lower-/.f6442.4

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    9. Applied rewrites42.4%

      \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]

    if -2.60000000000000011e-302 < d < 7.60000000000000024e-152

    1. Initial program 43.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. Taylor expanded in l around 0

      \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right) + d \cdot \sqrt{\frac{{\ell}^{3}}{h}}}{{\ell}^{2}}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right) + d \cdot \sqrt{\frac{{\ell}^{3}}{h}}}{\color{blue}{{\ell}^{2}}} \]
    4. Applied rewrites31.8%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot \left(D \cdot D\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, -0.125, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot \left(D \cdot D\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, \frac{-1}{8}, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot \left(D \cdot D\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, \frac{-1}{8}, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot \left(D \cdot D\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, \frac{-1}{8}, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell} \]
      4. pow2N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot {D}^{2}\right) \cdot \sqrt{\ell \cdot h}}{d}, \frac{-1}{8}, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell} \]
      5. associate-*l*N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot {D}^{2}\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, \frac{-1}{8}, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot {D}^{2}\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, \frac{-1}{8}, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot {D}^{2}\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, \frac{-1}{8}, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell} \]
      8. pow2N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, \frac{-1}{8}, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell} \]
      9. lift-*.f6434.8

        \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, -0.125, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell} \]
    6. Applied rewrites34.8%

      \[\leadsto \frac{\mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, -0.125, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell} \]

    if 3.80000000000000012e145 < d

    1. Initial program 74.0%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      4. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      6. lower-*.f6468.5

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
    4. Applied rewrites68.5%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    5. Step-by-step derivation
      1. lift-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      3. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      4. sqrt-divN/A

        \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
      5. metadata-evalN/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      6. *-commutativeN/A

        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
      7. lower-/.f64N/A

        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
      8. *-commutativeN/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      9. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      10. lift-*.f6468.5

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    6. Applied rewrites68.5%

      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      3. lift-*.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      4. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      5. associate-*l/N/A

        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
      6. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      9. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
      10. lift-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
      11. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      12. lower-*.f6468.5

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
    8. Applied rewrites68.5%

      \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      2. lift-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      3. sqrt-prodN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\color{blue}{\ell}}} \]
      6. lower-sqrt.f6477.2

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
    10. Applied rewrites77.2%

      \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 9: 62.1% accurate, 1.5× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right)\\ t_1 := \sqrt{\frac{1}{\ell \cdot h}}\\ t_2 := \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\ \mathbf{if}\;d \leq -6.6 \cdot 10^{+154}:\\ \;\;\;\;\left(-t\_1\right) \cdot d\\ \mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{-281}:\\ \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot t\_2\\ \mathbf{elif}\;d \leq 1.05 \cdot 10^{-84}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot D\right)\right) \cdot D}{d \cdot d} \cdot t\_2, -0.125, t\_1\right) \cdot d\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{+145}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0
         (*
          (* (sqrt (/ d l)) (sqrt (/ d h)))
          (- 1.0 (/ (* (* (* (* (* M M) D) (/ D (* d d))) 0.125) h) l))))
        (t_1 (sqrt (/ 1.0 (* l h))))
        (t_2 (sqrt (/ h (* (* l l) l)))))
   (if (<= d -6.6e+154)
     (* (- t_1) d)
     (if (<= d -8.5e-157)
       t_0
       (if (<= d 9.5e-281)
         (* (* 0.125 (* (* D D) (* M (/ M d)))) t_2)
         (if (<= d 1.05e-84)
           (* (fma (* (/ (* (* M (* M D)) D) (* d d)) t_2) -0.125 t_1) d)
           (if (<= d 3.8e+145) t_0 (/ (* 1.0 d) (* (sqrt h) (sqrt l))))))))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l));
	double t_1 = sqrt((1.0 / (l * h)));
	double t_2 = sqrt((h / ((l * l) * l)));
	double tmp;
	if (d <= -6.6e+154) {
		tmp = -t_1 * d;
	} else if (d <= -8.5e-157) {
		tmp = t_0;
	} else if (d <= 9.5e-281) {
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_2;
	} else if (d <= 1.05e-84) {
		tmp = fma(((((M * (M * D)) * D) / (d * d)) * t_2), -0.125, t_1) * d;
	} else if (d <= 3.8e+145) {
		tmp = t_0;
	} else {
		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(Float64(M * M) * D) * Float64(D / Float64(d * d))) * 0.125) * h) / l)))
	t_1 = sqrt(Float64(1.0 / Float64(l * h)))
	t_2 = sqrt(Float64(h / Float64(Float64(l * l) * l)))
	tmp = 0.0
	if (d <= -6.6e+154)
		tmp = Float64(Float64(-t_1) * d);
	elseif (d <= -8.5e-157)
		tmp = t_0;
	elseif (d <= 9.5e-281)
		tmp = Float64(Float64(0.125 * Float64(Float64(D * D) * Float64(M * Float64(M / d)))) * t_2);
	elseif (d <= 1.05e-84)
		tmp = Float64(fma(Float64(Float64(Float64(Float64(M * Float64(M * D)) * D) / Float64(d * d)) * t_2), -0.125, t_1) * d);
	elseif (d <= 3.8e+145)
		tmp = t_0;
	else
		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * D), $MachinePrecision] * N[(D / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(h / N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -6.6e+154], N[((-t$95$1) * d), $MachinePrecision], If[LessEqual[d, -8.5e-157], t$95$0, If[LessEqual[d, 9.5e-281], N[(N[(0.125 * N[(N[(D * D), $MachinePrecision] * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[d, 1.05e-84], N[(N[(N[(N[(N[(N[(M * N[(M * D), $MachinePrecision]), $MachinePrecision] * D), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * -0.125 + t$95$1), $MachinePrecision] * d), $MachinePrecision], If[LessEqual[d, 3.8e+145], t$95$0, N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right)\\
t_1 := \sqrt{\frac{1}{\ell \cdot h}}\\
t_2 := \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\
\mathbf{if}\;d \leq -6.6 \cdot 10^{+154}:\\
\;\;\;\;\left(-t\_1\right) \cdot d\\

\mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;d \leq 9.5 \cdot 10^{-281}:\\
\;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot t\_2\\

\mathbf{elif}\;d \leq 1.05 \cdot 10^{-84}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot D\right)\right) \cdot D}{d \cdot d} \cdot t\_2, -0.125, t\_1\right) \cdot d\\

\mathbf{elif}\;d \leq 3.8 \cdot 10^{+145}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -6.6e154

    1. Initial program 68.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. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      4. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      6. lower-*.f646.5

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
    4. Applied rewrites6.5%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    5. Taylor expanded in h around -inf

      \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
    6. Step-by-step derivation
      1. sqrt-pow2N/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
      2. metadata-evalN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
      3. metadata-evalN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
      4. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
      5. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
      6. lower-neg.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
      7. *-commutativeN/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      8. lower-sqrt.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      9. lift-/.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      10. lift-*.f6470.7

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
    7. Applied rewrites70.7%

      \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

    if -6.6e154 < d < -8.49999999999999976e-157 or 1.04999999999999999e-84 < d < 3.80000000000000012e145

    1. Initial program 77.2%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      3. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      7. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      8. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
      9. associate-*r/N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      10. lower-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
    3. Applied rewrites79.0%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    4. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      6. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      7. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      8. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      9. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      10. *-commutativeN/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      12. pow1/2N/A

        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      13. lower-sqrt.f64N/A

        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      14. lift-/.f64N/A

        \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      15. pow1/2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      16. lower-sqrt.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      17. lift-/.f6479.0

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied rewrites79.0%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right)} \cdot h}{\ell}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right)} \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      3. associate-*l*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right)} \cdot h}{\ell}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right)} \cdot h}{\ell}\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\left(M \cdot \frac{D}{d + d}\right)} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\left(\frac{D}{d + d} \cdot M\right)} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      7. lift-+.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      8. lift-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\color{blue}{\frac{D}{d + d}} \cdot M\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      9. associate-*l/N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      10. lower-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      12. lift-+.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      13. lower-*.f6479.0

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot 0.5\right)}\right) \cdot h}{\ell}\right) \]
      14. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\left(M \cdot \frac{D}{d + d}\right)} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\left(\frac{D}{d + d} \cdot M\right)} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      16. lift-+.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      17. lift-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\left(\color{blue}{\frac{D}{d + d}} \cdot M\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      18. associate-*l/N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      19. lower-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      20. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6479.7

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot 0.5\right)\right) \cdot h}{\ell}\right) \]
    7. Applied rewrites79.7%

      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot 0.5\right)\right)} \cdot h}{\ell}\right) \]
    8. Taylor expanded in d around 0

      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}}\right)} \cdot h}{\ell}\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}} \cdot \color{blue}{\frac{1}{8}}\right) \cdot h}{\ell}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}} \cdot \color{blue}{\frac{1}{8}}\right) \cdot h}{\ell}\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{M}^{2} \cdot {D}^{2}}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      4. pow2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{M}^{2} \cdot \left(D \cdot D\right)}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      5. associate-*l*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\left({M}^{2} \cdot D\right) \cdot D}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      6. pow2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\left(\left(M \cdot M\right) \cdot D\right) \cdot D}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      7. associate-/l*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      9. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      11. lower-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      12. pow2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      13. lift-*.f6469.1

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites69.1%

      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right)} \cdot h}{\ell}\right) \]

    if -8.49999999999999976e-157 < d < 9.5000000000000003e-281

    1. Initial program 40.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. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
    4. Applied rewrites33.5%

      \[\leadsto \color{blue}{\left(\left(\left(D \cdot D\right) \cdot \frac{-1 \cdot \left(M \cdot M\right)}{d}\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\right) \cdot -0.125} \]
    5. Taylor expanded in d around 0

      \[\leadsto \frac{1}{8} \cdot \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      3. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      4. associate-/l*N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      6. pow2N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      7. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      8. lower-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      9. pow2N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      10. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      11. pow3N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      12. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      13. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      14. lift-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      15. lift-sqrt.f6433.5

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    7. Applied rewrites33.5%

      \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \color{blue}{\sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      2. lift-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      3. associate-/l*N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      4. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      5. lower-/.f6436.8

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    9. Applied rewrites36.8%

      \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]

    if 9.5000000000000003e-281 < d < 1.04999999999999999e-84

    1. Initial program 53.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. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      3. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      7. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      8. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
      9. associate-*r/N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      10. lower-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
    3. Applied rewrites52.3%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    4. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \left(\sqrt{\frac{1}{h \cdot \ell}} + \frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)} \]
    5. Applied rewrites38.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot D\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}, -0.125, \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot D\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}, \frac{-1}{8}, \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      2. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot D\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}, \frac{-1}{8}, \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot D\right)\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}, \frac{-1}{8}, \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{\left(M \cdot \left(D \cdot M\right)\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}, \frac{-1}{8}, \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\left(M \cdot \left(D \cdot M\right)\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}, \frac{-1}{8}, \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot D\right)\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}, \frac{-1}{8}, \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      7. lower-*.f6441.6

        \[\leadsto \mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot D\right)\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}, -0.125, \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
    7. Applied rewrites41.6%

      \[\leadsto \mathsf{fma}\left(\frac{\left(M \cdot \left(M \cdot D\right)\right) \cdot D}{d \cdot d} \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}, -0.125, \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

    if 3.80000000000000012e145 < d

    1. Initial program 74.0%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      4. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      6. lower-*.f6468.5

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
    4. Applied rewrites68.5%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    5. Step-by-step derivation
      1. lift-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      3. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      4. sqrt-divN/A

        \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
      5. metadata-evalN/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      6. *-commutativeN/A

        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
      7. lower-/.f64N/A

        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
      8. *-commutativeN/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      9. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      10. lift-*.f6468.5

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    6. Applied rewrites68.5%

      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      3. lift-*.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      4. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      5. associate-*l/N/A

        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
      6. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      9. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
      10. lift-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
      11. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      12. lower-*.f6468.5

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
    8. Applied rewrites68.5%

      \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      2. lift-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      3. sqrt-prodN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\color{blue}{\ell}}} \]
      6. lower-sqrt.f6477.2

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
    10. Applied rewrites77.2%

      \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 10: 61.5% accurate, 1.5× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right)\\ t_1 := \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{if}\;d \leq -6.6 \cdot 10^{+154}:\\ \;\;\;\;\left(-t\_1\right) \cdot d\\ \mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;d \leq 9.4 \cdot 10^{-279}:\\ \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\ \mathbf{elif}\;d \leq 9000000000:\\ \;\;\;\;\left(1 - \left(0.5 \cdot \left(M \cdot \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot M\right)}{d \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(t\_1 \cdot d\right)\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{+145}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0
         (*
          (* (sqrt (/ d l)) (sqrt (/ d h)))
          (- 1.0 (/ (* (* (* (* (* M M) D) (/ D (* d d))) 0.125) h) l))))
        (t_1 (sqrt (/ 1.0 (* l h)))))
   (if (<= d -6.6e+154)
     (* (- t_1) d)
     (if (<= d -8.5e-157)
       t_0
       (if (<= d 9.4e-279)
         (* (* 0.125 (* (* D D) (* M (/ M d)))) (sqrt (/ h (* (* l l) l))))
         (if (<= d 9000000000.0)
           (*
            (-
             1.0
             (* (* 0.5 (* M (/ (* 0.25 (* (* D D) M)) (* d d)))) (/ h l)))
            (* t_1 d))
           (if (<= d 3.8e+145) t_0 (/ (* 1.0 d) (* (sqrt h) (sqrt l))))))))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l));
	double t_1 = sqrt((1.0 / (l * h)));
	double tmp;
	if (d <= -6.6e+154) {
		tmp = -t_1 * d;
	} else if (d <= -8.5e-157) {
		tmp = t_0;
	} else if (d <= 9.4e-279) {
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * sqrt((h / ((l * l) * l)));
	} else if (d <= 9000000000.0) {
		tmp = (1.0 - ((0.5 * (M * ((0.25 * ((D * D) * M)) / (d * d)))) * (h / l))) * (t_1 * d);
	} else if (d <= 3.8e+145) {
		tmp = t_0;
	} else {
		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
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) :: t_1
    real(8) :: tmp
    t_0 = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - ((((((m * m) * d_1) * (d_1 / (d * d))) * 0.125d0) * h) / l))
    t_1 = sqrt((1.0d0 / (l * h)))
    if (d <= (-6.6d+154)) then
        tmp = -t_1 * d
    else if (d <= (-8.5d-157)) then
        tmp = t_0
    else if (d <= 9.4d-279) then
        tmp = (0.125d0 * ((d_1 * d_1) * (m * (m / d)))) * sqrt((h / ((l * l) * l)))
    else if (d <= 9000000000.0d0) then
        tmp = (1.0d0 - ((0.5d0 * (m * ((0.25d0 * ((d_1 * d_1) * m)) / (d * d)))) * (h / l))) * (t_1 * d)
    else if (d <= 3.8d+145) then
        tmp = t_0
    else
        tmp = (1.0d0 * d) / (sqrt(h) * sqrt(l))
    end if
    code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l));
	double t_1 = Math.sqrt((1.0 / (l * h)));
	double tmp;
	if (d <= -6.6e+154) {
		tmp = -t_1 * d;
	} else if (d <= -8.5e-157) {
		tmp = t_0;
	} else if (d <= 9.4e-279) {
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * Math.sqrt((h / ((l * l) * l)));
	} else if (d <= 9000000000.0) {
		tmp = (1.0 - ((0.5 * (M * ((0.25 * ((D * D) * M)) / (d * d)))) * (h / l))) * (t_1 * d);
	} else if (d <= 3.8e+145) {
		tmp = t_0;
	} else {
		tmp = (1.0 * d) / (Math.sqrt(h) * Math.sqrt(l));
	}
	return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D])
def code(d, h, l, M, D):
	t_0 = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l))
	t_1 = math.sqrt((1.0 / (l * h)))
	tmp = 0
	if d <= -6.6e+154:
		tmp = -t_1 * d
	elif d <= -8.5e-157:
		tmp = t_0
	elif d <= 9.4e-279:
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * math.sqrt((h / ((l * l) * l)))
	elif d <= 9000000000.0:
		tmp = (1.0 - ((0.5 * (M * ((0.25 * ((D * D) * M)) / (d * d)))) * (h / l))) * (t_1 * d)
	elif d <= 3.8e+145:
		tmp = t_0
	else:
		tmp = (1.0 * d) / (math.sqrt(h) * math.sqrt(l))
	return tmp
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(Float64(M * M) * D) * Float64(D / Float64(d * d))) * 0.125) * h) / l)))
	t_1 = sqrt(Float64(1.0 / Float64(l * h)))
	tmp = 0.0
	if (d <= -6.6e+154)
		tmp = Float64(Float64(-t_1) * d);
	elseif (d <= -8.5e-157)
		tmp = t_0;
	elseif (d <= 9.4e-279)
		tmp = Float64(Float64(0.125 * Float64(Float64(D * D) * Float64(M * Float64(M / d)))) * sqrt(Float64(h / Float64(Float64(l * l) * l))));
	elseif (d <= 9000000000.0)
		tmp = Float64(Float64(1.0 - Float64(Float64(0.5 * Float64(M * Float64(Float64(0.25 * Float64(Float64(D * D) * M)) / Float64(d * d)))) * Float64(h / l))) * Float64(t_1 * d));
	elseif (d <= 3.8e+145)
		tmp = t_0;
	else
		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l));
	t_1 = sqrt((1.0 / (l * h)));
	tmp = 0.0;
	if (d <= -6.6e+154)
		tmp = -t_1 * d;
	elseif (d <= -8.5e-157)
		tmp = t_0;
	elseif (d <= 9.4e-279)
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * sqrt((h / ((l * l) * l)));
	elseif (d <= 9000000000.0)
		tmp = (1.0 - ((0.5 * (M * ((0.25 * ((D * D) * M)) / (d * d)))) * (h / l))) * (t_1 * d);
	elseif (d <= 3.8e+145)
		tmp = t_0;
	else
		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * D), $MachinePrecision] * N[(D / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -6.6e+154], N[((-t$95$1) * d), $MachinePrecision], If[LessEqual[d, -8.5e-157], t$95$0, If[LessEqual[d, 9.4e-279], N[(N[(0.125 * N[(N[(D * D), $MachinePrecision] * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9000000000.0], N[(N[(1.0 - N[(N[(0.5 * N[(M * N[(N[(0.25 * N[(N[(D * D), $MachinePrecision] * M), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * d), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.8e+145], t$95$0, N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right)\\
t_1 := \sqrt{\frac{1}{\ell \cdot h}}\\
\mathbf{if}\;d \leq -6.6 \cdot 10^{+154}:\\
\;\;\;\;\left(-t\_1\right) \cdot d\\

\mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;d \leq 9.4 \cdot 10^{-279}:\\
\;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\

\mathbf{elif}\;d \leq 9000000000:\\
\;\;\;\;\left(1 - \left(0.5 \cdot \left(M \cdot \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot M\right)}{d \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(t\_1 \cdot d\right)\\

\mathbf{elif}\;d \leq 3.8 \cdot 10^{+145}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -6.6e154

    1. Initial program 68.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. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      4. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      6. lower-*.f646.5

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
    4. Applied rewrites6.5%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    5. Taylor expanded in h around -inf

      \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
    6. Step-by-step derivation
      1. sqrt-pow2N/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
      2. metadata-evalN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
      3. metadata-evalN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
      4. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
      5. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
      6. lower-neg.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
      7. *-commutativeN/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      8. lower-sqrt.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      9. lift-/.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      10. lift-*.f6470.7

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
    7. Applied rewrites70.7%

      \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

    if -6.6e154 < d < -8.49999999999999976e-157 or 9e9 < d < 3.80000000000000012e145

    1. Initial program 77.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. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      3. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      7. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      8. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
      9. associate-*r/N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      10. lower-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
    3. Applied rewrites78.8%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    4. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      6. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      7. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      8. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      9. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      10. *-commutativeN/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      12. pow1/2N/A

        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      13. lower-sqrt.f64N/A

        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      14. lift-/.f64N/A

        \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      15. pow1/2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      16. lower-sqrt.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      17. lift-/.f6478.8

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied rewrites78.8%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right)} \cdot h}{\ell}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right)} \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      3. associate-*l*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right)} \cdot h}{\ell}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right)} \cdot h}{\ell}\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\left(M \cdot \frac{D}{d + d}\right)} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\left(\frac{D}{d + d} \cdot M\right)} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      7. lift-+.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      8. lift-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\color{blue}{\frac{D}{d + d}} \cdot M\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      9. associate-*l/N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      10. lower-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      12. lift-+.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      13. lower-*.f6478.8

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot 0.5\right)}\right) \cdot h}{\ell}\right) \]
      14. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\left(M \cdot \frac{D}{d + d}\right)} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\left(\frac{D}{d + d} \cdot M\right)} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      16. lift-+.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      17. lift-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\left(\color{blue}{\frac{D}{d + d}} \cdot M\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      18. associate-*l/N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      19. lower-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      20. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6479.5

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot 0.5\right)\right) \cdot h}{\ell}\right) \]
    7. Applied rewrites79.5%

      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot 0.5\right)\right)} \cdot h}{\ell}\right) \]
    8. Taylor expanded in d around 0

      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}}\right)} \cdot h}{\ell}\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}} \cdot \color{blue}{\frac{1}{8}}\right) \cdot h}{\ell}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}} \cdot \color{blue}{\frac{1}{8}}\right) \cdot h}{\ell}\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{M}^{2} \cdot {D}^{2}}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      4. pow2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{M}^{2} \cdot \left(D \cdot D\right)}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      5. associate-*l*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\left({M}^{2} \cdot D\right) \cdot D}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      6. pow2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\left(\left(M \cdot M\right) \cdot D\right) \cdot D}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      7. associate-/l*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      9. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      11. lower-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      12. pow2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      13. lift-*.f6468.7

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites68.7%

      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right)} \cdot h}{\ell}\right) \]

    if -8.49999999999999976e-157 < d < 9.3999999999999997e-279

    1. Initial program 39.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. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
    4. Applied rewrites33.4%

      \[\leadsto \color{blue}{\left(\left(\left(D \cdot D\right) \cdot \frac{-1 \cdot \left(M \cdot M\right)}{d}\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\right) \cdot -0.125} \]
    5. Taylor expanded in d around 0

      \[\leadsto \frac{1}{8} \cdot \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      3. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      4. associate-/l*N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      6. pow2N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      7. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      8. lower-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      9. pow2N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      10. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      11. pow3N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      12. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      13. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      14. lift-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      15. lift-sqrt.f6433.4

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    7. Applied rewrites33.4%

      \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \color{blue}{\sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      2. lift-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      3. associate-/l*N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      4. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      5. lower-/.f6436.7

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    9. Applied rewrites36.7%

      \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]

    if 9.3999999999999997e-279 < d < 9e9

    1. Initial program 61.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. Taylor expanded in d around 0

      \[\leadsto \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      3. lower-sqrt.f64N/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. lower-*.f6466.9

        \[\leadsto \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    4. Applied rewrites66.9%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    5. Applied rewrites64.1%

      \[\leadsto \color{blue}{\left(1 - \left(0.5 \cdot \left(M \cdot \left(\frac{D}{d + d} \cdot \left(\frac{D}{d + d} \cdot M\right)\right)\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right)} \]
    6. Taylor expanded in d around 0

      \[\leadsto \left(1 - \left(\frac{1}{2} \cdot \left(M \cdot \color{blue}{\left(\frac{1}{4} \cdot \frac{{D}^{2} \cdot M}{{d}^{2}}\right)}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \left(1 - \left(\frac{1}{2} \cdot \left(M \cdot \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot M\right)}{\color{blue}{{d}^{2}}}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \]
      2. lower-/.f64N/A

        \[\leadsto \left(1 - \left(\frac{1}{2} \cdot \left(M \cdot \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot M\right)}{\color{blue}{{d}^{2}}}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(1 - \left(\frac{1}{2} \cdot \left(M \cdot \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot M\right)}{{\color{blue}{d}}^{2}}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(1 - \left(\frac{1}{2} \cdot \left(M \cdot \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot M\right)}{{d}^{2}}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \]
      5. pow2N/A

        \[\leadsto \left(1 - \left(\frac{1}{2} \cdot \left(M \cdot \frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot M\right)}{{d}^{2}}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left(1 - \left(\frac{1}{2} \cdot \left(M \cdot \frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot M\right)}{{d}^{2}}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \]
      7. unpow2N/A

        \[\leadsto \left(1 - \left(\frac{1}{2} \cdot \left(M \cdot \frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot M\right)}{d \cdot \color{blue}{d}}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \]
      8. lower-*.f6451.2

        \[\leadsto \left(1 - \left(0.5 \cdot \left(M \cdot \frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot M\right)}{d \cdot \color{blue}{d}}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \]
    8. Applied rewrites51.2%

      \[\leadsto \left(1 - \left(0.5 \cdot \left(M \cdot \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot M\right)}{d \cdot d}}\right)\right) \cdot \frac{h}{\ell}\right) \cdot \left(\sqrt{\frac{1}{\ell \cdot h}} \cdot d\right) \]

    if 3.80000000000000012e145 < d

    1. Initial program 74.0%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      4. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      6. lower-*.f6468.5

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
    4. Applied rewrites68.5%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    5. Step-by-step derivation
      1. lift-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      3. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      4. sqrt-divN/A

        \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
      5. metadata-evalN/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      6. *-commutativeN/A

        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
      7. lower-/.f64N/A

        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
      8. *-commutativeN/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      9. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      10. lift-*.f6468.5

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    6. Applied rewrites68.5%

      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      3. lift-*.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      4. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      5. associate-*l/N/A

        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
      6. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      9. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
      10. lift-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
      11. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      12. lower-*.f6468.5

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
    8. Applied rewrites68.5%

      \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      2. lift-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      3. sqrt-prodN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\color{blue}{\ell}}} \]
      6. lower-sqrt.f6477.2

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
    10. Applied rewrites77.2%

      \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 11: 61.5% accurate, 1.5× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right)\\ t_1 := \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\ \mathbf{if}\;d \leq -6.6 \cdot 10^{+154}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\ \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot t\_1\\ \mathbf{elif}\;d \leq 7.6 \cdot 10^{-152}:\\ \;\;\;\;\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot t\_1\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{+145}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0
         (*
          (* (sqrt (/ d l)) (sqrt (/ d h)))
          (- 1.0 (/ (* (* (* (* (* M M) D) (/ D (* d d))) 0.125) h) l))))
        (t_1 (sqrt (/ h (* (* l l) l)))))
   (if (<= d -6.6e+154)
     (* (- (sqrt (/ 1.0 (* l h)))) d)
     (if (<= d -8.5e-157)
       t_0
       (if (<= d -2.6e-302)
         (* (* 0.125 (* (* D D) (* M (/ M d)))) t_1)
         (if (<= d 7.6e-152)
           (* (* -0.125 (* (* D D) (/ (* M M) d))) t_1)
           (if (<= d 3.8e+145) t_0 (/ (* 1.0 d) (* (sqrt h) (sqrt l))))))))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l));
	double t_1 = sqrt((h / ((l * l) * l)));
	double tmp;
	if (d <= -6.6e+154) {
		tmp = -sqrt((1.0 / (l * h))) * d;
	} else if (d <= -8.5e-157) {
		tmp = t_0;
	} else if (d <= -2.6e-302) {
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_1;
	} else if (d <= 7.6e-152) {
		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_1;
	} else if (d <= 3.8e+145) {
		tmp = t_0;
	} else {
		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
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) :: t_1
    real(8) :: tmp
    t_0 = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - ((((((m * m) * d_1) * (d_1 / (d * d))) * 0.125d0) * h) / l))
    t_1 = sqrt((h / ((l * l) * l)))
    if (d <= (-6.6d+154)) then
        tmp = -sqrt((1.0d0 / (l * h))) * d
    else if (d <= (-8.5d-157)) then
        tmp = t_0
    else if (d <= (-2.6d-302)) then
        tmp = (0.125d0 * ((d_1 * d_1) * (m * (m / d)))) * t_1
    else if (d <= 7.6d-152) then
        tmp = ((-0.125d0) * ((d_1 * d_1) * ((m * m) / d))) * t_1
    else if (d <= 3.8d+145) then
        tmp = t_0
    else
        tmp = (1.0d0 * d) / (sqrt(h) * sqrt(l))
    end if
    code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l));
	double t_1 = Math.sqrt((h / ((l * l) * l)));
	double tmp;
	if (d <= -6.6e+154) {
		tmp = -Math.sqrt((1.0 / (l * h))) * d;
	} else if (d <= -8.5e-157) {
		tmp = t_0;
	} else if (d <= -2.6e-302) {
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_1;
	} else if (d <= 7.6e-152) {
		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_1;
	} else if (d <= 3.8e+145) {
		tmp = t_0;
	} else {
		tmp = (1.0 * d) / (Math.sqrt(h) * Math.sqrt(l));
	}
	return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D])
def code(d, h, l, M, D):
	t_0 = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l))
	t_1 = math.sqrt((h / ((l * l) * l)))
	tmp = 0
	if d <= -6.6e+154:
		tmp = -math.sqrt((1.0 / (l * h))) * d
	elif d <= -8.5e-157:
		tmp = t_0
	elif d <= -2.6e-302:
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_1
	elif d <= 7.6e-152:
		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_1
	elif d <= 3.8e+145:
		tmp = t_0
	else:
		tmp = (1.0 * d) / (math.sqrt(h) * math.sqrt(l))
	return tmp
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(Float64(M * M) * D) * Float64(D / Float64(d * d))) * 0.125) * h) / l)))
	t_1 = sqrt(Float64(h / Float64(Float64(l * l) * l)))
	tmp = 0.0
	if (d <= -6.6e+154)
		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
	elseif (d <= -8.5e-157)
		tmp = t_0;
	elseif (d <= -2.6e-302)
		tmp = Float64(Float64(0.125 * Float64(Float64(D * D) * Float64(M * Float64(M / d)))) * t_1);
	elseif (d <= 7.6e-152)
		tmp = Float64(Float64(-0.125 * Float64(Float64(D * D) * Float64(Float64(M * M) / d))) * t_1);
	elseif (d <= 3.8e+145)
		tmp = t_0;
	else
		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((((M * M) * D) * (D / (d * d))) * 0.125) * h) / l));
	t_1 = sqrt((h / ((l * l) * l)));
	tmp = 0.0;
	if (d <= -6.6e+154)
		tmp = -sqrt((1.0 / (l * h))) * d;
	elseif (d <= -8.5e-157)
		tmp = t_0;
	elseif (d <= -2.6e-302)
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_1;
	elseif (d <= 7.6e-152)
		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_1;
	elseif (d <= 3.8e+145)
		tmp = t_0;
	else
		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * D), $MachinePrecision] * N[(D / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(h / N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -6.6e+154], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], If[LessEqual[d, -8.5e-157], t$95$0, If[LessEqual[d, -2.6e-302], N[(N[(0.125 * N[(N[(D * D), $MachinePrecision] * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, 7.6e-152], N[(N[(-0.125 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, 3.8e+145], t$95$0, N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right)\\
t_1 := \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\
\mathbf{if}\;d \leq -6.6 \cdot 10^{+154}:\\
\;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\

\mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\
\;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot t\_1\\

\mathbf{elif}\;d \leq 7.6 \cdot 10^{-152}:\\
\;\;\;\;\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot t\_1\\

\mathbf{elif}\;d \leq 3.8 \cdot 10^{+145}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -6.6e154

    1. Initial program 68.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. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      4. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      6. lower-*.f646.5

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
    4. Applied rewrites6.5%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    5. Taylor expanded in h around -inf

      \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
    6. Step-by-step derivation
      1. sqrt-pow2N/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
      2. metadata-evalN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
      3. metadata-evalN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
      4. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
      5. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
      6. lower-neg.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
      7. *-commutativeN/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      8. lower-sqrt.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      9. lift-/.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      10. lift-*.f6470.7

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
    7. Applied rewrites70.7%

      \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

    if -6.6e154 < d < -8.49999999999999976e-157 or 7.60000000000000024e-152 < d < 3.80000000000000012e145

    1. Initial program 75.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. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      3. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      7. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      8. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
      9. associate-*r/N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      10. lower-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
    3. Applied rewrites77.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}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    4. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      6. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      7. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      8. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      9. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      10. *-commutativeN/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      12. pow1/2N/A

        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      13. lower-sqrt.f64N/A

        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      14. lift-/.f64N/A

        \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      15. pow1/2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      16. lower-sqrt.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      17. lift-/.f6477.2

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied rewrites77.2%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right)} \cdot h}{\ell}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right)} \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      3. associate-*l*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right)} \cdot h}{\ell}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right)} \cdot h}{\ell}\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\left(M \cdot \frac{D}{d + d}\right)} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\left(\frac{D}{d + d} \cdot M\right)} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      7. lift-+.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      8. lift-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\color{blue}{\frac{D}{d + d}} \cdot M\right) \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      9. associate-*l/N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      10. lower-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      11. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      12. lift-+.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot \left(\left(M \cdot \frac{D}{d + d}\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      13. lower-*.f6477.2

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \color{blue}{\left(\left(M \cdot \frac{D}{d + d}\right) \cdot 0.5\right)}\right) \cdot h}{\ell}\right) \]
      14. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\left(M \cdot \frac{D}{d + d}\right)} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      15. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\left(\frac{D}{d + d} \cdot M\right)} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      16. lift-+.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      17. lift-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\left(\color{blue}{\frac{D}{d + d}} \cdot M\right) \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      18. associate-*l/N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      19. lower-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\color{blue}{\frac{D \cdot M}{d + d}} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      20. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{\color{blue}{D \cdot M}}{d + d} \cdot \frac{1}{2}\right)\right) \cdot h}{\ell}\right) \]
      21. lift-+.f6478.0

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{\color{blue}{d + d}} \cdot 0.5\right)\right) \cdot h}{\ell}\right) \]
    7. Applied rewrites78.0%

      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\frac{D \cdot M}{d + d} \cdot \left(\frac{D \cdot M}{d + d} \cdot 0.5\right)\right)} \cdot h}{\ell}\right) \]
    8. Taylor expanded in d around 0

      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}}\right)} \cdot h}{\ell}\right) \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}} \cdot \color{blue}{\frac{1}{8}}\right) \cdot h}{\ell}\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}} \cdot \color{blue}{\frac{1}{8}}\right) \cdot h}{\ell}\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{M}^{2} \cdot {D}^{2}}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      4. pow2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{{M}^{2} \cdot \left(D \cdot D\right)}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      5. associate-*l*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\left({M}^{2} \cdot D\right) \cdot D}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      6. pow2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\left(\left(M \cdot M\right) \cdot D\right) \cdot D}{{d}^{2}} \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      7. associate-/l*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      9. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      11. lower-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{{d}^{2}}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      12. pow2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot \frac{1}{8}\right) \cdot h}{\ell}\right) \]
      13. lift-*.f6467.6

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right) \cdot h}{\ell}\right) \]
    10. Applied rewrites67.6%

      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\left(\left(\left(M \cdot M\right) \cdot D\right) \cdot \frac{D}{d \cdot d}\right) \cdot 0.125\right)} \cdot h}{\ell}\right) \]

    if -8.49999999999999976e-157 < d < -2.60000000000000011e-302

    1. Initial program 42.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. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
    4. Applied rewrites38.6%

      \[\leadsto \color{blue}{\left(\left(\left(D \cdot D\right) \cdot \frac{-1 \cdot \left(M \cdot M\right)}{d}\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\right) \cdot -0.125} \]
    5. Taylor expanded in d around 0

      \[\leadsto \frac{1}{8} \cdot \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      3. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      4. associate-/l*N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      6. pow2N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      7. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      8. lower-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      9. pow2N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      10. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      11. pow3N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      12. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      13. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      14. lift-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      15. lift-sqrt.f6438.6

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    7. Applied rewrites38.6%

      \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \color{blue}{\sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      2. lift-/.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      3. associate-/l*N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      4. lower-*.f64N/A

        \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      5. lower-/.f6442.4

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    9. Applied rewrites42.4%

      \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]

    if -2.60000000000000011e-302 < d < 7.60000000000000024e-152

    1. Initial program 43.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. Taylor expanded in d around 0

      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
      3. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\color{blue}{\frac{h}{{\ell}^{3}}}} \]
      4. associate-/l*N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{\color{blue}{{\ell}^{3}}}} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{\color{blue}{{\ell}^{3}}}} \]
      6. unpow2N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\color{blue}{\ell}}^{3}}} \]
      7. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\color{blue}{\ell}}^{3}}} \]
      8. lower-/.f64N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{\color{blue}{3}}}} \]
      9. unpow2N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      10. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      11. lower-sqrt.f64N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      12. lower-/.f64N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
      13. unpow3N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      14. unpow2N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{2} \cdot \ell}} \]
      15. lower-*.f64N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{2} \cdot \ell}} \]
      16. unpow2N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      17. lower-*.f6439.8

        \[\leadsto \left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
    4. Applied rewrites39.8%

      \[\leadsto \color{blue}{\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]

    if 3.80000000000000012e145 < d

    1. Initial program 74.0%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      4. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      6. lower-*.f6468.5

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
    4. Applied rewrites68.5%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    5. Step-by-step derivation
      1. lift-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      3. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      4. sqrt-divN/A

        \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
      5. metadata-evalN/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      6. *-commutativeN/A

        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
      7. lower-/.f64N/A

        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
      8. *-commutativeN/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      9. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      10. lift-*.f6468.5

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    6. Applied rewrites68.5%

      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      3. lift-*.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      4. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      5. associate-*l/N/A

        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
      6. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      9. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
      10. lift-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
      11. *-commutativeN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      12. lower-*.f6468.5

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
    8. Applied rewrites68.5%

      \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      2. lift-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      3. sqrt-prodN/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\color{blue}{\ell}}} \]
      6. lower-sqrt.f6477.2

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
    10. Applied rewrites77.2%

      \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 12: 60.1% accurate, 1.5× speedup?

\[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d} \cdot 0.125\right) \cdot h}{\ell}\right)\\ t_1 := \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\ \mathbf{if}\;d \leq -5.8 \cdot 10^{+153}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\ \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot t\_1\\ \mathbf{elif}\;d \leq 7.5 \cdot 10^{-152}:\\ \;\;\;\;\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot t\_1\\ \mathbf{elif}\;d \leq 1.7 \cdot 10^{+20}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0
         (*
          (* (sqrt (/ d l)) (sqrt (/ d h)))
          (- 1.0 (/ (* (* (/ (* (* M M) (* D D)) (* d d)) 0.125) h) l))))
        (t_1 (sqrt (/ h (* (* l l) l)))))
   (if (<= d -5.8e+153)
     (* (- (sqrt (/ 1.0 (* l h)))) d)
     (if (<= d -8.5e-157)
       t_0
       (if (<= d -2.6e-302)
         (* (* 0.125 (* (* D D) (* M (/ M d)))) t_1)
         (if (<= d 7.5e-152)
           (* (* -0.125 (* (* D D) (/ (* M M) d))) t_1)
           (if (<= d 1.7e+20) t_0 (/ (* 1.0 d) (* (sqrt h) (sqrt l))))))))))
assert(d < h && h < l && l < M && M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((((M * M) * (D * D)) / (d * d)) * 0.125) * h) / l));
	double t_1 = sqrt((h / ((l * l) * l)));
	double tmp;
	if (d <= -5.8e+153) {
		tmp = -sqrt((1.0 / (l * h))) * d;
	} else if (d <= -8.5e-157) {
		tmp = t_0;
	} else if (d <= -2.6e-302) {
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_1;
	} else if (d <= 7.5e-152) {
		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_1;
	} else if (d <= 1.7e+20) {
		tmp = t_0;
	} else {
		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
	}
	return tmp;
}
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
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) :: t_1
    real(8) :: tmp
    t_0 = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - ((((((m * m) * (d_1 * d_1)) / (d * d)) * 0.125d0) * h) / l))
    t_1 = sqrt((h / ((l * l) * l)))
    if (d <= (-5.8d+153)) then
        tmp = -sqrt((1.0d0 / (l * h))) * d
    else if (d <= (-8.5d-157)) then
        tmp = t_0
    else if (d <= (-2.6d-302)) then
        tmp = (0.125d0 * ((d_1 * d_1) * (m * (m / d)))) * t_1
    else if (d <= 7.5d-152) then
        tmp = ((-0.125d0) * ((d_1 * d_1) * ((m * m) / d))) * t_1
    else if (d <= 1.7d+20) then
        tmp = t_0
    else
        tmp = (1.0d0 * d) / (sqrt(h) * sqrt(l))
    end if
    code = tmp
end function
assert d < h && h < l && l < M && M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - ((((((M * M) * (D * D)) / (d * d)) * 0.125) * h) / l));
	double t_1 = Math.sqrt((h / ((l * l) * l)));
	double tmp;
	if (d <= -5.8e+153) {
		tmp = -Math.sqrt((1.0 / (l * h))) * d;
	} else if (d <= -8.5e-157) {
		tmp = t_0;
	} else if (d <= -2.6e-302) {
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_1;
	} else if (d <= 7.5e-152) {
		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_1;
	} else if (d <= 1.7e+20) {
		tmp = t_0;
	} else {
		tmp = (1.0 * d) / (Math.sqrt(h) * Math.sqrt(l));
	}
	return tmp;
}
[d, h, l, M, D] = sort([d, h, l, M, D])
def code(d, h, l, M, D):
	t_0 = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - ((((((M * M) * (D * D)) / (d * d)) * 0.125) * h) / l))
	t_1 = math.sqrt((h / ((l * l) * l)))
	tmp = 0
	if d <= -5.8e+153:
		tmp = -math.sqrt((1.0 / (l * h))) * d
	elif d <= -8.5e-157:
		tmp = t_0
	elif d <= -2.6e-302:
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_1
	elif d <= 7.5e-152:
		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_1
	elif d <= 1.7e+20:
		tmp = t_0
	else:
		tmp = (1.0 * d) / (math.sqrt(h) * math.sqrt(l))
	return tmp
d, h, l, M, D = sort([d, h, l, M, D])
function code(d, h, l, M, D)
	t_0 = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(Float64(M * M) * Float64(D * D)) / Float64(d * d)) * 0.125) * h) / l)))
	t_1 = sqrt(Float64(h / Float64(Float64(l * l) * l)))
	tmp = 0.0
	if (d <= -5.8e+153)
		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
	elseif (d <= -8.5e-157)
		tmp = t_0;
	elseif (d <= -2.6e-302)
		tmp = Float64(Float64(0.125 * Float64(Float64(D * D) * Float64(M * Float64(M / d)))) * t_1);
	elseif (d <= 7.5e-152)
		tmp = Float64(Float64(-0.125 * Float64(Float64(D * D) * Float64(Float64(M * M) / d))) * t_1);
	elseif (d <= 1.7e+20)
		tmp = t_0;
	else
		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
	end
	return tmp
end
d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((((M * M) * (D * D)) / (d * d)) * 0.125) * h) / l));
	t_1 = sqrt((h / ((l * l) * l)));
	tmp = 0.0;
	if (d <= -5.8e+153)
		tmp = -sqrt((1.0 / (l * h))) * d;
	elseif (d <= -8.5e-157)
		tmp = t_0;
	elseif (d <= -2.6e-302)
		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_1;
	elseif (d <= 7.5e-152)
		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_1;
	elseif (d <= 1.7e+20)
		tmp = t_0;
	else
		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
	end
	tmp_2 = tmp;
end
NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(N[(M * M), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(h / N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -5.8e+153], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], If[LessEqual[d, -8.5e-157], t$95$0, If[LessEqual[d, -2.6e-302], N[(N[(0.125 * N[(N[(D * D), $MachinePrecision] * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, 7.5e-152], N[(N[(-0.125 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, 1.7e+20], t$95$0, N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
\\
\begin{array}{l}
t_0 := \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d} \cdot 0.125\right) \cdot h}{\ell}\right)\\
t_1 := \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\
\mathbf{if}\;d \leq -5.8 \cdot 10^{+153}:\\
\;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\

\mathbf{elif}\;d \leq -8.5 \cdot 10^{-157}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\
\;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot t\_1\\

\mathbf{elif}\;d \leq 7.5 \cdot 10^{-152}:\\
\;\;\;\;\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot t\_1\\

\mathbf{elif}\;d \leq 1.7 \cdot 10^{+20}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -5.80000000000000004e153

    1. Initial program 68.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. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      4. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      6. lower-*.f646.5

        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
    4. Applied rewrites6.5%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    5. Taylor expanded in h around -inf

      \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
    6. Step-by-step derivation
      1. sqrt-pow2N/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
      2. metadata-evalN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
      3. metadata-evalN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
      4. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
      5. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
      6. lower-neg.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
      7. *-commutativeN/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      8. lower-sqrt.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      9. lift-/.f64N/A

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      10. lift-*.f6470.8

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
    7. Applied rewrites70.8%

      \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

    if -5.80000000000000004e153 < d < -8.49999999999999976e-157 or 7.5e-152 < d < 1.7e20

    1. Initial program 75.0%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      3. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      7. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      8. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
      9. associate-*r/N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      10. lower-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
    3. Applied rewrites76.4%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
    4. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      6. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      7. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      8. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      9. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      10. *-commutativeN/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      12. pow1/2N/A

        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      13. lower-sqrt.f64N/A

        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      14. lift-/.f64N/A

        \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      15. pow1/2N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      16. lower-sqrt.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
      17. lift-/.f6476.4

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    5. Applied rewrites76.4%

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
    6. Taylor expanded in d around 0

      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{{d}^{2}}\right)} \cdot h}{\ell}\right) \]
    7. Step-by-step derivation
      1. Applied rewrites63.2%

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\color{blue}{\left(\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d} \cdot 0.125\right)} \cdot h}{\ell}\right) \]

      if -8.49999999999999976e-157 < d < -2.60000000000000011e-302

      1. Initial program 42.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. Taylor expanded in h around -inf

        \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
      4. Applied rewrites38.6%

        \[\leadsto \color{blue}{\left(\left(\left(D \cdot D\right) \cdot \frac{-1 \cdot \left(M \cdot M\right)}{d}\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\right) \cdot -0.125} \]
      5. Taylor expanded in d around 0

        \[\leadsto \frac{1}{8} \cdot \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        4. associate-/l*N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        5. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        6. pow2N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        7. lift-*.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        8. lower-/.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        9. pow2N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        10. lift-*.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        11. pow3N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        12. lift-*.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        13. lift-*.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        14. lift-/.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        15. lift-sqrt.f6438.6

          \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      7. Applied rewrites38.6%

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \color{blue}{\sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]
      8. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        2. lift-/.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        3. associate-/l*N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        4. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        5. lower-/.f6442.4

          \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      9. Applied rewrites42.4%

        \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]

      if -2.60000000000000011e-302 < d < 7.5e-152

      1. Initial program 43.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. Taylor expanded in d around 0

        \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
      3. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\color{blue}{\frac{h}{{\ell}^{3}}}} \]
        4. associate-/l*N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{\color{blue}{{\ell}^{3}}}} \]
        5. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{\color{blue}{{\ell}^{3}}}} \]
        6. unpow2N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\color{blue}{\ell}}^{3}}} \]
        7. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\color{blue}{\ell}}^{3}}} \]
        8. lower-/.f64N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{\color{blue}{3}}}} \]
        9. unpow2N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        10. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        11. lower-sqrt.f64N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        12. lower-/.f64N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
        13. unpow3N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        14. unpow2N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{2} \cdot \ell}} \]
        15. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{2} \cdot \ell}} \]
        16. unpow2N/A

          \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        17. lower-*.f6439.8

          \[\leadsto \left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
      4. Applied rewrites39.8%

        \[\leadsto \color{blue}{\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]

      if 1.7e20 < d

      1. Initial program 75.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. Taylor expanded in d around inf

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
        2. lower-*.f64N/A

          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
        3. lower-sqrt.f64N/A

          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
        4. lower-/.f64N/A

          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
        5. *-commutativeN/A

          \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
        6. lower-*.f6458.3

          \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      4. Applied rewrites58.3%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
      5. Step-by-step derivation
        1. lift-sqrt.f64N/A

          \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
        2. lift-*.f64N/A

          \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
        3. lift-/.f64N/A

          \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
        4. sqrt-divN/A

          \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
        5. metadata-evalN/A

          \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
        6. *-commutativeN/A

          \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
        7. lower-/.f64N/A

          \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
        8. *-commutativeN/A

          \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
        9. lift-sqrt.f64N/A

          \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
        10. lift-*.f6458.5

          \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      6. Applied rewrites58.5%

        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
        3. lift-*.f64N/A

          \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
        4. lift-sqrt.f64N/A

          \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
        5. associate-*l/N/A

          \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
        6. *-commutativeN/A

          \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
        7. lower-/.f64N/A

          \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
        8. lower-*.f64N/A

          \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
        9. *-commutativeN/A

          \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
        10. lift-sqrt.f64N/A

          \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
        11. *-commutativeN/A

          \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
        12. lower-*.f6458.6

          \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
      8. Applied rewrites58.6%

        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      9. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
        2. lift-sqrt.f64N/A

          \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
        3. sqrt-prodN/A

          \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
        5. lower-sqrt.f64N/A

          \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\color{blue}{\ell}}} \]
        6. lower-sqrt.f6468.5

          \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
      10. Applied rewrites68.5%

        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
    8. Recombined 5 regimes into one program.
    9. Add Preprocessing

    Alternative 13: 56.5% accurate, 2.0× speedup?

    \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -8.5 \cdot 10^{+149}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{elif}\;d \leq -3.5 \cdot 10^{-49}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\ \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\ \mathbf{elif}\;d \leq 2.2 \cdot 10^{-133}:\\ \;\;\;\;\frac{\frac{\sqrt{\ell \cdot h} \cdot \left(\left(\left(M \cdot M\right) \cdot D\right) \cdot D\right)}{d} \cdot -0.125}{\ell \cdot \ell}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
    NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
    (FPCore (d h l M D)
     :precision binary64
     (if (<= d -8.5e+149)
       (* (- (sqrt (/ 1.0 (* l h)))) d)
       (if (<= d -3.5e-49)
         (* (* (sqrt (/ d l)) (sqrt (/ d h))) 1.0)
         (if (<= d -2.6e-302)
           (* (* 0.125 (* (* D D) (* M (/ M d)))) (sqrt (/ h (* (* l l) l))))
           (if (<= d 2.2e-133)
             (/ (* (/ (* (sqrt (* l h)) (* (* (* M M) D) D)) d) -0.125) (* l l))
             (/ (* 1.0 d) (* (sqrt h) (sqrt l))))))))
    assert(d < h && h < l && l < M && M < D);
    double code(double d, double h, double l, double M, double D) {
    	double tmp;
    	if (d <= -8.5e+149) {
    		tmp = -sqrt((1.0 / (l * h))) * d;
    	} else if (d <= -3.5e-49) {
    		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
    	} else if (d <= -2.6e-302) {
    		tmp = (0.125 * ((D * D) * (M * (M / d)))) * sqrt((h / ((l * l) * l)));
    	} else if (d <= 2.2e-133) {
    		tmp = (((sqrt((l * h)) * (((M * M) * D) * D)) / d) * -0.125) / (l * l);
    	} else {
    		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
    	}
    	return tmp;
    }
    
    NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
    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 <= (-8.5d+149)) then
            tmp = -sqrt((1.0d0 / (l * h))) * d
        else if (d <= (-3.5d-49)) then
            tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0d0
        else if (d <= (-2.6d-302)) then
            tmp = (0.125d0 * ((d_1 * d_1) * (m * (m / d)))) * sqrt((h / ((l * l) * l)))
        else if (d <= 2.2d-133) then
            tmp = (((sqrt((l * h)) * (((m * m) * d_1) * d_1)) / d) * (-0.125d0)) / (l * l)
        else
            tmp = (1.0d0 * d) / (sqrt(h) * sqrt(l))
        end if
        code = tmp
    end function
    
    assert d < h && h < l && l < M && M < D;
    public static double code(double d, double h, double l, double M, double D) {
    	double tmp;
    	if (d <= -8.5e+149) {
    		tmp = -Math.sqrt((1.0 / (l * h))) * d;
    	} else if (d <= -3.5e-49) {
    		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * 1.0;
    	} else if (d <= -2.6e-302) {
    		tmp = (0.125 * ((D * D) * (M * (M / d)))) * Math.sqrt((h / ((l * l) * l)));
    	} else if (d <= 2.2e-133) {
    		tmp = (((Math.sqrt((l * h)) * (((M * M) * D) * D)) / d) * -0.125) / (l * l);
    	} else {
    		tmp = (1.0 * d) / (Math.sqrt(h) * Math.sqrt(l));
    	}
    	return tmp;
    }
    
    [d, h, l, M, D] = sort([d, h, l, M, D])
    def code(d, h, l, M, D):
    	tmp = 0
    	if d <= -8.5e+149:
    		tmp = -math.sqrt((1.0 / (l * h))) * d
    	elif d <= -3.5e-49:
    		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * 1.0
    	elif d <= -2.6e-302:
    		tmp = (0.125 * ((D * D) * (M * (M / d)))) * math.sqrt((h / ((l * l) * l)))
    	elif d <= 2.2e-133:
    		tmp = (((math.sqrt((l * h)) * (((M * M) * D) * D)) / d) * -0.125) / (l * l)
    	else:
    		tmp = (1.0 * d) / (math.sqrt(h) * math.sqrt(l))
    	return tmp
    
    d, h, l, M, D = sort([d, h, l, M, D])
    function code(d, h, l, M, D)
    	tmp = 0.0
    	if (d <= -8.5e+149)
    		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
    	elseif (d <= -3.5e-49)
    		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
    	elseif (d <= -2.6e-302)
    		tmp = Float64(Float64(0.125 * Float64(Float64(D * D) * Float64(M * Float64(M / d)))) * sqrt(Float64(h / Float64(Float64(l * l) * l))));
    	elseif (d <= 2.2e-133)
    		tmp = Float64(Float64(Float64(Float64(sqrt(Float64(l * h)) * Float64(Float64(Float64(M * M) * D) * D)) / d) * -0.125) / Float64(l * l));
    	else
    		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
    	end
    	return tmp
    end
    
    d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
    function tmp_2 = code(d, h, l, M, D)
    	tmp = 0.0;
    	if (d <= -8.5e+149)
    		tmp = -sqrt((1.0 / (l * h))) * d;
    	elseif (d <= -3.5e-49)
    		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
    	elseif (d <= -2.6e-302)
    		tmp = (0.125 * ((D * D) * (M * (M / d)))) * sqrt((h / ((l * l) * l)));
    	elseif (d <= 2.2e-133)
    		tmp = (((sqrt((l * h)) * (((M * M) * D) * D)) / d) * -0.125) / (l * l);
    	else
    		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
    code[d_, h_, l_, M_, D_] := If[LessEqual[d, -8.5e+149], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], If[LessEqual[d, -3.5e-49], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[d, -2.6e-302], N[(N[(0.125 * N[(N[(D * D), $MachinePrecision] * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.2e-133], N[(N[(N[(N[(N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(M * M), $MachinePrecision] * D), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * -0.125), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
    \\
    \begin{array}{l}
    \mathbf{if}\;d \leq -8.5 \cdot 10^{+149}:\\
    \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\
    
    \mathbf{elif}\;d \leq -3.5 \cdot 10^{-49}:\\
    \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
    
    \mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\
    \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\
    
    \mathbf{elif}\;d \leq 2.2 \cdot 10^{-133}:\\
    \;\;\;\;\frac{\frac{\sqrt{\ell \cdot h} \cdot \left(\left(\left(M \cdot M\right) \cdot D\right) \cdot D\right)}{d} \cdot -0.125}{\ell \cdot \ell}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if d < -8.49999999999999956e149

      1. Initial program 68.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. Taylor expanded in d around inf

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
        2. lower-*.f64N/A

          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
        3. lower-sqrt.f64N/A

          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
        4. lower-/.f64N/A

          \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
        5. *-commutativeN/A

          \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
        6. lower-*.f646.5

          \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
      4. Applied rewrites6.5%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
      5. Taylor expanded in h around -inf

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
      6. Step-by-step derivation
        1. sqrt-pow2N/A

          \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
        2. metadata-evalN/A

          \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
        3. metadata-evalN/A

          \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
        4. *-commutativeN/A

          \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
        5. mul-1-negN/A

          \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
        6. lower-neg.f64N/A

          \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
        7. *-commutativeN/A

          \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
        8. lower-sqrt.f64N/A

          \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
        9. lift-/.f64N/A

          \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
        10. lift-*.f6470.9

          \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
      7. Applied rewrites70.9%

        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

      if -8.49999999999999956e149 < d < -3.50000000000000006e-49

      1. Initial program 81.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. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
        3. lift-/.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
        5. lift-*.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        7. lift-/.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        8. lift-/.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
        9. associate-*r/N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
        10. lower-/.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
      3. Applied rewrites83.4%

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
      4. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        6. lift-/.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        7. lift-/.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        8. metadata-evalN/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        9. lift-pow.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        10. *-commutativeN/A

          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        11. lower-*.f64N/A

          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        12. pow1/2N/A

          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        13. lower-sqrt.f64N/A

          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        14. lift-/.f64N/A

          \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        15. pow1/2N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        16. lower-sqrt.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
        17. lift-/.f6483.4

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
      5. Applied rewrites83.4%

        \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
      6. Taylor expanded in d around inf

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
      7. Step-by-step derivation
        1. Applied rewrites46.4%

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]

        if -3.50000000000000006e-49 < d < -2.60000000000000011e-302

        1. Initial program 53.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. Taylor expanded in h around -inf

          \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
        4. Applied rewrites35.7%

          \[\leadsto \color{blue}{\left(\left(\left(D \cdot D\right) \cdot \frac{-1 \cdot \left(M \cdot M\right)}{d}\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\right) \cdot -0.125} \]
        5. Taylor expanded in d around 0

          \[\leadsto \frac{1}{8} \cdot \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
        6. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
          4. associate-/l*N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
          5. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
          6. pow2N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
          7. lift-*.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
          8. lower-/.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
          9. pow2N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
          10. lift-*.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
          11. pow3N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          12. lift-*.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          13. lift-*.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          14. lift-/.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          15. lift-sqrt.f6435.7

            \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        7. Applied rewrites35.7%

          \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \color{blue}{\sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          2. lift-/.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          3. associate-/l*N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          4. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          5. lower-/.f6438.4

            \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
        9. Applied rewrites38.4%

          \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]

        if -2.60000000000000011e-302 < d < 2.2000000000000001e-133

        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. Taylor expanded in l around 0

          \[\leadsto \color{blue}{\frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right) + d \cdot \sqrt{\frac{{\ell}^{3}}{h}}}{{\ell}^{2}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right) + d \cdot \sqrt{\frac{{\ell}^{3}}{h}}}{\color{blue}{{\ell}^{2}}} \]
        4. Applied rewrites32.0%

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{\left(\left(M \cdot M\right) \cdot \left(D \cdot D\right)\right) \cdot \sqrt{\ell \cdot h}}{d}, -0.125, \sqrt{\frac{\left(\ell \cdot \ell\right) \cdot \ell}{h}} \cdot d\right)}{\ell \cdot \ell}} \]
        5. Taylor expanded in d around 0

          \[\leadsto \frac{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right)}{\color{blue}{\ell} \cdot \ell} \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{h \cdot \ell}\right) \cdot \frac{-1}{8}}{\ell \cdot \ell} \]
          2. associate-*l/N/A

            \[\leadsto \frac{\frac{\left({D}^{2} \cdot {M}^{2}\right) \cdot \sqrt{h \cdot \ell}}{d} \cdot \frac{-1}{8}}{\ell \cdot \ell} \]
          3. *-commutativeN/A

            \[\leadsto \frac{\frac{\left({M}^{2} \cdot {D}^{2}\right) \cdot \sqrt{h \cdot \ell}}{d} \cdot \frac{-1}{8}}{\ell \cdot \ell} \]
          4. pow2N/A

            \[\leadsto \frac{\frac{\left(\left(M \cdot M\right) \cdot {D}^{2}\right) \cdot \sqrt{h \cdot \ell}}{d} \cdot \frac{-1}{8}}{\ell \cdot \ell} \]
          5. pow2N/A

            \[\leadsto \frac{\frac{\left(\left(M \cdot M\right) \cdot \left(D \cdot D\right)\right) \cdot \sqrt{h \cdot \ell}}{d} \cdot \frac{-1}{8}}{\ell \cdot \ell} \]
          6. *-commutativeN/A

            \[\leadsto \frac{\frac{\left(\left(M \cdot M\right) \cdot \left(D \cdot D\right)\right) \cdot \sqrt{\ell \cdot h}}{d} \cdot \frac{-1}{8}}{\ell \cdot \ell} \]
          7. lower-*.f64N/A

            \[\leadsto \frac{\frac{\left(\left(M \cdot M\right) \cdot \left(D \cdot D\right)\right) \cdot \sqrt{\ell \cdot h}}{d} \cdot \frac{-1}{8}}{\ell \cdot \ell} \]
        7. Applied rewrites38.4%

          \[\leadsto \frac{\frac{\sqrt{\ell \cdot h} \cdot \left(\left(\left(M \cdot M\right) \cdot D\right) \cdot D\right)}{d} \cdot -0.125}{\color{blue}{\ell} \cdot \ell} \]

        if 2.2000000000000001e-133 < d

        1. Initial program 75.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. Taylor expanded in d around inf

          \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
          2. lower-*.f64N/A

            \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
          3. lower-sqrt.f64N/A

            \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
          4. lower-/.f64N/A

            \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
          5. *-commutativeN/A

            \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
          6. lower-*.f6449.6

            \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
        4. Applied rewrites49.6%

          \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
        5. Step-by-step derivation
          1. lift-sqrt.f64N/A

            \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
          2. lift-*.f64N/A

            \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
          3. lift-/.f64N/A

            \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
          4. sqrt-divN/A

            \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
          5. metadata-evalN/A

            \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
          6. *-commutativeN/A

            \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
          7. lower-/.f64N/A

            \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
          8. *-commutativeN/A

            \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
          9. lift-sqrt.f64N/A

            \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
          10. lift-*.f6449.8

            \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
        6. Applied rewrites49.8%

          \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
        7. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
          3. lift-*.f64N/A

            \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
          4. lift-sqrt.f64N/A

            \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
          5. associate-*l/N/A

            \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
          6. *-commutativeN/A

            \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
          8. lower-*.f64N/A

            \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
          9. *-commutativeN/A

            \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
          10. lift-sqrt.f64N/A

            \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
          11. *-commutativeN/A

            \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
          12. lower-*.f6449.8

            \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
        8. Applied rewrites49.8%

          \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
        9. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
          2. lift-sqrt.f64N/A

            \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
          3. sqrt-prodN/A

            \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
          5. lower-sqrt.f64N/A

            \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\color{blue}{\ell}}} \]
          6. lower-sqrt.f6459.5

            \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
        10. Applied rewrites59.5%

          \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
      8. Recombined 5 regimes into one program.
      9. Add Preprocessing

      Alternative 14: 51.6% accurate, 2.0× speedup?

      \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\ \mathbf{if}\;d \leq -8.5 \cdot 10^{+149}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{elif}\;d \leq -3.5 \cdot 10^{-49}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\ \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot t\_0\\ \mathbf{elif}\;d \leq 4 \cdot 10^{-206}:\\ \;\;\;\;\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
      NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
      (FPCore (d h l M D)
       :precision binary64
       (let* ((t_0 (sqrt (/ h (* (* l l) l)))))
         (if (<= d -8.5e+149)
           (* (- (sqrt (/ 1.0 (* l h)))) d)
           (if (<= d -3.5e-49)
             (* (* (sqrt (/ d l)) (sqrt (/ d h))) 1.0)
             (if (<= d -2.6e-302)
               (* (* 0.125 (* (* D D) (* M (/ M d)))) t_0)
               (if (<= d 4e-206)
                 (* (* -0.125 (* (* D D) (/ (* M M) d))) t_0)
                 (/ (* 1.0 d) (* (sqrt h) (sqrt l)))))))))
      assert(d < h && h < l && l < M && M < D);
      double code(double d, double h, double l, double M, double D) {
      	double t_0 = sqrt((h / ((l * l) * l)));
      	double tmp;
      	if (d <= -8.5e+149) {
      		tmp = -sqrt((1.0 / (l * h))) * d;
      	} else if (d <= -3.5e-49) {
      		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
      	} else if (d <= -2.6e-302) {
      		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_0;
      	} else if (d <= 4e-206) {
      		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_0;
      	} else {
      		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
      	}
      	return tmp;
      }
      
      NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
      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((h / ((l * l) * l)))
          if (d <= (-8.5d+149)) then
              tmp = -sqrt((1.0d0 / (l * h))) * d
          else if (d <= (-3.5d-49)) then
              tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0d0
          else if (d <= (-2.6d-302)) then
              tmp = (0.125d0 * ((d_1 * d_1) * (m * (m / d)))) * t_0
          else if (d <= 4d-206) then
              tmp = ((-0.125d0) * ((d_1 * d_1) * ((m * m) / d))) * t_0
          else
              tmp = (1.0d0 * d) / (sqrt(h) * sqrt(l))
          end if
          code = tmp
      end function
      
      assert d < h && h < l && l < M && M < D;
      public static double code(double d, double h, double l, double M, double D) {
      	double t_0 = Math.sqrt((h / ((l * l) * l)));
      	double tmp;
      	if (d <= -8.5e+149) {
      		tmp = -Math.sqrt((1.0 / (l * h))) * d;
      	} else if (d <= -3.5e-49) {
      		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * 1.0;
      	} else if (d <= -2.6e-302) {
      		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_0;
      	} else if (d <= 4e-206) {
      		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_0;
      	} else {
      		tmp = (1.0 * d) / (Math.sqrt(h) * Math.sqrt(l));
      	}
      	return tmp;
      }
      
      [d, h, l, M, D] = sort([d, h, l, M, D])
      def code(d, h, l, M, D):
      	t_0 = math.sqrt((h / ((l * l) * l)))
      	tmp = 0
      	if d <= -8.5e+149:
      		tmp = -math.sqrt((1.0 / (l * h))) * d
      	elif d <= -3.5e-49:
      		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * 1.0
      	elif d <= -2.6e-302:
      		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_0
      	elif d <= 4e-206:
      		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_0
      	else:
      		tmp = (1.0 * d) / (math.sqrt(h) * math.sqrt(l))
      	return tmp
      
      d, h, l, M, D = sort([d, h, l, M, D])
      function code(d, h, l, M, D)
      	t_0 = sqrt(Float64(h / Float64(Float64(l * l) * l)))
      	tmp = 0.0
      	if (d <= -8.5e+149)
      		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
      	elseif (d <= -3.5e-49)
      		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
      	elseif (d <= -2.6e-302)
      		tmp = Float64(Float64(0.125 * Float64(Float64(D * D) * Float64(M * Float64(M / d)))) * t_0);
      	elseif (d <= 4e-206)
      		tmp = Float64(Float64(-0.125 * Float64(Float64(D * D) * Float64(Float64(M * M) / d))) * t_0);
      	else
      		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
      	end
      	return tmp
      end
      
      d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
      function tmp_2 = code(d, h, l, M, D)
      	t_0 = sqrt((h / ((l * l) * l)));
      	tmp = 0.0;
      	if (d <= -8.5e+149)
      		tmp = -sqrt((1.0 / (l * h))) * d;
      	elseif (d <= -3.5e-49)
      		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
      	elseif (d <= -2.6e-302)
      		tmp = (0.125 * ((D * D) * (M * (M / d)))) * t_0;
      	elseif (d <= 4e-206)
      		tmp = (-0.125 * ((D * D) * ((M * M) / d))) * t_0;
      	else
      		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
      	end
      	tmp_2 = tmp;
      end
      
      NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h / N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -8.5e+149], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], If[LessEqual[d, -3.5e-49], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[d, -2.6e-302], N[(N[(0.125 * N[(N[(D * D), $MachinePrecision] * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[d, 4e-206], N[(N[(-0.125 * N[(N[(D * D), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
      
      \begin{array}{l}
      [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
      \\
      \begin{array}{l}
      t_0 := \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\
      \mathbf{if}\;d \leq -8.5 \cdot 10^{+149}:\\
      \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\
      
      \mathbf{elif}\;d \leq -3.5 \cdot 10^{-49}:\\
      \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
      
      \mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\
      \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot t\_0\\
      
      \mathbf{elif}\;d \leq 4 \cdot 10^{-206}:\\
      \;\;\;\;\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot t\_0\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 5 regimes
      2. if d < -8.49999999999999956e149

        1. Initial program 68.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. Taylor expanded in d around inf

          \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
          2. lower-*.f64N/A

            \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
          3. lower-sqrt.f64N/A

            \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
          4. lower-/.f64N/A

            \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
          5. *-commutativeN/A

            \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
          6. lower-*.f646.5

            \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
        4. Applied rewrites6.5%

          \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
        5. Taylor expanded in h around -inf

          \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
        6. Step-by-step derivation
          1. sqrt-pow2N/A

            \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
          2. metadata-evalN/A

            \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
          3. metadata-evalN/A

            \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
          4. *-commutativeN/A

            \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
          5. mul-1-negN/A

            \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
          6. lower-neg.f64N/A

            \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
          7. *-commutativeN/A

            \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
          8. lower-sqrt.f64N/A

            \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
          9. lift-/.f64N/A

            \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
          10. lift-*.f6470.9

            \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
        7. Applied rewrites70.9%

          \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

        if -8.49999999999999956e149 < d < -3.50000000000000006e-49

        1. Initial program 81.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. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
          2. lift-*.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
          3. lift-/.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          6. lift-*.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          7. lift-/.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          8. lift-/.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
          9. associate-*r/N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
          10. lower-/.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
        3. Applied rewrites83.4%

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
        4. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          6. lift-/.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          7. lift-/.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          8. metadata-evalN/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          9. lift-pow.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          10. *-commutativeN/A

            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          11. lower-*.f64N/A

            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          12. pow1/2N/A

            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          13. lower-sqrt.f64N/A

            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          14. lift-/.f64N/A

            \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          15. pow1/2N/A

            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          16. lower-sqrt.f64N/A

            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
          17. lift-/.f6483.4

            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
        5. Applied rewrites83.4%

          \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
        6. Taylor expanded in d around inf

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
        7. Step-by-step derivation
          1. Applied rewrites46.4%

            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]

          if -3.50000000000000006e-49 < d < -2.60000000000000011e-302

          1. Initial program 53.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. Taylor expanded in h around -inf

            \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
          3. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
          4. Applied rewrites35.7%

            \[\leadsto \color{blue}{\left(\left(\left(D \cdot D\right) \cdot \frac{-1 \cdot \left(M \cdot M\right)}{d}\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\right) \cdot -0.125} \]
          5. Taylor expanded in d around 0

            \[\leadsto \frac{1}{8} \cdot \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
          6. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            3. lower-*.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            4. associate-/l*N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            5. lower-*.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            6. pow2N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            7. lift-*.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            8. lower-/.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            9. pow2N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            10. lift-*.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            11. pow3N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
            12. lift-*.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
            13. lift-*.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
            14. lift-/.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
            15. lift-sqrt.f6435.7

              \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          7. Applied rewrites35.7%

            \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \color{blue}{\sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]
          8. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
            2. lift-/.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
            3. associate-/l*N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
            5. lower-/.f6438.4

              \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          9. Applied rewrites38.4%

            \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]

          if -2.60000000000000011e-302 < d < 4.00000000000000011e-206

          1. Initial program 37.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. Taylor expanded in d around 0

            \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
          3. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
            3. lower-*.f64N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\color{blue}{\frac{h}{{\ell}^{3}}}} \]
            4. associate-/l*N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{\color{blue}{{\ell}^{3}}}} \]
            5. lower-*.f64N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{\color{blue}{{\ell}^{3}}}} \]
            6. unpow2N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\color{blue}{\ell}}^{3}}} \]
            7. lower-*.f64N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\color{blue}{\ell}}^{3}}} \]
            8. lower-/.f64N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{\color{blue}{3}}}} \]
            9. unpow2N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            10. lower-*.f64N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            11. lower-sqrt.f64N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            12. lower-/.f64N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
            13. unpow3N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
            14. unpow2N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{2} \cdot \ell}} \]
            15. lower-*.f64N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{2} \cdot \ell}} \]
            16. unpow2N/A

              \[\leadsto \left(\frac{-1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
            17. lower-*.f6440.2

              \[\leadsto \left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
          4. Applied rewrites40.2%

            \[\leadsto \color{blue}{\left(-0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]

          if 4.00000000000000011e-206 < d

          1. Initial program 72.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. Taylor expanded in d around inf

            \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
          3. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
            2. lower-*.f64N/A

              \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
            4. lower-/.f64N/A

              \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
            5. *-commutativeN/A

              \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
            6. lower-*.f6446.1

              \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
          4. Applied rewrites46.1%

            \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
          5. Step-by-step derivation
            1. lift-sqrt.f64N/A

              \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
            2. lift-*.f64N/A

              \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
            3. lift-/.f64N/A

              \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
            4. sqrt-divN/A

              \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
            5. metadata-evalN/A

              \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
            6. *-commutativeN/A

              \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
            7. lower-/.f64N/A

              \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
            8. *-commutativeN/A

              \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
            9. lift-sqrt.f64N/A

              \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
            10. lift-*.f6446.3

              \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
          6. Applied rewrites46.3%

            \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
          7. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
            2. lift-/.f64N/A

              \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
            3. lift-*.f64N/A

              \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
            4. lift-sqrt.f64N/A

              \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
            5. associate-*l/N/A

              \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
            6. *-commutativeN/A

              \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
            7. lower-/.f64N/A

              \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
            8. lower-*.f64N/A

              \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
            9. *-commutativeN/A

              \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
            10. lift-sqrt.f64N/A

              \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
            11. *-commutativeN/A

              \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
            12. lower-*.f6446.3

              \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
          8. Applied rewrites46.3%

            \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
          9. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
            2. lift-sqrt.f64N/A

              \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
            3. sqrt-prodN/A

              \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
            5. lower-sqrt.f64N/A

              \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\color{blue}{\ell}}} \]
            6. lower-sqrt.f6454.9

              \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
          10. Applied rewrites54.9%

            \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
        8. Recombined 5 regimes into one program.
        9. Add Preprocessing

        Alternative 15: 51.1% accurate, 0.4× speedup?

        \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-103}:\\ \;\;\;\;t\_1 \cdot \left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{\left(d \cdot d\right) \cdot \ell} \cdot -0.125\right)\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-200}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot 1\\ \end{array} \end{array} \]
        NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
        (FPCore (d h l M D)
         :precision binary64
         (let* ((t_0
                 (*
                  (* (pow (/ d h) (/ 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)))))
                (t_1 (* (sqrt (/ d l)) (sqrt (/ d h)))))
           (if (<= t_0 -5e-103)
             (* t_1 (* (/ (* (* (* M M) h) (* D D)) (* (* d d) l)) -0.125))
             (if (<= t_0 4e-200) (/ d (sqrt (* h l))) (* t_1 1.0)))))
        assert(d < h && h < l && l < M && M < D);
        double code(double d, double h, double l, double M, double D) {
        	double t_0 = (pow((d / h), (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 t_1 = sqrt((d / l)) * sqrt((d / h));
        	double tmp;
        	if (t_0 <= -5e-103) {
        		tmp = t_1 * (((((M * M) * h) * (D * D)) / ((d * d) * l)) * -0.125);
        	} else if (t_0 <= 4e-200) {
        		tmp = d / sqrt((h * l));
        	} else {
        		tmp = t_1 * 1.0;
        	}
        	return tmp;
        }
        
        NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
        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) :: t_1
            real(8) :: tmp
            t_0 = (((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)))
            t_1 = sqrt((d / l)) * sqrt((d / h))
            if (t_0 <= (-5d-103)) then
                tmp = t_1 * (((((m * m) * h) * (d_1 * d_1)) / ((d * d) * l)) * (-0.125d0))
            else if (t_0 <= 4d-200) then
                tmp = d / sqrt((h * l))
            else
                tmp = t_1 * 1.0d0
            end if
            code = tmp
        end function
        
        assert d < h && h < l && l < M && M < D;
        public static double code(double d, double h, double l, double M, double D) {
        	double t_0 = (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)));
        	double t_1 = Math.sqrt((d / l)) * Math.sqrt((d / h));
        	double tmp;
        	if (t_0 <= -5e-103) {
        		tmp = t_1 * (((((M * M) * h) * (D * D)) / ((d * d) * l)) * -0.125);
        	} else if (t_0 <= 4e-200) {
        		tmp = d / Math.sqrt((h * l));
        	} else {
        		tmp = t_1 * 1.0;
        	}
        	return tmp;
        }
        
        [d, h, l, M, D] = sort([d, h, l, M, D])
        def code(d, h, l, M, D):
        	t_0 = (math.pow((d / h), (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)))
        	t_1 = math.sqrt((d / l)) * math.sqrt((d / h))
        	tmp = 0
        	if t_0 <= -5e-103:
        		tmp = t_1 * (((((M * M) * h) * (D * D)) / ((d * d) * l)) * -0.125)
        	elif t_0 <= 4e-200:
        		tmp = d / math.sqrt((h * l))
        	else:
        		tmp = t_1 * 1.0
        	return tmp
        
        d, h, l, M, D = sort([d, h, l, M, D])
        function code(d, h, l, M, D)
        	t_0 = Float64(Float64((Float64(d / h) ^ 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))))
        	t_1 = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)))
        	tmp = 0.0
        	if (t_0 <= -5e-103)
        		tmp = Float64(t_1 * Float64(Float64(Float64(Float64(Float64(M * M) * h) * Float64(D * D)) / Float64(Float64(d * d) * l)) * -0.125));
        	elseif (t_0 <= 4e-200)
        		tmp = Float64(d / sqrt(Float64(h * l)));
        	else
        		tmp = Float64(t_1 * 1.0);
        	end
        	return tmp
        end
        
        d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
        function tmp_2 = code(d, h, l, M, D)
        	t_0 = (((d / h) ^ (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)));
        	t_1 = sqrt((d / l)) * sqrt((d / h));
        	tmp = 0.0;
        	if (t_0 <= -5e-103)
        		tmp = t_1 * (((((M * M) * h) * (D * D)) / ((d * d) * l)) * -0.125);
        	elseif (t_0 <= 4e-200)
        		tmp = d / sqrt((h * l));
        	else
        		tmp = t_1 * 1.0;
        	end
        	tmp_2 = tmp;
        end
        
        NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(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]}, Block[{t$95$1 = N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-103], N[(t$95$1 * N[(N[(N[(N[(N[(M * M), $MachinePrecision] * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e-200], N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * 1.0), $MachinePrecision]]]]]
        
        \begin{array}{l}
        [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
        \\
        \begin{array}{l}
        t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
        t_1 := \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
        \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-103}:\\
        \;\;\;\;t\_1 \cdot \left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{\left(d \cdot d\right) \cdot \ell} \cdot -0.125\right)\\
        
        \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-200}:\\
        \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1 \cdot 1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.99999999999999966e-103

          1. Initial program 86.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. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
            2. lift-*.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
            3. lift-/.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
            5. lift-*.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            6. lift-*.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            7. lift-/.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            8. lift-/.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
            9. associate-*r/N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
            10. lower-/.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
          3. Applied rewrites84.9%

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
          4. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            6. lift-/.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            7. lift-/.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            8. metadata-evalN/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            9. lift-pow.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            10. *-commutativeN/A

              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            11. lower-*.f64N/A

              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            12. pow1/2N/A

              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            13. lower-sqrt.f64N/A

              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            14. lift-/.f64N/A

              \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            15. pow1/2N/A

              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            16. lower-sqrt.f64N/A

              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
            17. lift-/.f6484.9

              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
          5. Applied rewrites84.9%

            \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
          6. Taylor expanded in d around 0

            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)} \]
          7. Step-by-step derivation
            1. Applied rewrites51.8%

              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left(D \cdot D\right)}{\left(d \cdot d\right) \cdot \ell} \cdot -0.125\right)} \]

            if -4.99999999999999966e-103 < (*.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)))) < 3.9999999999999999e-200

            1. Initial program 49.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. Taylor expanded in d around inf

              \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
            3. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
              2. lower-*.f64N/A

                \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
              3. lower-sqrt.f64N/A

                \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
              4. lower-/.f64N/A

                \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
              5. *-commutativeN/A

                \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
              6. lower-*.f6445.7

                \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
            4. Applied rewrites45.7%

              \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
            5. Step-by-step derivation
              1. lift-sqrt.f64N/A

                \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
              2. lift-*.f64N/A

                \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
              3. lift-/.f64N/A

                \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
              4. sqrt-divN/A

                \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
              5. metadata-evalN/A

                \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
              6. *-commutativeN/A

                \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
              7. lower-/.f64N/A

                \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
              8. *-commutativeN/A

                \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
              9. lift-sqrt.f64N/A

                \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
              10. lift-*.f6445.6

                \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
            6. Applied rewrites45.6%

              \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
            7. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
              2. lift-/.f64N/A

                \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
              3. lift-*.f64N/A

                \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
              4. lift-sqrt.f64N/A

                \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
              5. associate-*l/N/A

                \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
              6. *-commutativeN/A

                \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
              7. lower-/.f64N/A

                \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
              8. lower-*.f64N/A

                \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
              9. *-commutativeN/A

                \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
              10. lift-sqrt.f64N/A

                \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
              11. *-commutativeN/A

                \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
              12. lower-*.f6445.7

                \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
            8. Applied rewrites45.7%

              \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
            9. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
              2. *-lft-identity45.7

                \[\leadsto \frac{d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
            10. Applied rewrites45.7%

              \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]

            if 3.9999999999999999e-200 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

            1. Initial program 57.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. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
              2. lift-*.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
              3. lift-/.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
              5. lift-*.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              6. lift-*.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              7. lift-/.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              8. lift-/.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
              9. associate-*r/N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
              10. lower-/.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
            3. Applied rewrites60.8%

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
            4. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              6. lift-/.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              7. lift-/.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              8. metadata-evalN/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              9. lift-pow.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              10. *-commutativeN/A

                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              11. lower-*.f64N/A

                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              12. pow1/2N/A

                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              13. lower-sqrt.f64N/A

                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              14. lift-/.f64N/A

                \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              15. pow1/2N/A

                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              16. lower-sqrt.f64N/A

                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
              17. lift-/.f6460.8

                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
            5. Applied rewrites60.8%

              \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
            6. Taylor expanded in d around inf

              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
            7. Step-by-step derivation
              1. Applied rewrites60.6%

                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
            8. Recombined 3 regimes into one program.
            9. Add Preprocessing

            Alternative 16: 49.4% accurate, 2.2× speedup?

            \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;d \leq -8.5 \cdot 10^{+149}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{elif}\;d \leq -3.5 \cdot 10^{-49}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\ \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
            NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
            (FPCore (d h l M D)
             :precision binary64
             (if (<= d -8.5e+149)
               (* (- (sqrt (/ 1.0 (* l h)))) d)
               (if (<= d -3.5e-49)
                 (* (* (sqrt (/ d l)) (sqrt (/ d h))) 1.0)
                 (if (<= d -2.6e-302)
                   (* (* 0.125 (* (* D D) (* M (/ M d)))) (sqrt (/ h (* (* l l) l))))
                   (/ (* 1.0 d) (* (sqrt h) (sqrt l)))))))
            assert(d < h && h < l && l < M && M < D);
            double code(double d, double h, double l, double M, double D) {
            	double tmp;
            	if (d <= -8.5e+149) {
            		tmp = -sqrt((1.0 / (l * h))) * d;
            	} else if (d <= -3.5e-49) {
            		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
            	} else if (d <= -2.6e-302) {
            		tmp = (0.125 * ((D * D) * (M * (M / d)))) * sqrt((h / ((l * l) * l)));
            	} else {
            		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
            	}
            	return tmp;
            }
            
            NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
            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 <= (-8.5d+149)) then
                    tmp = -sqrt((1.0d0 / (l * h))) * d
                else if (d <= (-3.5d-49)) then
                    tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0d0
                else if (d <= (-2.6d-302)) then
                    tmp = (0.125d0 * ((d_1 * d_1) * (m * (m / d)))) * sqrt((h / ((l * l) * l)))
                else
                    tmp = (1.0d0 * d) / (sqrt(h) * sqrt(l))
                end if
                code = tmp
            end function
            
            assert d < h && h < l && l < M && M < D;
            public static double code(double d, double h, double l, double M, double D) {
            	double tmp;
            	if (d <= -8.5e+149) {
            		tmp = -Math.sqrt((1.0 / (l * h))) * d;
            	} else if (d <= -3.5e-49) {
            		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * 1.0;
            	} else if (d <= -2.6e-302) {
            		tmp = (0.125 * ((D * D) * (M * (M / d)))) * Math.sqrt((h / ((l * l) * l)));
            	} else {
            		tmp = (1.0 * d) / (Math.sqrt(h) * Math.sqrt(l));
            	}
            	return tmp;
            }
            
            [d, h, l, M, D] = sort([d, h, l, M, D])
            def code(d, h, l, M, D):
            	tmp = 0
            	if d <= -8.5e+149:
            		tmp = -math.sqrt((1.0 / (l * h))) * d
            	elif d <= -3.5e-49:
            		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * 1.0
            	elif d <= -2.6e-302:
            		tmp = (0.125 * ((D * D) * (M * (M / d)))) * math.sqrt((h / ((l * l) * l)))
            	else:
            		tmp = (1.0 * d) / (math.sqrt(h) * math.sqrt(l))
            	return tmp
            
            d, h, l, M, D = sort([d, h, l, M, D])
            function code(d, h, l, M, D)
            	tmp = 0.0
            	if (d <= -8.5e+149)
            		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
            	elseif (d <= -3.5e-49)
            		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
            	elseif (d <= -2.6e-302)
            		tmp = Float64(Float64(0.125 * Float64(Float64(D * D) * Float64(M * Float64(M / d)))) * sqrt(Float64(h / Float64(Float64(l * l) * l))));
            	else
            		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
            	end
            	return tmp
            end
            
            d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
            function tmp_2 = code(d, h, l, M, D)
            	tmp = 0.0;
            	if (d <= -8.5e+149)
            		tmp = -sqrt((1.0 / (l * h))) * d;
            	elseif (d <= -3.5e-49)
            		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
            	elseif (d <= -2.6e-302)
            		tmp = (0.125 * ((D * D) * (M * (M / d)))) * sqrt((h / ((l * l) * l)));
            	else
            		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
            	end
            	tmp_2 = tmp;
            end
            
            NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
            code[d_, h_, l_, M_, D_] := If[LessEqual[d, -8.5e+149], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], If[LessEqual[d, -3.5e-49], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[d, -2.6e-302], N[(N[(0.125 * N[(N[(D * D), $MachinePrecision] * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
            \\
            \begin{array}{l}
            \mathbf{if}\;d \leq -8.5 \cdot 10^{+149}:\\
            \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\
            
            \mathbf{elif}\;d \leq -3.5 \cdot 10^{-49}:\\
            \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
            
            \mathbf{elif}\;d \leq -2.6 \cdot 10^{-302}:\\
            \;\;\;\;\left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if d < -8.49999999999999956e149

              1. Initial program 68.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. Taylor expanded in d around inf

                \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
              3. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                2. lower-*.f64N/A

                  \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                4. lower-/.f64N/A

                  \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                5. *-commutativeN/A

                  \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                6. lower-*.f646.5

                  \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
              4. Applied rewrites6.5%

                \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
              5. Taylor expanded in h around -inf

                \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
              6. Step-by-step derivation
                1. sqrt-pow2N/A

                  \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
                2. metadata-evalN/A

                  \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
                3. metadata-evalN/A

                  \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
                4. *-commutativeN/A

                  \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
                5. mul-1-negN/A

                  \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
                6. lower-neg.f64N/A

                  \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
                7. *-commutativeN/A

                  \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                8. lower-sqrt.f64N/A

                  \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                9. lift-/.f64N/A

                  \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                10. lift-*.f6470.9

                  \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
              7. Applied rewrites70.9%

                \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

              if -8.49999999999999956e149 < d < -3.50000000000000006e-49

              1. Initial program 81.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. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
                3. lift-/.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                6. lift-*.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                7. lift-/.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                8. lift-/.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
                9. associate-*r/N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
                10. lower-/.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
              3. Applied rewrites83.4%

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
              4. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                6. lift-/.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                7. lift-/.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                8. metadata-evalN/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                9. lift-pow.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                10. *-commutativeN/A

                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                11. lower-*.f64N/A

                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                12. pow1/2N/A

                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                13. lower-sqrt.f64N/A

                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                14. lift-/.f64N/A

                  \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                15. pow1/2N/A

                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                16. lower-sqrt.f64N/A

                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                17. lift-/.f6483.4

                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
              5. Applied rewrites83.4%

                \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
              6. Taylor expanded in d around inf

                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
              7. Step-by-step derivation
                1. Applied rewrites46.4%

                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]

                if -3.50000000000000006e-49 < d < -2.60000000000000011e-302

                1. Initial program 53.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. Taylor expanded in h around -inf

                  \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
                4. Applied rewrites35.7%

                  \[\leadsto \color{blue}{\left(\left(\left(D \cdot D\right) \cdot \frac{-1 \cdot \left(M \cdot M\right)}{d}\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\right) \cdot -0.125} \]
                5. Taylor expanded in d around 0

                  \[\leadsto \frac{1}{8} \cdot \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
                6. Step-by-step derivation
                  1. associate-*r*N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  4. associate-/l*N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  6. pow2N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  8. lower-/.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  9. pow2N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  10. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  11. pow3N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  12. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  13. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  14. lift-/.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  15. lift-sqrt.f6435.7

                    \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                7. Applied rewrites35.7%

                  \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \color{blue}{\sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]
                8. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  2. lift-/.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  3. associate-/l*N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  4. lower-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  5. lower-/.f6438.4

                    \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                9. Applied rewrites38.4%

                  \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]

                if -2.60000000000000011e-302 < d

                1. Initial program 66.7%

                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                2. Taylor expanded in d around inf

                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                  2. lower-*.f64N/A

                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                  3. lower-sqrt.f64N/A

                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                  4. lower-/.f64N/A

                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                  5. *-commutativeN/A

                    \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  6. lower-*.f6441.8

                    \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                4. Applied rewrites41.8%

                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                5. Step-by-step derivation
                  1. lift-sqrt.f64N/A

                    \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  2. lift-*.f64N/A

                    \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  3. lift-/.f64N/A

                    \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  4. sqrt-divN/A

                    \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
                  5. metadata-evalN/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  6. *-commutativeN/A

                    \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                  7. lower-/.f64N/A

                    \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                  8. *-commutativeN/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  9. lift-sqrt.f64N/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  10. lift-*.f6441.9

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                6. Applied rewrites41.9%

                  \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
                  2. lift-/.f64N/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  3. lift-*.f64N/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  4. lift-sqrt.f64N/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  5. associate-*l/N/A

                    \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                  6. *-commutativeN/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                  7. lower-/.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
                  9. *-commutativeN/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
                  10. lift-sqrt.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
                  11. *-commutativeN/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                  12. lower-*.f6442.0

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                8. Applied rewrites42.0%

                  \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                9. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                  2. lift-sqrt.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                  3. sqrt-prodN/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
                  4. lower-*.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
                  5. lower-sqrt.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\color{blue}{\ell}}} \]
                  6. lower-sqrt.f6449.2

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
                10. Applied rewrites49.2%

                  \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
              8. Recombined 4 regimes into one program.
              9. Add Preprocessing

              Alternative 17: 49.3% accurate, 0.4× speedup?

              \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \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^{+36}:\\ \;\;\;\;\left(0.125 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-200}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \end{array} \end{array} \]
              NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
              (FPCore (d h l M D)
               :precision binary64
               (let* ((t_0
                       (*
                        (* (pow (/ d h) (/ 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))))))
                 (if (<= t_0 -1e+36)
                   (* (* 0.125 (* D (* D (/ (* M M) d)))) (sqrt (/ h (* (* l l) l))))
                   (if (<= t_0 4e-200)
                     (/ d (sqrt (* h l)))
                     (* (* (sqrt (/ d l)) (sqrt (/ d h))) 1.0)))))
              assert(d < h && h < l && l < M && M < D);
              double code(double d, double h, double l, double M, double D) {
              	double t_0 = (pow((d / h), (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 tmp;
              	if (t_0 <= -1e+36) {
              		tmp = (0.125 * (D * (D * ((M * M) / d)))) * sqrt((h / ((l * l) * l)));
              	} else if (t_0 <= 4e-200) {
              		tmp = d / sqrt((h * l));
              	} else {
              		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
              	}
              	return tmp;
              }
              
              NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
              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) ** (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)))
                  if (t_0 <= (-1d+36)) then
                      tmp = (0.125d0 * (d_1 * (d_1 * ((m * m) / d)))) * sqrt((h / ((l * l) * l)))
                  else if (t_0 <= 4d-200) then
                      tmp = d / sqrt((h * l))
                  else
                      tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0d0
                  end if
                  code = tmp
              end function
              
              assert d < h && h < l && l < M && M < D;
              public static double code(double d, double h, double l, double M, double D) {
              	double t_0 = (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)));
              	double tmp;
              	if (t_0 <= -1e+36) {
              		tmp = (0.125 * (D * (D * ((M * M) / d)))) * Math.sqrt((h / ((l * l) * l)));
              	} else if (t_0 <= 4e-200) {
              		tmp = d / Math.sqrt((h * l));
              	} else {
              		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * 1.0;
              	}
              	return tmp;
              }
              
              [d, h, l, M, D] = sort([d, h, l, M, D])
              def code(d, h, l, M, D):
              	t_0 = (math.pow((d / h), (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)))
              	tmp = 0
              	if t_0 <= -1e+36:
              		tmp = (0.125 * (D * (D * ((M * M) / d)))) * math.sqrt((h / ((l * l) * l)))
              	elif t_0 <= 4e-200:
              		tmp = d / math.sqrt((h * l))
              	else:
              		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * 1.0
              	return tmp
              
              d, h, l, M, D = sort([d, h, l, M, D])
              function code(d, h, l, M, D)
              	t_0 = Float64(Float64((Float64(d / h) ^ 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))))
              	tmp = 0.0
              	if (t_0 <= -1e+36)
              		tmp = Float64(Float64(0.125 * Float64(D * Float64(D * Float64(Float64(M * M) / d)))) * sqrt(Float64(h / Float64(Float64(l * l) * l))));
              	elseif (t_0 <= 4e-200)
              		tmp = Float64(d / sqrt(Float64(h * l)));
              	else
              		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
              	end
              	return tmp
              end
              
              d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
              function tmp_2 = code(d, h, l, M, D)
              	t_0 = (((d / h) ^ (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)));
              	tmp = 0.0;
              	if (t_0 <= -1e+36)
              		tmp = (0.125 * (D * (D * ((M * M) / d)))) * sqrt((h / ((l * l) * l)));
              	elseif (t_0 <= 4e-200)
              		tmp = d / sqrt((h * l));
              	else
              		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
              	end
              	tmp_2 = tmp;
              end
              
              NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
              code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(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]}, If[LessEqual[t$95$0, -1e+36], N[(N[(0.125 * N[(D * N[(D * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / N[(N[(l * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e-200], N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
              
              \begin{array}{l}
              [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
              \\
              \begin{array}{l}
              t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \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^{+36}:\\
              \;\;\;\;\left(0.125 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\\
              
              \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{-200}:\\
              \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 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)))) < -1.00000000000000004e36

                1. Initial program 85.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. Taylor expanded in h around -inf

                  \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot \color{blue}{\frac{-1}{8}} \]
                4. Applied rewrites30.8%

                  \[\leadsto \color{blue}{\left(\left(\left(D \cdot D\right) \cdot \frac{-1 \cdot \left(M \cdot M\right)}{d}\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}\right) \cdot -0.125} \]
                5. Taylor expanded in d around 0

                  \[\leadsto \frac{1}{8} \cdot \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
                6. Step-by-step derivation
                  1. associate-*r*N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  4. associate-/l*N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left({D}^{2} \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  6. pow2N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  8. lower-/.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{{M}^{2}}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  9. pow2N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  10. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}} \]
                  11. pow3N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  12. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  13. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  14. lift-/.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  15. lift-sqrt.f6430.8

                    \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                7. Applied rewrites30.8%

                  \[\leadsto \left(0.125 \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \color{blue}{\sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}}} \]
                8. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  3. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  4. lift-/.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(\left(D \cdot D\right) \cdot \frac{M \cdot M}{d}\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  5. associate-*l*N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  6. lower-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  7. lower-*.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  8. lift-/.f64N/A

                    \[\leadsto \left(\frac{1}{8} \cdot \left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                  9. lift-*.f6432.5

                    \[\leadsto \left(0.125 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]
                9. Applied rewrites32.5%

                  \[\leadsto \left(0.125 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot M}{d}\right)\right)\right) \cdot \sqrt{\frac{h}{\left(\ell \cdot \ell\right) \cdot \ell}} \]

                if -1.00000000000000004e36 < (*.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)))) < 3.9999999999999999e-200

                1. Initial program 59.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. Taylor expanded in d around inf

                  \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                  2. lower-*.f64N/A

                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                  3. lower-sqrt.f64N/A

                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                  4. lower-/.f64N/A

                    \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                  5. *-commutativeN/A

                    \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  6. lower-*.f6437.5

                    \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                4. Applied rewrites37.5%

                  \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                5. Step-by-step derivation
                  1. lift-sqrt.f64N/A

                    \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  2. lift-*.f64N/A

                    \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  3. lift-/.f64N/A

                    \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  4. sqrt-divN/A

                    \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
                  5. metadata-evalN/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  6. *-commutativeN/A

                    \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                  7. lower-/.f64N/A

                    \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                  8. *-commutativeN/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  9. lift-sqrt.f64N/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  10. lift-*.f6437.5

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                6. Applied rewrites37.5%

                  \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
                  2. lift-/.f64N/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  3. lift-*.f64N/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  4. lift-sqrt.f64N/A

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  5. associate-*l/N/A

                    \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                  6. *-commutativeN/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                  7. lower-/.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
                  9. *-commutativeN/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
                  10. lift-sqrt.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
                  11. *-commutativeN/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                  12. lower-*.f6437.5

                    \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                8. Applied rewrites37.5%

                  \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                9. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
                  2. *-lft-identity37.5

                    \[\leadsto \frac{d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
                10. Applied rewrites37.5%

                  \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]

                if 3.9999999999999999e-200 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                1. Initial program 57.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. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
                  2. lift-*.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
                  3. lift-/.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
                  5. lift-*.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  6. lift-*.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  7. lift-/.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  8. lift-/.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
                  9. associate-*r/N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
                  10. lower-/.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
                3. Applied rewrites60.8%

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
                4. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  6. lift-/.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  7. lift-/.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  8. metadata-evalN/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  9. lift-pow.f64N/A

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  10. *-commutativeN/A

                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  11. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  12. pow1/2N/A

                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  13. lower-sqrt.f64N/A

                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  14. lift-/.f64N/A

                    \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  15. pow1/2N/A

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  16. lower-sqrt.f64N/A

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                  17. lift-/.f6460.8

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
                5. Applied rewrites60.8%

                  \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
                6. Taylor expanded in d around inf

                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                7. Step-by-step derivation
                  1. Applied rewrites60.6%

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                8. Recombined 3 regimes into one program.
                9. Add Preprocessing

                Alternative 18: 46.4% accurate, 4.3× speedup?

                \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq -1.3 \cdot 10^{+52}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;\ell \leq 9.5 \cdot 10^{-222}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                (FPCore (d h l M D)
                 :precision binary64
                 (if (<= l -1.3e+52)
                   (* (* (sqrt (/ d l)) (sqrt (/ d h))) 1.0)
                   (if (<= l 9.5e-222)
                     (* (- (sqrt (/ 1.0 (* l h)))) d)
                     (/ (* 1.0 d) (* (sqrt h) (sqrt l))))))
                assert(d < h && h < l && l < M && M < D);
                double code(double d, double h, double l, double M, double D) {
                	double tmp;
                	if (l <= -1.3e+52) {
                		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
                	} else if (l <= 9.5e-222) {
                		tmp = -sqrt((1.0 / (l * h))) * d;
                	} else {
                		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
                	}
                	return tmp;
                }
                
                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                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 (l <= (-1.3d+52)) then
                        tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0d0
                    else if (l <= 9.5d-222) then
                        tmp = -sqrt((1.0d0 / (l * h))) * d
                    else
                        tmp = (1.0d0 * d) / (sqrt(h) * sqrt(l))
                    end if
                    code = tmp
                end function
                
                assert d < h && h < l && l < M && M < D;
                public static double code(double d, double h, double l, double M, double D) {
                	double tmp;
                	if (l <= -1.3e+52) {
                		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * 1.0;
                	} else if (l <= 9.5e-222) {
                		tmp = -Math.sqrt((1.0 / (l * h))) * d;
                	} else {
                		tmp = (1.0 * d) / (Math.sqrt(h) * Math.sqrt(l));
                	}
                	return tmp;
                }
                
                [d, h, l, M, D] = sort([d, h, l, M, D])
                def code(d, h, l, M, D):
                	tmp = 0
                	if l <= -1.3e+52:
                		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * 1.0
                	elif l <= 9.5e-222:
                		tmp = -math.sqrt((1.0 / (l * h))) * d
                	else:
                		tmp = (1.0 * d) / (math.sqrt(h) * math.sqrt(l))
                	return tmp
                
                d, h, l, M, D = sort([d, h, l, M, D])
                function code(d, h, l, M, D)
                	tmp = 0.0
                	if (l <= -1.3e+52)
                		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
                	elseif (l <= 9.5e-222)
                		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
                	else
                		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
                	end
                	return tmp
                end
                
                d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                function tmp_2 = code(d, h, l, M, D)
                	tmp = 0.0;
                	if (l <= -1.3e+52)
                		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
                	elseif (l <= 9.5e-222)
                		tmp = -sqrt((1.0 / (l * h))) * d;
                	else
                		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
                	end
                	tmp_2 = tmp;
                end
                
                NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.3e+52], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[l, 9.5e-222], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                \\
                \begin{array}{l}
                \mathbf{if}\;\ell \leq -1.3 \cdot 10^{+52}:\\
                \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                
                \mathbf{elif}\;\ell \leq 9.5 \cdot 10^{-222}:\\
                \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if l < -1.3e52

                  1. Initial program 56.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. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
                    3. lift-/.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{1}{2}} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    4. 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 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
                    5. lift-*.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\color{blue}{M \cdot D}}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    6. lift-*.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{\color{blue}{2 \cdot d}}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    7. lift-/.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\color{blue}{\left(\frac{M \cdot D}{2 \cdot d}\right)}}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    8. lift-/.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{h}{\ell}}\right) \]
                    9. associate-*r/N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
                    10. lower-/.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot h}{\ell}}\right) \]
                  3. Applied rewrites56.0%

                    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}}\right) \]
                  4. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    2. lift-/.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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    3. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    4. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    5. 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 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    6. lift-/.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\color{blue}{\left(\frac{d}{\ell}\right)}}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    7. lift-/.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    8. metadata-evalN/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    9. lift-pow.f64N/A

                      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    10. *-commutativeN/A

                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    12. pow1/2N/A

                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    13. lower-sqrt.f64N/A

                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    14. lift-/.f64N/A

                      \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    15. pow1/2N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    16. lower-sqrt.f64N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot \frac{1}{2}\right) \cdot h}{\ell}\right) \]
                    17. lift-/.f6456.0

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}}\right) \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
                  5. Applied rewrites56.0%

                    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \frac{\left(\left(\left(M \cdot \frac{D}{d + d}\right) \cdot \left(M \cdot \frac{D}{d + d}\right)\right) \cdot 0.5\right) \cdot h}{\ell}\right) \]
                  6. Taylor expanded in d around inf

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                  7. Step-by-step derivation
                    1. Applied rewrites45.8%

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]

                    if -1.3e52 < l < 9.5000000000000002e-222

                    1. Initial program 72.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. Taylor expanded in d around inf

                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      2. lower-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      3. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      4. lower-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      5. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      6. lower-*.f6413.7

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    4. Applied rewrites13.7%

                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                    5. Taylor expanded in h around -inf

                      \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
                    6. Step-by-step derivation
                      1. sqrt-pow2N/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
                      2. metadata-evalN/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
                      3. metadata-evalN/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
                      4. *-commutativeN/A

                        \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
                      5. mul-1-negN/A

                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
                      6. lower-neg.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
                      7. *-commutativeN/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      8. lower-sqrt.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      9. lift-/.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      10. lift-*.f6435.7

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                    7. Applied rewrites35.7%

                      \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

                    if 9.5000000000000002e-222 < l

                    1. Initial program 66.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. Taylor expanded in d around inf

                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      2. lower-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      3. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      4. lower-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      5. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      6. lower-*.f6445.3

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    4. Applied rewrites45.3%

                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                    5. Step-by-step derivation
                      1. lift-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      2. lift-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      3. lift-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      4. sqrt-divN/A

                        \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
                      5. metadata-evalN/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      6. *-commutativeN/A

                        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                      7. lower-/.f64N/A

                        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                      8. *-commutativeN/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      9. lift-sqrt.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      10. lift-*.f6445.4

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    6. Applied rewrites45.4%

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    7. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
                      2. lift-/.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      3. lift-*.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      4. lift-sqrt.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      5. associate-*l/N/A

                        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                      6. *-commutativeN/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                      7. lower-/.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                      8. lower-*.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
                      9. *-commutativeN/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
                      10. lift-sqrt.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
                      11. *-commutativeN/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                      12. lower-*.f6445.5

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                    8. Applied rewrites45.5%

                      \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                    9. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                      2. lift-sqrt.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                      3. sqrt-prodN/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
                      4. lower-*.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
                      5. lower-sqrt.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\color{blue}{\ell}}} \]
                      6. lower-sqrt.f6453.0

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
                    10. Applied rewrites53.0%

                      \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
                  8. Recombined 3 regimes into one program.
                  9. Add Preprocessing

                  Alternative 19: 46.4% accurate, 5.2× speedup?

                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 9.5 \cdot 10^{-222}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \end{array} \]
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  (FPCore (d h l M D)
                   :precision binary64
                   (if (<= l 9.5e-222)
                     (* (- (sqrt (/ 1.0 (* l h)))) d)
                     (/ (* 1.0 d) (* (sqrt h) (sqrt l)))))
                  assert(d < h && h < l && l < M && M < D);
                  double code(double d, double h, double l, double M, double D) {
                  	double tmp;
                  	if (l <= 9.5e-222) {
                  		tmp = -sqrt((1.0 / (l * h))) * d;
                  	} else {
                  		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
                  	}
                  	return tmp;
                  }
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  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 (l <= 9.5d-222) then
                          tmp = -sqrt((1.0d0 / (l * h))) * d
                      else
                          tmp = (1.0d0 * d) / (sqrt(h) * sqrt(l))
                      end if
                      code = tmp
                  end function
                  
                  assert d < h && h < l && l < M && M < D;
                  public static double code(double d, double h, double l, double M, double D) {
                  	double tmp;
                  	if (l <= 9.5e-222) {
                  		tmp = -Math.sqrt((1.0 / (l * h))) * d;
                  	} else {
                  		tmp = (1.0 * d) / (Math.sqrt(h) * Math.sqrt(l));
                  	}
                  	return tmp;
                  }
                  
                  [d, h, l, M, D] = sort([d, h, l, M, D])
                  def code(d, h, l, M, D):
                  	tmp = 0
                  	if l <= 9.5e-222:
                  		tmp = -math.sqrt((1.0 / (l * h))) * d
                  	else:
                  		tmp = (1.0 * d) / (math.sqrt(h) * math.sqrt(l))
                  	return tmp
                  
                  d, h, l, M, D = sort([d, h, l, M, D])
                  function code(d, h, l, M, D)
                  	tmp = 0.0
                  	if (l <= 9.5e-222)
                  		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
                  	else
                  		tmp = Float64(Float64(1.0 * d) / Float64(sqrt(h) * sqrt(l)));
                  	end
                  	return tmp
                  end
                  
                  d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                  function tmp_2 = code(d, h, l, M, D)
                  	tmp = 0.0;
                  	if (l <= 9.5e-222)
                  		tmp = -sqrt((1.0 / (l * h))) * d;
                  	else
                  		tmp = (1.0 * d) / (sqrt(h) * sqrt(l));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  code[d_, h_, l_, M_, D_] := If[LessEqual[l, 9.5e-222], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], N[(N[(1.0 * d), $MachinePrecision] / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;\ell \leq 9.5 \cdot 10^{-222}:\\
                  \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if l < 9.5000000000000002e-222

                    1. Initial program 66.7%

                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    2. Taylor expanded in d around inf

                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      2. lower-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      3. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      4. lower-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      5. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      6. lower-*.f6411.3

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    4. Applied rewrites11.3%

                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                    5. Taylor expanded in h around -inf

                      \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
                    6. Step-by-step derivation
                      1. sqrt-pow2N/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
                      2. metadata-evalN/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
                      3. metadata-evalN/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
                      4. *-commutativeN/A

                        \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
                      5. mul-1-negN/A

                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
                      6. lower-neg.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
                      7. *-commutativeN/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      8. lower-sqrt.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      9. lift-/.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      10. lift-*.f6441.5

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                    7. Applied rewrites41.5%

                      \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

                    if 9.5000000000000002e-222 < l

                    1. Initial program 66.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. Taylor expanded in d around inf

                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      2. lower-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      3. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      4. lower-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      5. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      6. lower-*.f6445.3

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    4. Applied rewrites45.3%

                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                    5. Step-by-step derivation
                      1. lift-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      2. lift-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      3. lift-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      4. sqrt-divN/A

                        \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
                      5. metadata-evalN/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      6. *-commutativeN/A

                        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                      7. lower-/.f64N/A

                        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                      8. *-commutativeN/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      9. lift-sqrt.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      10. lift-*.f6445.4

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    6. Applied rewrites45.4%

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    7. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
                      2. lift-/.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      3. lift-*.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      4. lift-sqrt.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      5. associate-*l/N/A

                        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                      6. *-commutativeN/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                      7. lower-/.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                      8. lower-*.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
                      9. *-commutativeN/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
                      10. lift-sqrt.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
                      11. *-commutativeN/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                      12. lower-*.f6445.5

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                    8. Applied rewrites45.5%

                      \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                    9. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                      2. lift-sqrt.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                      3. sqrt-prodN/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
                      4. lower-*.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
                      5. lower-sqrt.f64N/A

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\color{blue}{\ell}}} \]
                      6. lower-sqrt.f6453.0

                        \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \sqrt{\ell}} \]
                    10. Applied rewrites53.0%

                      \[\leadsto \frac{1 \cdot d}{\sqrt{h} \cdot \color{blue}{\sqrt{\ell}}} \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 20: 45.2% accurate, 5.2× speedup?

                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 9.5 \cdot 10^{-222}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d\\ \end{array} \end{array} \]
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  (FPCore (d h l M D)
                   :precision binary64
                   (if (<= l 9.5e-222)
                     (* (- (sqrt (/ 1.0 (* l h)))) d)
                     (* (/ 1.0 (* (sqrt l) (sqrt h))) d)))
                  assert(d < h && h < l && l < M && M < D);
                  double code(double d, double h, double l, double M, double D) {
                  	double tmp;
                  	if (l <= 9.5e-222) {
                  		tmp = -sqrt((1.0 / (l * h))) * d;
                  	} else {
                  		tmp = (1.0 / (sqrt(l) * sqrt(h))) * d;
                  	}
                  	return tmp;
                  }
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  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 (l <= 9.5d-222) then
                          tmp = -sqrt((1.0d0 / (l * h))) * d
                      else
                          tmp = (1.0d0 / (sqrt(l) * sqrt(h))) * d
                      end if
                      code = tmp
                  end function
                  
                  assert d < h && h < l && l < M && M < D;
                  public static double code(double d, double h, double l, double M, double D) {
                  	double tmp;
                  	if (l <= 9.5e-222) {
                  		tmp = -Math.sqrt((1.0 / (l * h))) * d;
                  	} else {
                  		tmp = (1.0 / (Math.sqrt(l) * Math.sqrt(h))) * d;
                  	}
                  	return tmp;
                  }
                  
                  [d, h, l, M, D] = sort([d, h, l, M, D])
                  def code(d, h, l, M, D):
                  	tmp = 0
                  	if l <= 9.5e-222:
                  		tmp = -math.sqrt((1.0 / (l * h))) * d
                  	else:
                  		tmp = (1.0 / (math.sqrt(l) * math.sqrt(h))) * d
                  	return tmp
                  
                  d, h, l, M, D = sort([d, h, l, M, D])
                  function code(d, h, l, M, D)
                  	tmp = 0.0
                  	if (l <= 9.5e-222)
                  		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
                  	else
                  		tmp = Float64(Float64(1.0 / Float64(sqrt(l) * sqrt(h))) * d);
                  	end
                  	return tmp
                  end
                  
                  d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                  function tmp_2 = code(d, h, l, M, D)
                  	tmp = 0.0;
                  	if (l <= 9.5e-222)
                  		tmp = -sqrt((1.0 / (l * h))) * d;
                  	else
                  		tmp = (1.0 / (sqrt(l) * sqrt(h))) * d;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  code[d_, h_, l_, M_, D_] := If[LessEqual[l, 9.5e-222], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], N[(N[(1.0 / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;\ell \leq 9.5 \cdot 10^{-222}:\\
                  \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if l < 9.5000000000000002e-222

                    1. Initial program 66.7%

                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    2. Taylor expanded in d around inf

                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      2. lower-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      3. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      4. lower-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      5. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      6. lower-*.f6411.3

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    4. Applied rewrites11.3%

                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                    5. Taylor expanded in h around -inf

                      \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
                    6. Step-by-step derivation
                      1. sqrt-pow2N/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
                      2. metadata-evalN/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
                      3. metadata-evalN/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
                      4. *-commutativeN/A

                        \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
                      5. mul-1-negN/A

                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
                      6. lower-neg.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
                      7. *-commutativeN/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      8. lower-sqrt.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      9. lift-/.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      10. lift-*.f6441.5

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                    7. Applied rewrites41.5%

                      \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

                    if 9.5000000000000002e-222 < l

                    1. Initial program 66.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. Taylor expanded in d around inf

                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      2. lower-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      3. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      4. lower-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      5. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      6. lower-*.f6445.3

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    4. Applied rewrites45.3%

                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                    5. Step-by-step derivation
                      1. lift-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      2. lift-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      3. lift-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      4. sqrt-divN/A

                        \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
                      5. metadata-evalN/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      6. *-commutativeN/A

                        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                      7. lower-/.f64N/A

                        \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                      8. *-commutativeN/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      9. lift-sqrt.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      10. lift-*.f6445.4

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    6. Applied rewrites45.4%

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    7. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      2. lift-sqrt.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                      3. sqrt-prodN/A

                        \[\leadsto \frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d \]
                      4. lower-*.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d \]
                      5. lower-sqrt.f64N/A

                        \[\leadsto \frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d \]
                      6. lower-sqrt.f6452.9

                        \[\leadsto \frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d \]
                    8. Applied rewrites52.9%

                      \[\leadsto \frac{1}{\sqrt{\ell} \cdot \sqrt{h}} \cdot d \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 21: 43.3% accurate, 5.5× speedup?

                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 9.8 \cdot 10^{-222}:\\ \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d\\ \end{array} \end{array} \]
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  (FPCore (d h l M D)
                   :precision binary64
                   (if (<= l 9.8e-222)
                     (* (- (sqrt (/ 1.0 (* l h)))) d)
                     (* (sqrt (/ (/ 1.0 l) h)) d)))
                  assert(d < h && h < l && l < M && M < D);
                  double code(double d, double h, double l, double M, double D) {
                  	double tmp;
                  	if (l <= 9.8e-222) {
                  		tmp = -sqrt((1.0 / (l * h))) * d;
                  	} else {
                  		tmp = sqrt(((1.0 / l) / h)) * d;
                  	}
                  	return tmp;
                  }
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  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 (l <= 9.8d-222) then
                          tmp = -sqrt((1.0d0 / (l * h))) * d
                      else
                          tmp = sqrt(((1.0d0 / l) / h)) * d
                      end if
                      code = tmp
                  end function
                  
                  assert d < h && h < l && l < M && M < D;
                  public static double code(double d, double h, double l, double M, double D) {
                  	double tmp;
                  	if (l <= 9.8e-222) {
                  		tmp = -Math.sqrt((1.0 / (l * h))) * d;
                  	} else {
                  		tmp = Math.sqrt(((1.0 / l) / h)) * d;
                  	}
                  	return tmp;
                  }
                  
                  [d, h, l, M, D] = sort([d, h, l, M, D])
                  def code(d, h, l, M, D):
                  	tmp = 0
                  	if l <= 9.8e-222:
                  		tmp = -math.sqrt((1.0 / (l * h))) * d
                  	else:
                  		tmp = math.sqrt(((1.0 / l) / h)) * d
                  	return tmp
                  
                  d, h, l, M, D = sort([d, h, l, M, D])
                  function code(d, h, l, M, D)
                  	tmp = 0.0
                  	if (l <= 9.8e-222)
                  		tmp = Float64(Float64(-sqrt(Float64(1.0 / Float64(l * h)))) * d);
                  	else
                  		tmp = Float64(sqrt(Float64(Float64(1.0 / l) / h)) * d);
                  	end
                  	return tmp
                  end
                  
                  d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                  function tmp_2 = code(d, h, l, M, D)
                  	tmp = 0.0;
                  	if (l <= 9.8e-222)
                  		tmp = -sqrt((1.0 / (l * h))) * d;
                  	else
                  		tmp = sqrt(((1.0 / l) / h)) * d;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  code[d_, h_, l_, M_, D_] := If[LessEqual[l, 9.8e-222], N[((-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * d), $MachinePrecision], N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]]
                  
                  \begin{array}{l}
                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;\ell \leq 9.8 \cdot 10^{-222}:\\
                  \;\;\;\;\left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if l < 9.7999999999999999e-222

                    1. Initial program 66.7%

                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    2. Taylor expanded in d around inf

                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      2. lower-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      3. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      4. lower-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      5. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      6. lower-*.f6411.3

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    4. Applied rewrites11.3%

                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                    5. Taylor expanded in h around -inf

                      \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot d \]
                    6. Step-by-step derivation
                      1. sqrt-pow2N/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{\left(\frac{2}{2}\right)}\right) \cdot d \]
                      2. metadata-evalN/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot {-1}^{1}\right) \cdot d \]
                      3. metadata-evalN/A

                        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot -1\right) \cdot d \]
                      4. *-commutativeN/A

                        \[\leadsto \left(-1 \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
                      5. mul-1-negN/A

                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}}\right)\right) \cdot d \]
                      6. lower-neg.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{h \cdot \ell}}\right) \cdot d \]
                      7. *-commutativeN/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      8. lower-sqrt.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      9. lift-/.f64N/A

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                      10. lift-*.f6441.5

                        \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]
                    7. Applied rewrites41.5%

                      \[\leadsto \left(-\sqrt{\frac{1}{\ell \cdot h}}\right) \cdot d \]

                    if 9.7999999999999999e-222 < l

                    1. Initial program 66.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. Taylor expanded in d around inf

                      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      2. lower-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                      3. lower-sqrt.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      4. lower-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                      5. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      6. lower-*.f6445.3

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    4. Applied rewrites45.3%

                      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                    5. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      2. lift-/.f64N/A

                        \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                      3. associate-/r*N/A

                        \[\leadsto \sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d \]
                      4. lower-/.f64N/A

                        \[\leadsto \sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d \]
                      5. lower-/.f6445.6

                        \[\leadsto \sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d \]
                    6. Applied rewrites45.6%

                      \[\leadsto \sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 22: 26.1% accurate, 7.4× speedup?

                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d \end{array} \]
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  (FPCore (d h l M D) :precision binary64 (* (sqrt (/ (/ 1.0 l) h)) d))
                  assert(d < h && h < l && l < M && M < D);
                  double code(double d, double h, double l, double M, double D) {
                  	return sqrt(((1.0 / l) / h)) * d;
                  }
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  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 = sqrt(((1.0d0 / l) / h)) * d
                  end function
                  
                  assert d < h && h < l && l < M && M < D;
                  public static double code(double d, double h, double l, double M, double D) {
                  	return Math.sqrt(((1.0 / l) / h)) * d;
                  }
                  
                  [d, h, l, M, D] = sort([d, h, l, M, D])
                  def code(d, h, l, M, D):
                  	return math.sqrt(((1.0 / l) / h)) * d
                  
                  d, h, l, M, D = sort([d, h, l, M, D])
                  function code(d, h, l, M, D)
                  	return Float64(sqrt(Float64(Float64(1.0 / l) / h)) * d)
                  end
                  
                  d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                  function tmp = code(d, h, l, M, D)
                  	tmp = sqrt(((1.0 / l) / h)) * d;
                  end
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  code[d_, h_, l_, M_, D_] := N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]
                  
                  \begin{array}{l}
                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                  \\
                  \sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d
                  \end{array}
                  
                  Derivation
                  1. Initial program 66.6%

                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  2. Taylor expanded in d around inf

                    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                    2. lower-*.f64N/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                    3. lower-sqrt.f64N/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                    4. lower-/.f64N/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                    5. *-commutativeN/A

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    6. lower-*.f6426.0

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  4. Applied rewrites26.0%

                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    2. lift-/.f64N/A

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    3. associate-/r*N/A

                      \[\leadsto \sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d \]
                    4. lower-/.f64N/A

                      \[\leadsto \sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d \]
                    5. lower-/.f6426.1

                      \[\leadsto \sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d \]
                  6. Applied rewrites26.1%

                    \[\leadsto \sqrt{\frac{\frac{1}{\ell}}{h}} \cdot d \]
                  7. Add Preprocessing

                  Alternative 23: 26.0% accurate, 7.7× speedup?

                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \sqrt{\frac{1}{\ell \cdot h}} \cdot d \end{array} \]
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  (FPCore (d h l M D) :precision binary64 (* (sqrt (/ 1.0 (* l h))) d))
                  assert(d < h && h < l && l < M && M < D);
                  double code(double d, double h, double l, double M, double D) {
                  	return sqrt((1.0 / (l * h))) * d;
                  }
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  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 = sqrt((1.0d0 / (l * h))) * d
                  end function
                  
                  assert d < h && h < l && l < M && M < D;
                  public static double code(double d, double h, double l, double M, double D) {
                  	return Math.sqrt((1.0 / (l * h))) * d;
                  }
                  
                  [d, h, l, M, D] = sort([d, h, l, M, D])
                  def code(d, h, l, M, D):
                  	return math.sqrt((1.0 / (l * h))) * d
                  
                  d, h, l, M, D = sort([d, h, l, M, D])
                  function code(d, h, l, M, D)
                  	return Float64(sqrt(Float64(1.0 / Float64(l * h))) * d)
                  end
                  
                  d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                  function tmp = code(d, h, l, M, D)
                  	tmp = sqrt((1.0 / (l * h))) * d;
                  end
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  code[d_, h_, l_, M_, D_] := N[(N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * d), $MachinePrecision]
                  
                  \begin{array}{l}
                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                  \\
                  \sqrt{\frac{1}{\ell \cdot h}} \cdot d
                  \end{array}
                  
                  Derivation
                  1. Initial program 66.6%

                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  2. Taylor expanded in d around inf

                    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                    2. lower-*.f64N/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                    3. lower-sqrt.f64N/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                    4. lower-/.f64N/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                    5. *-commutativeN/A

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    6. lower-*.f6426.0

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  4. Applied rewrites26.0%

                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                  5. Add Preprocessing

                  Alternative 24: 25.9% accurate, 10.2× speedup?

                  \[\begin{array}{l} [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\ \\ \frac{d}{\sqrt{h \cdot \ell}} \end{array} \]
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  (FPCore (d h l M D) :precision binary64 (/ d (sqrt (* h l))))
                  assert(d < h && h < l && l < M && M < D);
                  double code(double d, double h, double l, double M, double D) {
                  	return d / sqrt((h * l));
                  }
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  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((h * l))
                  end function
                  
                  assert d < h && h < l && l < M && M < D;
                  public static double code(double d, double h, double l, double M, double D) {
                  	return d / Math.sqrt((h * l));
                  }
                  
                  [d, h, l, M, D] = sort([d, h, l, M, D])
                  def code(d, h, l, M, D):
                  	return d / math.sqrt((h * l))
                  
                  d, h, l, M, D = sort([d, h, l, M, D])
                  function code(d, h, l, M, D)
                  	return Float64(d / sqrt(Float64(h * l)))
                  end
                  
                  d, h, l, M, D = num2cell(sort([d, h, l, M, D])){:}
                  function tmp = code(d, h, l, M, D)
                  	tmp = d / sqrt((h * l));
                  end
                  
                  NOTE: d, h, l, M, and D should be sorted in increasing order before calling this function.
                  code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  [d, h, l, M, D] = \mathsf{sort}([d, h, l, M, D])\\
                  \\
                  \frac{d}{\sqrt{h \cdot \ell}}
                  \end{array}
                  
                  Derivation
                  1. Initial program 66.6%

                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  2. Taylor expanded in d around inf

                    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                    2. lower-*.f64N/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{d} \]
                    3. lower-sqrt.f64N/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                    4. lower-/.f64N/A

                      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot d \]
                    5. *-commutativeN/A

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    6. lower-*.f6426.0

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                  4. Applied rewrites26.0%

                    \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
                  5. Step-by-step derivation
                    1. lift-sqrt.f64N/A

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    2. lift-*.f64N/A

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    3. lift-/.f64N/A

                      \[\leadsto \sqrt{\frac{1}{\ell \cdot h}} \cdot d \]
                    4. sqrt-divN/A

                      \[\leadsto \frac{\sqrt{1}}{\sqrt{\ell \cdot h}} \cdot d \]
                    5. metadata-evalN/A

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    6. *-commutativeN/A

                      \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                    7. lower-/.f64N/A

                      \[\leadsto \frac{1}{\sqrt{h \cdot \ell}} \cdot d \]
                    8. *-commutativeN/A

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    9. lift-sqrt.f64N/A

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    10. lift-*.f6425.8

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  6. Applied rewrites25.8%

                    \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                  7. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot \color{blue}{d} \]
                    2. lift-/.f64N/A

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    3. lift-*.f64N/A

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    4. lift-sqrt.f64N/A

                      \[\leadsto \frac{1}{\sqrt{\ell \cdot h}} \cdot d \]
                    5. associate-*l/N/A

                      \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                    6. *-commutativeN/A

                      \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                    7. lower-/.f64N/A

                      \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                    8. lower-*.f64N/A

                      \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
                    9. *-commutativeN/A

                      \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
                    10. lift-sqrt.f64N/A

                      \[\leadsto \frac{1 \cdot d}{\sqrt{\ell \cdot h}} \]
                    11. *-commutativeN/A

                      \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                    12. lower-*.f6425.9

                      \[\leadsto \frac{1 \cdot d}{\sqrt{h \cdot \ell}} \]
                  8. Applied rewrites25.9%

                    \[\leadsto \frac{1 \cdot d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                  9. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1 \cdot d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
                    2. *-lft-identity25.9

                      \[\leadsto \frac{d}{\sqrt{\color{blue}{h \cdot \ell}}} \]
                  10. Applied rewrites25.9%

                    \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                  11. Add Preprocessing

                  Reproduce

                  ?
                  herbie shell --seed 2025101 
                  (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)))))