Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.9% → 86.3%
Time: 10.8s
Alternatives: 18
Speedup: 1.2×

Specification

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

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 18 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.9% accurate, 1.0× speedup?

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

Alternative 1: 86.3% accurate, 1.2× speedup?

\[\begin{array}{l} t_0 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\ t_1 := \left(d + d\right) \cdot \ell\\ t_2 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\ t_3 := t\_0 \cdot t\_2\\ t_4 := \frac{t\_2}{d + d}\\ \mathbf{if}\;d \leq -3.1 \cdot 10^{-117}:\\ \;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{-\ell}} \cdot \left(1 - \frac{\left(\left(\frac{t\_3}{d} \cdot 0.25\right) \cdot h\right) \cdot t\_3}{\ell \cdot \left(d + d\right)}\right)}{\sqrt{-h}}\\ \mathbf{elif}\;d \leq 1.05 \cdot 10^{-286}:\\ \;\;\;\;\frac{\left(t\_1 - \left(\left(t\_2 \cdot t\_0\right) \cdot \left(\left(\frac{t\_0}{d} \cdot 0.25\right) \cdot t\_2\right)\right) \cdot h\right) \cdot \left|d\right|}{t\_1 \cdot \sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{-d}{\sqrt{\ell} \cdot \sqrt{h}}\right| \cdot \left(1 - \left(t\_4 \cdot t\_0\right) \cdot \left(\left(t\_4 \cdot \left(t\_0 \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right)\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (fmin (fabs M) (fabs D)))
        (t_1 (* (+ d d) l))
        (t_2 (fmax (fabs M) (fabs D)))
        (t_3 (* t_0 t_2))
        (t_4 (/ t_2 (+ d d))))
   (if (<= d -3.1e-117)
     (/
      (*
       (/ (fabs d) (sqrt (- l)))
       (- 1.0 (/ (* (* (* (/ t_3 d) 0.25) h) t_3) (* l (+ d d)))))
      (sqrt (- h)))
     (if (<= d 1.05e-286)
       (/
        (* (- t_1 (* (* (* t_2 t_0) (* (* (/ t_0 d) 0.25) t_2)) h)) (fabs d))
        (* t_1 (sqrt (* l h))))
       (*
        (fabs (/ (- d) (* (sqrt l) (sqrt h))))
        (- 1.0 (* (* t_4 t_0) (* (* t_4 (* t_0 0.5)) (/ h l)))))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = fmin(fabs(M), fabs(D));
	double t_1 = (d + d) * l;
	double t_2 = fmax(fabs(M), fabs(D));
	double t_3 = t_0 * t_2;
	double t_4 = t_2 / (d + d);
	double tmp;
	if (d <= -3.1e-117) {
		tmp = ((fabs(d) / sqrt(-l)) * (1.0 - (((((t_3 / d) * 0.25) * h) * t_3) / (l * (d + d))))) / sqrt(-h);
	} else if (d <= 1.05e-286) {
		tmp = ((t_1 - (((t_2 * t_0) * (((t_0 / d) * 0.25) * t_2)) * h)) * fabs(d)) / (t_1 * sqrt((l * h)));
	} else {
		tmp = fabs((-d / (sqrt(l) * sqrt(h)))) * (1.0 - ((t_4 * t_0) * ((t_4 * (t_0 * 0.5)) * (h / l))));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_0 = fmin(abs(m), abs(d_1))
    t_1 = (d + d) * l
    t_2 = fmax(abs(m), abs(d_1))
    t_3 = t_0 * t_2
    t_4 = t_2 / (d + d)
    if (d <= (-3.1d-117)) then
        tmp = ((abs(d) / sqrt(-l)) * (1.0d0 - (((((t_3 / d) * 0.25d0) * h) * t_3) / (l * (d + d))))) / sqrt(-h)
    else if (d <= 1.05d-286) then
        tmp = ((t_1 - (((t_2 * t_0) * (((t_0 / d) * 0.25d0) * t_2)) * h)) * abs(d)) / (t_1 * sqrt((l * h)))
    else
        tmp = abs((-d / (sqrt(l) * sqrt(h)))) * (1.0d0 - ((t_4 * t_0) * ((t_4 * (t_0 * 0.5d0)) * (h / l))))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = fmin(Math.abs(M), Math.abs(D));
	double t_1 = (d + d) * l;
	double t_2 = fmax(Math.abs(M), Math.abs(D));
	double t_3 = t_0 * t_2;
	double t_4 = t_2 / (d + d);
	double tmp;
	if (d <= -3.1e-117) {
		tmp = ((Math.abs(d) / Math.sqrt(-l)) * (1.0 - (((((t_3 / d) * 0.25) * h) * t_3) / (l * (d + d))))) / Math.sqrt(-h);
	} else if (d <= 1.05e-286) {
		tmp = ((t_1 - (((t_2 * t_0) * (((t_0 / d) * 0.25) * t_2)) * h)) * Math.abs(d)) / (t_1 * Math.sqrt((l * h)));
	} else {
		tmp = Math.abs((-d / (Math.sqrt(l) * Math.sqrt(h)))) * (1.0 - ((t_4 * t_0) * ((t_4 * (t_0 * 0.5)) * (h / l))));
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = fmin(math.fabs(M), math.fabs(D))
	t_1 = (d + d) * l
	t_2 = fmax(math.fabs(M), math.fabs(D))
	t_3 = t_0 * t_2
	t_4 = t_2 / (d + d)
	tmp = 0
	if d <= -3.1e-117:
		tmp = ((math.fabs(d) / math.sqrt(-l)) * (1.0 - (((((t_3 / d) * 0.25) * h) * t_3) / (l * (d + d))))) / math.sqrt(-h)
	elif d <= 1.05e-286:
		tmp = ((t_1 - (((t_2 * t_0) * (((t_0 / d) * 0.25) * t_2)) * h)) * math.fabs(d)) / (t_1 * math.sqrt((l * h)))
	else:
		tmp = math.fabs((-d / (math.sqrt(l) * math.sqrt(h)))) * (1.0 - ((t_4 * t_0) * ((t_4 * (t_0 * 0.5)) * (h / l))))
	return tmp
function code(d, h, l, M, D)
	t_0 = fmin(abs(M), abs(D))
	t_1 = Float64(Float64(d + d) * l)
	t_2 = fmax(abs(M), abs(D))
	t_3 = Float64(t_0 * t_2)
	t_4 = Float64(t_2 / Float64(d + d))
	tmp = 0.0
	if (d <= -3.1e-117)
		tmp = Float64(Float64(Float64(abs(d) / sqrt(Float64(-l))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(t_3 / d) * 0.25) * h) * t_3) / Float64(l * Float64(d + d))))) / sqrt(Float64(-h)));
	elseif (d <= 1.05e-286)
		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(t_2 * t_0) * Float64(Float64(Float64(t_0 / d) * 0.25) * t_2)) * h)) * abs(d)) / Float64(t_1 * sqrt(Float64(l * h))));
	else
		tmp = Float64(abs(Float64(Float64(-d) / Float64(sqrt(l) * sqrt(h)))) * Float64(1.0 - Float64(Float64(t_4 * t_0) * Float64(Float64(t_4 * Float64(t_0 * 0.5)) * Float64(h / l)))));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = min(abs(M), abs(D));
	t_1 = (d + d) * l;
	t_2 = max(abs(M), abs(D));
	t_3 = t_0 * t_2;
	t_4 = t_2 / (d + d);
	tmp = 0.0;
	if (d <= -3.1e-117)
		tmp = ((abs(d) / sqrt(-l)) * (1.0 - (((((t_3 / d) * 0.25) * h) * t_3) / (l * (d + d))))) / sqrt(-h);
	elseif (d <= 1.05e-286)
		tmp = ((t_1 - (((t_2 * t_0) * (((t_0 / d) * 0.25) * t_2)) * h)) * abs(d)) / (t_1 * sqrt((l * h)));
	else
		tmp = abs((-d / (sqrt(l) * sqrt(h)))) * (1.0 - ((t_4 * t_0) * ((t_4 * (t_0 * 0.5)) * (h / l))));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Min[N[Abs[M], $MachinePrecision], N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(d + d), $MachinePrecision] * l), $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Abs[M], $MachinePrecision], N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / N[(d + d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -3.1e-117], N[(N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(t$95$3 / d), $MachinePrecision] * 0.25), $MachinePrecision] * h), $MachinePrecision] * t$95$3), $MachinePrecision] / N[(l * N[(d + d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.05e-286], N[(N[(N[(t$95$1 - N[(N[(N[(t$95$2 * t$95$0), $MachinePrecision] * N[(N[(N[(t$95$0 / d), $MachinePrecision] * 0.25), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] * N[Abs[d], $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Abs[N[((-d) / N[(N[Sqrt[l], $MachinePrecision] * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[(t$95$4 * t$95$0), $MachinePrecision] * N[(N[(t$95$4 * N[(t$95$0 * 0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\
t_1 := \left(d + d\right) \cdot \ell\\
t_2 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\
t_3 := t\_0 \cdot t\_2\\
t_4 := \frac{t\_2}{d + d}\\
\mathbf{if}\;d \leq -3.1 \cdot 10^{-117}:\\
\;\;\;\;\frac{\frac{\left|d\right|}{\sqrt{-\ell}} \cdot \left(1 - \frac{\left(\left(\frac{t\_3}{d} \cdot 0.25\right) \cdot h\right) \cdot t\_3}{\ell \cdot \left(d + d\right)}\right)}{\sqrt{-h}}\\

\mathbf{elif}\;d \leq 1.05 \cdot 10^{-286}:\\
\;\;\;\;\frac{\left(t\_1 - \left(\left(t\_2 \cdot t\_0\right) \cdot \left(\left(\frac{t\_0}{d} \cdot 0.25\right) \cdot t\_2\right)\right) \cdot h\right) \cdot \left|d\right|}{t\_1 \cdot \sqrt{\ell \cdot h}}\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -3.10000000000000011e-117

    1. Initial program 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

    if -3.10000000000000011e-117 < d < 1.04999999999999994e-286

    1. Initial program 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

    if 1.04999999999999994e-286 < d

    1. Initial program 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.4% accurate, 0.2× speedup?

\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\ t_3 := \frac{t\_2}{d}\\ t_4 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\ t_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{t\_2 \cdot t\_4}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_6 := t\_4 \cdot \frac{t\_2}{\left(d + d\right) \cdot \ell}\\ t_7 := \sqrt{h \cdot \ell}\\ \mathbf{if}\;t\_5 \leq -2 \cdot 10^{-143}:\\ \;\;\;\;\left(t\_0 \cdot t\_1\right) \cdot \left(1 - \left(\frac{t\_4}{d + d} \cdot t\_2\right) \cdot \left(\left(t\_4 \cdot \left(0.25 \cdot t\_3\right)\right) \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{elif}\;t\_5 \leq 0:\\ \;\;\;\;\frac{\left(1 - h \cdot \left(\left(\left(t\_3 \cdot 0.25\right) \cdot t\_4\right) \cdot t\_6\right)\right) \cdot \left|d\right|}{t\_7}\\ \mathbf{elif}\;t\_5 \leq 4 \cdot 10^{+228}:\\ \;\;\;\;t\_1 \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 - \frac{t\_4 \cdot t\_2}{d} \cdot \left(\left(h \cdot 0.25\right) \cdot t\_6\right)\right) \cdot \left|d\right|}{t\_7}\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (/ d l)))
        (t_1 (sqrt (/ d h)))
        (t_2 (fmin (fabs M) (fabs D)))
        (t_3 (/ t_2 d))
        (t_4 (fmax (fabs M) (fabs D)))
        (t_5
         (*
          (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
          (-
           1.0
           (* (* (/ 1.0 2.0) (pow (/ (* t_2 t_4) (* 2.0 d)) 2.0)) (/ h l)))))
        (t_6 (* t_4 (/ t_2 (* (+ d d) l))))
        (t_7 (sqrt (* h l))))
   (if (<= t_5 -2e-143)
     (*
      (* t_0 t_1)
      (- 1.0 (* (* (/ t_4 (+ d d)) t_2) (* (* t_4 (* 0.25 t_3)) (/ h l)))))
     (if (<= t_5 0.0)
       (/ (* (- 1.0 (* h (* (* (* t_3 0.25) t_4) t_6))) (fabs d)) t_7)
       (if (<= t_5 4e+228)
         (* t_1 t_0)
         (/
          (* (- 1.0 (* (/ (* t_4 t_2) d) (* (* h 0.25) t_6))) (fabs d))
          t_7))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((d / l));
	double t_1 = sqrt((d / h));
	double t_2 = fmin(fabs(M), fabs(D));
	double t_3 = t_2 / d;
	double t_4 = fmax(fabs(M), fabs(D));
	double t_5 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((t_2 * t_4) / (2.0 * d)), 2.0)) * (h / l)));
	double t_6 = t_4 * (t_2 / ((d + d) * l));
	double t_7 = sqrt((h * l));
	double tmp;
	if (t_5 <= -2e-143) {
		tmp = (t_0 * t_1) * (1.0 - (((t_4 / (d + d)) * t_2) * ((t_4 * (0.25 * t_3)) * (h / l))));
	} else if (t_5 <= 0.0) {
		tmp = ((1.0 - (h * (((t_3 * 0.25) * t_4) * t_6))) * fabs(d)) / t_7;
	} else if (t_5 <= 4e+228) {
		tmp = t_1 * t_0;
	} else {
		tmp = ((1.0 - (((t_4 * t_2) / d) * ((h * 0.25) * t_6))) * fabs(d)) / t_7;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: t_7
    real(8) :: tmp
    t_0 = sqrt((d / l))
    t_1 = sqrt((d / h))
    t_2 = fmin(abs(m), abs(d_1))
    t_3 = t_2 / d
    t_4 = fmax(abs(m), abs(d_1))
    t_5 = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((t_2 * t_4) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
    t_6 = t_4 * (t_2 / ((d + d) * l))
    t_7 = sqrt((h * l))
    if (t_5 <= (-2d-143)) then
        tmp = (t_0 * t_1) * (1.0d0 - (((t_4 / (d + d)) * t_2) * ((t_4 * (0.25d0 * t_3)) * (h / l))))
    else if (t_5 <= 0.0d0) then
        tmp = ((1.0d0 - (h * (((t_3 * 0.25d0) * t_4) * t_6))) * abs(d)) / t_7
    else if (t_5 <= 4d+228) then
        tmp = t_1 * t_0
    else
        tmp = ((1.0d0 - (((t_4 * t_2) / d) * ((h * 0.25d0) * t_6))) * abs(d)) / t_7
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt((d / l));
	double t_1 = Math.sqrt((d / h));
	double t_2 = fmin(Math.abs(M), Math.abs(D));
	double t_3 = t_2 / d;
	double t_4 = fmax(Math.abs(M), Math.abs(D));
	double t_5 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((t_2 * t_4) / (2.0 * d)), 2.0)) * (h / l)));
	double t_6 = t_4 * (t_2 / ((d + d) * l));
	double t_7 = Math.sqrt((h * l));
	double tmp;
	if (t_5 <= -2e-143) {
		tmp = (t_0 * t_1) * (1.0 - (((t_4 / (d + d)) * t_2) * ((t_4 * (0.25 * t_3)) * (h / l))));
	} else if (t_5 <= 0.0) {
		tmp = ((1.0 - (h * (((t_3 * 0.25) * t_4) * t_6))) * Math.abs(d)) / t_7;
	} else if (t_5 <= 4e+228) {
		tmp = t_1 * t_0;
	} else {
		tmp = ((1.0 - (((t_4 * t_2) / d) * ((h * 0.25) * t_6))) * Math.abs(d)) / t_7;
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = math.sqrt((d / l))
	t_1 = math.sqrt((d / h))
	t_2 = fmin(math.fabs(M), math.fabs(D))
	t_3 = t_2 / d
	t_4 = fmax(math.fabs(M), math.fabs(D))
	t_5 = (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((t_2 * t_4) / (2.0 * d)), 2.0)) * (h / l)))
	t_6 = t_4 * (t_2 / ((d + d) * l))
	t_7 = math.sqrt((h * l))
	tmp = 0
	if t_5 <= -2e-143:
		tmp = (t_0 * t_1) * (1.0 - (((t_4 / (d + d)) * t_2) * ((t_4 * (0.25 * t_3)) * (h / l))))
	elif t_5 <= 0.0:
		tmp = ((1.0 - (h * (((t_3 * 0.25) * t_4) * t_6))) * math.fabs(d)) / t_7
	elif t_5 <= 4e+228:
		tmp = t_1 * t_0
	else:
		tmp = ((1.0 - (((t_4 * t_2) / d) * ((h * 0.25) * t_6))) * math.fabs(d)) / t_7
	return tmp
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(d / l))
	t_1 = sqrt(Float64(d / h))
	t_2 = fmin(abs(M), abs(D))
	t_3 = Float64(t_2 / d)
	t_4 = fmax(abs(M), abs(D))
	t_5 = 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(t_2 * t_4) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
	t_6 = Float64(t_4 * Float64(t_2 / Float64(Float64(d + d) * l)))
	t_7 = sqrt(Float64(h * l))
	tmp = 0.0
	if (t_5 <= -2e-143)
		tmp = Float64(Float64(t_0 * t_1) * Float64(1.0 - Float64(Float64(Float64(t_4 / Float64(d + d)) * t_2) * Float64(Float64(t_4 * Float64(0.25 * t_3)) * Float64(h / l)))));
	elseif (t_5 <= 0.0)
		tmp = Float64(Float64(Float64(1.0 - Float64(h * Float64(Float64(Float64(t_3 * 0.25) * t_4) * t_6))) * abs(d)) / t_7);
	elseif (t_5 <= 4e+228)
		tmp = Float64(t_1 * t_0);
	else
		tmp = Float64(Float64(Float64(1.0 - Float64(Float64(Float64(t_4 * t_2) / d) * Float64(Float64(h * 0.25) * t_6))) * abs(d)) / t_7);
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt((d / l));
	t_1 = sqrt((d / h));
	t_2 = min(abs(M), abs(D));
	t_3 = t_2 / d;
	t_4 = max(abs(M), abs(D));
	t_5 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((t_2 * t_4) / (2.0 * d)) ^ 2.0)) * (h / l)));
	t_6 = t_4 * (t_2 / ((d + d) * l));
	t_7 = sqrt((h * l));
	tmp = 0.0;
	if (t_5 <= -2e-143)
		tmp = (t_0 * t_1) * (1.0 - (((t_4 / (d + d)) * t_2) * ((t_4 * (0.25 * t_3)) * (h / l))));
	elseif (t_5 <= 0.0)
		tmp = ((1.0 - (h * (((t_3 * 0.25) * t_4) * t_6))) * abs(d)) / t_7;
	elseif (t_5 <= 4e+228)
		tmp = t_1 * t_0;
	else
		tmp = ((1.0 - (((t_4 * t_2) / d) * ((h * 0.25) * t_6))) * abs(d)) / t_7;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Min[N[Abs[M], $MachinePrecision], N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / d), $MachinePrecision]}, Block[{t$95$4 = N[Max[N[Abs[M], $MachinePrecision], N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = 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[(t$95$2 * t$95$4), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 * N[(t$95$2 / N[(N[(d + d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$5, -2e-143], N[(N[(t$95$0 * t$95$1), $MachinePrecision] * N[(1.0 - N[(N[(N[(t$95$4 / N[(d + d), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(N[(t$95$4 * N[(0.25 * t$95$3), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, 0.0], N[(N[(N[(1.0 - N[(h * N[(N[(N[(t$95$3 * 0.25), $MachinePrecision] * t$95$4), $MachinePrecision] * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[d], $MachinePrecision]), $MachinePrecision] / t$95$7), $MachinePrecision], If[LessEqual[t$95$5, 4e+228], N[(t$95$1 * t$95$0), $MachinePrecision], N[(N[(N[(1.0 - N[(N[(N[(t$95$4 * t$95$2), $MachinePrecision] / d), $MachinePrecision] * N[(N[(h * 0.25), $MachinePrecision] * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[d], $MachinePrecision]), $MachinePrecision] / t$95$7), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell}}\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\
t_3 := \frac{t\_2}{d}\\
t_4 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\
t_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{t\_2 \cdot t\_4}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
t_6 := t\_4 \cdot \frac{t\_2}{\left(d + d\right) \cdot \ell}\\
t_7 := \sqrt{h \cdot \ell}\\
\mathbf{if}\;t\_5 \leq -2 \cdot 10^{-143}:\\
\;\;\;\;\left(t\_0 \cdot t\_1\right) \cdot \left(1 - \left(\frac{t\_4}{d + d} \cdot t\_2\right) \cdot \left(\left(t\_4 \cdot \left(0.25 \cdot t\_3\right)\right) \cdot \frac{h}{\ell}\right)\right)\\

\mathbf{elif}\;t\_5 \leq 0:\\
\;\;\;\;\frac{\left(1 - h \cdot \left(\left(\left(t\_3 \cdot 0.25\right) \cdot t\_4\right) \cdot t\_6\right)\right) \cdot \left|d\right|}{t\_7}\\

\mathbf{elif}\;t\_5 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;t\_1 \cdot t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(1 - \frac{t\_4 \cdot t\_2}{d} \cdot \left(\left(h \cdot 0.25\right) \cdot t\_6\right)\right) \cdot \left|d\right|}{t\_7}\\


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

    1. Initial program 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\frac{-d}{\sqrt{\ell \cdot h}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(D \cdot \left(\color{blue}{\frac{1}{4}} \cdot \frac{M}{d}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lower-/.f6469.9

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\left|\sqrt{\ell \cdot h}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(D \cdot \left(\frac{1}{4} \cdot \frac{M}{d}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. rem-sqrt-square-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 66.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 0

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

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

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

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

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

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

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

    if 3.9999999999999997e228 < (*.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 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(1 - \frac{D \cdot M}{d} \cdot \left(\left(h \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{\ell \cdot \left(d + d\right)}\right)}\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}} \]
      19. lower-/.f6476.5

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

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

        \[\leadsto \frac{\left(1 - \frac{D \cdot M}{d} \cdot \left(\left(h \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{\color{blue}{\left(d + d\right) \cdot \ell}}\right)\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}} \]
      22. lower-*.f6476.5

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

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

Alternative 3: 83.9% accurate, 0.4× speedup?

\[\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{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \frac{\mathsf{max}\left(M, D\right)}{d + d}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;\left|\frac{-d}{\sqrt{\ell \cdot h}}\right| \cdot \left(1 - \left(t\_1 \cdot \mathsf{min}\left(M, D\right)\right) \cdot \left(\left(t\_1 \cdot \left(\mathsf{min}\left(M, D\right) \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+228}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(1 - \frac{\mathsf{max}\left(M, D\right) \cdot \mathsf{min}\left(M, D\right)}{d} \cdot \left(\left(h \cdot 0.25\right) \cdot \left(\mathsf{max}\left(M, D\right) \cdot \frac{\mathsf{min}\left(M, D\right)}{\left(d + d\right) \cdot \ell}\right)\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}\\ \end{array} \]
(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 (/ (* (fmin M D) (fmax M D)) (* 2.0 d)) 2.0))
            (/ h l)))))
        (t_1 (/ (fmax M D) (+ d d))))
   (if (<= t_0 0.0)
     (*
      (fabs (/ (- d) (sqrt (* l h))))
      (- 1.0 (* (* t_1 (fmin M D)) (* (* t_1 (* (fmin M D) 0.5)) (/ h l)))))
     (if (<= t_0 4e+228)
       (* (sqrt (/ d h)) (sqrt (/ d l)))
       (/
        (*
         (-
          1.0
          (*
           (/ (* (fmax M D) (fmin M D)) d)
           (* (* h 0.25) (* (fmax M D) (/ (fmin M D) (* (+ d d) l))))))
         (fabs d))
        (sqrt (* h l)))))))
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(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)));
	double t_1 = fmax(M, D) / (d + d);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = fabs((-d / sqrt((l * h)))) * (1.0 - ((t_1 * fmin(M, D)) * ((t_1 * (fmin(M, D) * 0.5)) * (h / l))));
	} else if (t_0 <= 4e+228) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else {
		tmp = ((1.0 - (((fmax(M, D) * fmin(M, D)) / d) * ((h * 0.25) * (fmax(M, D) * (fmin(M, D) / ((d + d) * l)))))) * fabs(d)) / sqrt((h * l));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: 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) * (((fmin(m, d_1) * fmax(m, d_1)) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
    t_1 = fmax(m, d_1) / (d + d)
    if (t_0 <= 0.0d0) then
        tmp = abs((-d / sqrt((l * h)))) * (1.0d0 - ((t_1 * fmin(m, d_1)) * ((t_1 * (fmin(m, d_1) * 0.5d0)) * (h / l))))
    else if (t_0 <= 4d+228) then
        tmp = sqrt((d / h)) * sqrt((d / l))
    else
        tmp = ((1.0d0 - (((fmax(m, d_1) * fmin(m, d_1)) / d) * ((h * 0.25d0) * (fmax(m, d_1) * (fmin(m, d_1) / ((d + d) * l)))))) * abs(d)) / sqrt((h * l))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)));
	double t_1 = fmax(M, D) / (d + d);
	double tmp;
	if (t_0 <= 0.0) {
		tmp = Math.abs((-d / Math.sqrt((l * h)))) * (1.0 - ((t_1 * fmin(M, D)) * ((t_1 * (fmin(M, D) * 0.5)) * (h / l))));
	} else if (t_0 <= 4e+228) {
		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
	} else {
		tmp = ((1.0 - (((fmax(M, D) * fmin(M, D)) / d) * ((h * 0.25) * (fmax(M, D) * (fmin(M, D) / ((d + d) * l)))))) * Math.abs(d)) / Math.sqrt((h * l));
	}
	return tmp;
}
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(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)))
	t_1 = fmax(M, D) / (d + d)
	tmp = 0
	if t_0 <= 0.0:
		tmp = math.fabs((-d / math.sqrt((l * h)))) * (1.0 - ((t_1 * fmin(M, D)) * ((t_1 * (fmin(M, D) * 0.5)) * (h / l))))
	elif t_0 <= 4e+228:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	else:
		tmp = ((1.0 - (((fmax(M, D) * fmin(M, D)) / d) * ((h * 0.25) * (fmax(M, D) * (fmin(M, D) / ((d + d) * l)))))) * math.fabs(d)) / math.sqrt((h * l))
	return tmp
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(fmin(M, D) * fmax(M, D)) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
	t_1 = Float64(fmax(M, D) / Float64(d + d))
	tmp = 0.0
	if (t_0 <= 0.0)
		tmp = Float64(abs(Float64(Float64(-d) / sqrt(Float64(l * h)))) * Float64(1.0 - Float64(Float64(t_1 * fmin(M, D)) * Float64(Float64(t_1 * Float64(fmin(M, D) * 0.5)) * Float64(h / l)))));
	elseif (t_0 <= 4e+228)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	else
		tmp = Float64(Float64(Float64(1.0 - Float64(Float64(Float64(fmax(M, D) * fmin(M, D)) / d) * Float64(Float64(h * 0.25) * Float64(fmax(M, D) * Float64(fmin(M, D) / Float64(Float64(d + d) * l)))))) * abs(d)) / sqrt(Float64(h * l)));
	end
	return tmp
end
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) * (((min(M, D) * max(M, D)) / (2.0 * d)) ^ 2.0)) * (h / l)));
	t_1 = max(M, D) / (d + d);
	tmp = 0.0;
	if (t_0 <= 0.0)
		tmp = abs((-d / sqrt((l * h)))) * (1.0 - ((t_1 * min(M, D)) * ((t_1 * (min(M, D) * 0.5)) * (h / l))));
	elseif (t_0 <= 4e+228)
		tmp = sqrt((d / h)) * sqrt((d / l));
	else
		tmp = ((1.0 - (((max(M, D) * min(M, D)) / d) * ((h * 0.25) * (max(M, D) * (min(M, D) / ((d + d) * l)))))) * abs(d)) / sqrt((h * l));
	end
	tmp_2 = tmp;
end
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[(N[Min[M, D], $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Max[M, D], $MachinePrecision] / N[(d + d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(N[Abs[N[((-d) / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[(t$95$1 * N[Min[M, D], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * N[(N[Min[M, D], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+228], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - N[(N[(N[(N[Max[M, D], $MachinePrecision] * N[Min[M, D], $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(h * 0.25), $MachinePrecision] * N[(N[Max[M, D], $MachinePrecision] * N[(N[Min[M, D], $MachinePrecision] / N[(N[(d + d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\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{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
t_1 := \frac{\mathsf{max}\left(M, D\right)}{d + d}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;\left|\frac{-d}{\sqrt{\ell \cdot h}}\right| \cdot \left(1 - \left(t\_1 \cdot \mathsf{min}\left(M, D\right)\right) \cdot \left(\left(t\_1 \cdot \left(\mathsf{min}\left(M, D\right) \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;\frac{\left(1 - \frac{\mathsf{max}\left(M, D\right) \cdot \mathsf{min}\left(M, D\right)}{d} \cdot \left(\left(h \cdot 0.25\right) \cdot \left(\mathsf{max}\left(M, D\right) \cdot \frac{\mathsf{min}\left(M, D\right)}{\left(d + d\right) \cdot \ell}\right)\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}\\


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

    1. Initial program 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

    1. Initial program 66.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 0

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

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

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

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

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

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

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

    if 3.9999999999999997e228 < (*.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 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(1 - \frac{D \cdot M}{d} \cdot \left(\left(h \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{\ell \cdot \left(d + d\right)}\right)}\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}} \]
      19. lower-/.f6476.5

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

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

        \[\leadsto \frac{\left(1 - \frac{D \cdot M}{d} \cdot \left(\left(h \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{\color{blue}{\left(d + d\right) \cdot \ell}}\right)\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}} \]
      22. lower-*.f6476.5

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

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

Alternative 4: 83.7% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(1 - \frac{t\_4}{d} \cdot \left(\left(h \cdot 0.25\right) \cdot \left(t\_1 \cdot \frac{t\_0}{\left(d + d\right) \cdot \ell}\right)\right)\right) \cdot \left|d\right|}{t\_2}\\


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

    1. Initial program 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

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

    1. Initial program 66.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 0

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

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

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

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

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

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

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

    if 3.9999999999999997e228 < (*.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 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(1 - \frac{D \cdot M}{d} \cdot \left(\left(h \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{\ell \cdot \left(d + d\right)}\right)}\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}} \]
      19. lower-/.f6476.5

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

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

        \[\leadsto \frac{\left(1 - \frac{D \cdot M}{d} \cdot \left(\left(h \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{\color{blue}{\left(d + d\right) \cdot \ell}}\right)\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}} \]
      22. lower-*.f6476.5

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

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

Alternative 5: 81.9% accurate, 0.3× speedup?

\[\begin{array}{l} t_0 := \mathsf{min}\left(\left|M\right|, D\right)\\ t_1 := \mathsf{max}\left(\left|M\right|, D\right)\\ t_2 := \frac{\left(1 - \frac{t\_1 \cdot t\_0}{d} \cdot \left(\left(h \cdot 0.25\right) \cdot \left(t\_1 \cdot \frac{t\_0}{\left(d + d\right) \cdot \ell}\right)\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}\\ t_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{t\_0 \cdot t\_1}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+228}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (fmin (fabs M) D))
        (t_1 (fmax (fabs M) D))
        (t_2
         (/
          (*
           (-
            1.0
            (* (/ (* t_1 t_0) d) (* (* h 0.25) (* t_1 (/ t_0 (* (+ d d) l))))))
           (fabs d))
          (sqrt (* h l))))
        (t_3
         (*
          (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
          (-
           1.0
           (* (* (/ 1.0 2.0) (pow (/ (* t_0 t_1) (* 2.0 d)) 2.0)) (/ h l))))))
   (if (<= t_3 0.0)
     t_2
     (if (<= t_3 4e+228) (* (sqrt (/ d h)) (sqrt (/ d l))) t_2))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = fmin(fabs(M), D);
	double t_1 = fmax(fabs(M), D);
	double t_2 = ((1.0 - (((t_1 * t_0) / d) * ((h * 0.25) * (t_1 * (t_0 / ((d + d) * l)))))) * fabs(d)) / sqrt((h * l));
	double t_3 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = t_2;
	} else if (t_3 <= 4e+228) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = fmin(abs(m), d_1)
    t_1 = fmax(abs(m), d_1)
    t_2 = ((1.0d0 - (((t_1 * t_0) / d) * ((h * 0.25d0) * (t_1 * (t_0 / ((d + d) * l)))))) * abs(d)) / sqrt((h * l))
    t_3 = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((t_0 * t_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
    if (t_3 <= 0.0d0) then
        tmp = t_2
    else if (t_3 <= 4d+228) then
        tmp = sqrt((d / h)) * sqrt((d / l))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = fmin(Math.abs(M), D);
	double t_1 = fmax(Math.abs(M), D);
	double t_2 = ((1.0 - (((t_1 * t_0) / d) * ((h * 0.25) * (t_1 * (t_0 / ((d + d) * l)))))) * Math.abs(d)) / Math.sqrt((h * l));
	double t_3 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = t_2;
	} else if (t_3 <= 4e+228) {
		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = fmin(math.fabs(M), D)
	t_1 = fmax(math.fabs(M), D)
	t_2 = ((1.0 - (((t_1 * t_0) / d) * ((h * 0.25) * (t_1 * (t_0 / ((d + d) * l)))))) * math.fabs(d)) / math.sqrt((h * l))
	t_3 = (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)))
	tmp = 0
	if t_3 <= 0.0:
		tmp = t_2
	elif t_3 <= 4e+228:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	else:
		tmp = t_2
	return tmp
function code(d, h, l, M, D)
	t_0 = fmin(abs(M), D)
	t_1 = fmax(abs(M), D)
	t_2 = Float64(Float64(Float64(1.0 - Float64(Float64(Float64(t_1 * t_0) / d) * Float64(Float64(h * 0.25) * Float64(t_1 * Float64(t_0 / Float64(Float64(d + d) * l)))))) * abs(d)) / sqrt(Float64(h * l)))
	t_3 = 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(t_0 * t_1) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = t_2;
	elseif (t_3 <= 4e+228)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = min(abs(M), D);
	t_1 = max(abs(M), D);
	t_2 = ((1.0 - (((t_1 * t_0) / d) * ((h * 0.25) * (t_1 * (t_0 / ((d + d) * l)))))) * abs(d)) / sqrt((h * l));
	t_3 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((t_0 * t_1) / (2.0 * d)) ^ 2.0)) * (h / l)));
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = t_2;
	elseif (t_3 <= 4e+228)
		tmp = sqrt((d / h)) * sqrt((d / l));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Min[N[Abs[M], $MachinePrecision], D], $MachinePrecision]}, Block[{t$95$1 = N[Max[N[Abs[M], $MachinePrecision], D], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(1.0 - N[(N[(N[(t$95$1 * t$95$0), $MachinePrecision] / d), $MachinePrecision] * N[(N[(h * 0.25), $MachinePrecision] * N[(t$95$1 * N[(t$95$0 / N[(N[(d + d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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[(t$95$0 * t$95$1), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], t$95$2, If[LessEqual[t$95$3, 4e+228], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
t_0 := \mathsf{min}\left(\left|M\right|, D\right)\\
t_1 := \mathsf{max}\left(\left|M\right|, D\right)\\
t_2 := \frac{\left(1 - \frac{t\_1 \cdot t\_0}{d} \cdot \left(\left(h \cdot 0.25\right) \cdot \left(t\_1 \cdot \frac{t\_0}{\left(d + d\right) \cdot \ell}\right)\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}\\
t_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{t\_0 \cdot t\_1}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(1 - \frac{D \cdot M}{d} \cdot \left(\left(h \cdot \frac{1}{4}\right) \cdot \color{blue}{\left(D \cdot \frac{M}{\ell \cdot \left(d + d\right)}\right)}\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}} \]
      19. lower-/.f6476.5

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

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

        \[\leadsto \frac{\left(1 - \frac{D \cdot M}{d} \cdot \left(\left(h \cdot \frac{1}{4}\right) \cdot \left(D \cdot \frac{M}{\color{blue}{\left(d + d\right) \cdot \ell}}\right)\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}} \]
      22. lower-*.f6476.5

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

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

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

    1. Initial program 66.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 0

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

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

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

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

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

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

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

Alternative 6: 81.8% accurate, 0.4× speedup?

\[\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 := \frac{\left(1 - h \cdot \left(\left(\left(\frac{M}{d} \cdot 0.25\right) \cdot D\right) \cdot \left(D \cdot \frac{M}{\left(d + d\right) \cdot \ell}\right)\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+228}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(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
         (/
          (*
           (- 1.0 (* h (* (* (* (/ M d) 0.25) D) (* D (/ M (* (+ d d) l))))))
           (fabs d))
          (sqrt (* h l)))))
   (if (<= t_0 0.0)
     t_1
     (if (<= t_0 4e+228) (* (sqrt (/ d h)) (sqrt (/ d l))) t_1))))
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 = ((1.0 - (h * ((((M / d) * 0.25) * D) * (D * (M / ((d + d) * l)))))) * fabs(d)) / sqrt((h * l));
	double tmp;
	if (t_0 <= 0.0) {
		tmp = t_1;
	} else if (t_0 <= 4e+228) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: 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 = ((1.0d0 - (h * ((((m / d) * 0.25d0) * d_1) * (d_1 * (m / ((d + d) * l)))))) * abs(d)) / sqrt((h * l))
    if (t_0 <= 0.0d0) then
        tmp = t_1
    else if (t_0 <= 4d+228) then
        tmp = sqrt((d / h)) * sqrt((d / l))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (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 = ((1.0 - (h * ((((M / d) * 0.25) * D) * (D * (M / ((d + d) * l)))))) * Math.abs(d)) / Math.sqrt((h * l));
	double tmp;
	if (t_0 <= 0.0) {
		tmp = t_1;
	} else if (t_0 <= 4e+228) {
		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 = ((1.0 - (h * ((((M / d) * 0.25) * D) * (D * (M / ((d + d) * l)))))) * math.fabs(d)) / math.sqrt((h * l))
	tmp = 0
	if t_0 <= 0.0:
		tmp = t_1
	elif t_0 <= 4e+228:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	else:
		tmp = t_1
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(Float64((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(Float64(Float64(1.0 - Float64(h * Float64(Float64(Float64(Float64(M / d) * 0.25) * D) * Float64(D * Float64(M / Float64(Float64(d + d) * l)))))) * abs(d)) / sqrt(Float64(h * l)))
	tmp = 0.0
	if (t_0 <= 0.0)
		tmp = t_1;
	elseif (t_0 <= 4e+228)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = (((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 = ((1.0 - (h * ((((M / d) * 0.25) * D) * (D * (M / ((d + d) * l)))))) * abs(d)) / sqrt((h * l));
	tmp = 0.0;
	if (t_0 <= 0.0)
		tmp = t_1;
	elseif (t_0 <= 4e+228)
		tmp = sqrt((d / h)) * sqrt((d / l));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(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[(N[(1.0 - N[(h * N[(N[(N[(N[(M / d), $MachinePrecision] * 0.25), $MachinePrecision] * D), $MachinePrecision] * N[(D * N[(M / N[(N[(d + d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], t$95$1, If[LessEqual[t$95$0, 4e+228], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\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 := \frac{\left(1 - h \cdot \left(\left(\left(\frac{M}{d} \cdot 0.25\right) \cdot D\right) \cdot \left(D \cdot \frac{M}{\left(d + d\right) \cdot \ell}\right)\right)\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 0:\\
\;\;\;\;t\_1\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 66.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 0

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

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

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

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

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

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

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

Alternative 7: 81.6% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_3 \cdot \left|d\right|}{t\_0}\\


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

    1. Initial program 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

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

    1. Initial program 66.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 0

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

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

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

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

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

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

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

    if 3.9999999999999997e228 < (*.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 66.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

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

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

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

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

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

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

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

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

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

Alternative 8: 81.6% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. frac-timesN/A

        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-/.f64N/A

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. sqrt-fabs-revN/A

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      20. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      21. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      22. lift-/.f64N/A

        \[\leadsto \left|\sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      23. associate-*r/N/A

        \[\leadsto \left|\sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      24. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied rewrites71.2%

      \[\leadsto \color{blue}{\left|\frac{-d}{\sqrt{\ell \cdot h}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    6. Applied rewrites77.1%

      \[\leadsto \color{blue}{\frac{\left(1 - \frac{\left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot \left(d + d\right)}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
    7. Applied rewrites73.9%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{\left(0.25 \cdot M\right) \cdot h}{\ell \cdot d} \cdot D, \frac{D \cdot M}{-2 \cdot d}, 1\right) \cdot \left|d\right|}{\sqrt{\ell \cdot h}}} \]

    if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 3.9999999999999997e228

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Taylor expanded in l around 0

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      3. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      4. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 62.3% accurate, 0.2× speedup?

\[\begin{array}{l} t_0 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ t_1 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\ t_2 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\ t_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{t\_1 \cdot t\_2}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_3 \leq -4 \cdot 10^{+190}:\\ \;\;\;\;\mathsf{fma}\left(\left(-0.125 \cdot \frac{\left(t\_2 \cdot t\_2\right) \cdot t\_1}{d \cdot d}\right) \cdot t\_1, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+228}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h}\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ (fabs d) (sqrt (* h l))))
        (t_1 (fmin (fabs M) (fabs D)))
        (t_2 (fmax (fabs M) (fabs D)))
        (t_3
         (*
          (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
          (-
           1.0
           (* (* (/ 1.0 2.0) (pow (/ (* t_1 t_2) (* 2.0 d)) 2.0)) (/ h l))))))
   (if (<= t_3 -4e+190)
     (*
      (fma (* (* -0.125 (/ (* (* t_2 t_2) t_1) (* d d))) t_1) (/ h l) 1.0)
      (/ (- d) (sqrt (* l h))))
     (if (<= t_3 0.0)
       t_0
       (if (<= t_3 4e+228)
         (* (sqrt (/ d h)) (sqrt (/ d l)))
         (if (<= t_3 INFINITY)
           t_0
           (/
            (/ (* (* -1.0 (* d (sqrt (/ h d)))) (* d (sqrt (/ l d)))) l)
            h)))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = fabs(d) / sqrt((h * l));
	double t_1 = fmin(fabs(M), fabs(D));
	double t_2 = fmax(fabs(M), fabs(D));
	double t_3 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((t_1 * t_2) / (2.0 * d)), 2.0)) * (h / l)));
	double tmp;
	if (t_3 <= -4e+190) {
		tmp = fma(((-0.125 * (((t_2 * t_2) * t_1) / (d * d))) * t_1), (h / l), 1.0) * (-d / sqrt((l * h)));
	} else if (t_3 <= 0.0) {
		tmp = t_0;
	} else if (t_3 <= 4e+228) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_0;
	} else {
		tmp = (((-1.0 * (d * sqrt((h / d)))) * (d * sqrt((l / d)))) / l) / h;
	}
	return tmp;
}
function code(d, h, l, M, D)
	t_0 = Float64(abs(d) / sqrt(Float64(h * l)))
	t_1 = fmin(abs(M), abs(D))
	t_2 = fmax(abs(M), abs(D))
	t_3 = 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(t_1 * t_2) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
	tmp = 0.0
	if (t_3 <= -4e+190)
		tmp = Float64(fma(Float64(Float64(-0.125 * Float64(Float64(Float64(t_2 * t_2) * t_1) / Float64(d * d))) * t_1), Float64(h / l), 1.0) * Float64(Float64(-d) / sqrt(Float64(l * h))));
	elseif (t_3 <= 0.0)
		tmp = t_0;
	elseif (t_3 <= 4e+228)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	elseif (t_3 <= Inf)
		tmp = t_0;
	else
		tmp = Float64(Float64(Float64(Float64(-1.0 * Float64(d * sqrt(Float64(h / d)))) * Float64(d * sqrt(Float64(l / d)))) / l) / h);
	end
	return tmp
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Min[N[Abs[M], $MachinePrecision], N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Abs[M], $MachinePrecision], N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = 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[(t$95$1 * t$95$2), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -4e+190], N[(N[(N[(N[(-0.125 * N[(N[(N[(t$95$2 * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[((-d) / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], t$95$0, If[LessEqual[t$95$3, 4e+228], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$0, N[(N[(N[(N[(-1.0 * N[(d * N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(d * N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / h), $MachinePrecision]]]]]]]]]
\begin{array}{l}
t_0 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\
t_1 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\
t_2 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\
t_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{t\_1 \cdot t\_2}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
\mathbf{if}\;t\_3 \leq -4 \cdot 10^{+190}:\\
\;\;\;\;\mathsf{fma}\left(\left(-0.125 \cdot \frac{\left(t\_2 \cdot t\_2\right) \cdot t\_1}{d \cdot d}\right) \cdot t\_1, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{\ell \cdot h}}\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h}\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.0000000000000003e190

    1. Initial program 66.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. Applied rewrites28.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(M \cdot \left(\frac{D \cdot \left(D \cdot M\right)}{4 \cdot \left(d \cdot d\right)} \cdot -0.5\right), \frac{h}{\ell} \cdot \sqrt{d \cdot \frac{d}{h \cdot \ell}}, \sqrt{d \cdot \frac{d}{h \cdot \ell}}\right)} \]
    3. Applied rewrites27.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\left(D \cdot D\right) \cdot M}{d \cdot d}\right) \cdot M, \frac{h}{\ell}, 1\right) \cdot \frac{-d}{\sqrt{\ell \cdot h}}} \]

    if -4.0000000000000003e190 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 3.9999999999999997e228 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

    1. Initial program 66.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. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{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(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. unpow2N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)} \cdot \frac{h}{\ell}\right) \]
      7. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      8. 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{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      9. lift-/.f64N/A

        \[\leadsto \left({\left(\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{M \cdot D}{2 \cdot d}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. 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 - \left(\color{blue}{\frac{D}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. count-2-revN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. 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 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. 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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
    3. Applied rewrites67.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}{\left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)}\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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. frac-timesN/A

        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-/.f64N/A

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. sqrt-fabs-revN/A

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      20. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      21. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      22. lift-/.f64N/A

        \[\leadsto \left|\sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      23. associate-*r/N/A

        \[\leadsto \left|\sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      24. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied rewrites71.2%

      \[\leadsto \color{blue}{\left|\frac{-d}{\sqrt{\ell \cdot h}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    6. Applied rewrites77.1%

      \[\leadsto \color{blue}{\frac{\left(1 - \frac{\left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot \left(d + d\right)}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
    7. Taylor expanded in d around inf

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. lower-fabs.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.2

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.2%

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]

    if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 3.9999999999999997e228

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Taylor expanded in l around 0

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      3. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      4. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]

    if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Taylor expanded in l around 0

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in d around -inf

      \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-/.f6417.0

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    10. Applied rewrites17.0%

      \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    11. Taylor expanded in d around inf

      \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h} \]
    12. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h} \]
      3. lower-/.f6410.8

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h} \]
    13. Applied rewrites10.8%

      \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 10: 60.7% accurate, 0.2× speedup?

\[\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 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-30}:\\ \;\;\;\;-1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+228}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h}\\ \end{array} \]
(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 (/ (fabs d) (sqrt (* h l)))))
   (if (<= t_0 -1e-30)
     (* -1.0 (sqrt (/ (pow d 2.0) (* h l))))
     (if (<= t_0 0.0)
       t_1
       (if (<= t_0 4e+228)
         (* (sqrt (/ d h)) (sqrt (/ d l)))
         (if (<= t_0 INFINITY)
           t_1
           (/
            (/ (* (* -1.0 (* d (sqrt (/ h d)))) (* d (sqrt (/ l d)))) l)
            h)))))))
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 = fabs(d) / sqrt((h * l));
	double tmp;
	if (t_0 <= -1e-30) {
		tmp = -1.0 * sqrt((pow(d, 2.0) / (h * l)));
	} else if (t_0 <= 0.0) {
		tmp = t_1;
	} else if (t_0 <= 4e+228) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else if (t_0 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = (((-1.0 * (d * sqrt((h / d)))) * (d * sqrt((l / d)))) / l) / h;
	}
	return tmp;
}
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (Math.pow((d / h), (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.abs(d) / Math.sqrt((h * l));
	double tmp;
	if (t_0 <= -1e-30) {
		tmp = -1.0 * Math.sqrt((Math.pow(d, 2.0) / (h * l)));
	} else if (t_0 <= 0.0) {
		tmp = t_1;
	} else if (t_0 <= 4e+228) {
		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
	} else if (t_0 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = (((-1.0 * (d * Math.sqrt((h / d)))) * (d * Math.sqrt((l / d)))) / l) / h;
	}
	return tmp;
}
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.fabs(d) / math.sqrt((h * l))
	tmp = 0
	if t_0 <= -1e-30:
		tmp = -1.0 * math.sqrt((math.pow(d, 2.0) / (h * l)))
	elif t_0 <= 0.0:
		tmp = t_1
	elif t_0 <= 4e+228:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	elif t_0 <= math.inf:
		tmp = t_1
	else:
		tmp = (((-1.0 * (d * math.sqrt((h / d)))) * (d * math.sqrt((l / d)))) / l) / h
	return tmp
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(abs(d) / sqrt(Float64(h * l)))
	tmp = 0.0
	if (t_0 <= -1e-30)
		tmp = Float64(-1.0 * sqrt(Float64((d ^ 2.0) / Float64(h * l))));
	elseif (t_0 <= 0.0)
		tmp = t_1;
	elseif (t_0 <= 4e+228)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	elseif (t_0 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(Float64(Float64(Float64(-1.0 * Float64(d * sqrt(Float64(h / d)))) * Float64(d * sqrt(Float64(l / d)))) / l) / h);
	end
	return tmp
end
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 = abs(d) / sqrt((h * l));
	tmp = 0.0;
	if (t_0 <= -1e-30)
		tmp = -1.0 * sqrt(((d ^ 2.0) / (h * l)));
	elseif (t_0 <= 0.0)
		tmp = t_1;
	elseif (t_0 <= 4e+228)
		tmp = sqrt((d / h)) * sqrt((d / l));
	elseif (t_0 <= Inf)
		tmp = t_1;
	else
		tmp = (((-1.0 * (d * sqrt((h / d)))) * (d * sqrt((l / d)))) / l) / h;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(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[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-30], N[(-1.0 * N[Sqrt[N[(N[Power[d, 2.0], $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], t$95$1, If[LessEqual[t$95$0, 4e+228], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], t$95$1, N[(N[(N[(N[(-1.0 * N[(d * N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(d * N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / h), $MachinePrecision]]]]]]]
\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 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-30}:\\
\;\;\;\;-1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}}\\

\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h}\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -1e-30

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. mult-flipN/A

        \[\leadsto \left(\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{1}{h}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{1}{h} \cdot \color{blue}{\left(\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1}{h} \cdot \color{blue}{\left(\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}\right)} \]
      5. lower-/.f6423.9

        \[\leadsto \frac{1}{h} \cdot \left(\color{blue}{\sqrt{d \cdot h}} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      6. lift-*.f64N/A

        \[\leadsto \frac{1}{h} \cdot \left(\sqrt{d \cdot h} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \]
      7. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{h} \cdot \left(\sqrt{d \cdot h} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \]
      8. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{h} \cdot \left(\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      9. sqrt-unprodN/A

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}} \]
      10. lower-sqrt.f64N/A

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}} \]
      11. lower-*.f6421.7

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}} \]
      12. lift-*.f64N/A

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}} \]
      13. *-commutativeN/A

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}} \]
      14. lower-*.f6421.7

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}} \]
    6. Applied rewrites21.7%

      \[\leadsto \frac{1}{h} \cdot \color{blue}{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}} \]
    7. Taylor expanded in h around -inf

      \[\leadsto -1 \cdot \color{blue}{\sqrt{\frac{{d}^{2}}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
      3. lower-/.f64N/A

        \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
      4. lower-pow.f64N/A

        \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
      5. lower-*.f6411.6

        \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
    9. Applied rewrites11.6%

      \[\leadsto -1 \cdot \color{blue}{\sqrt{\frac{{d}^{2}}{h \cdot \ell}}} \]

    if -1e-30 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 3.9999999999999997e228 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

    1. Initial program 66.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. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{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(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. unpow2N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)} \cdot \frac{h}{\ell}\right) \]
      7. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      8. 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{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      9. lift-/.f64N/A

        \[\leadsto \left({\left(\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{M \cdot D}{2 \cdot d}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. 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 - \left(\color{blue}{\frac{D}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. count-2-revN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. 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 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. 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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
    3. Applied rewrites67.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}{\left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)}\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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. frac-timesN/A

        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-/.f64N/A

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. sqrt-fabs-revN/A

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      20. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      21. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      22. lift-/.f64N/A

        \[\leadsto \left|\sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      23. associate-*r/N/A

        \[\leadsto \left|\sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      24. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied rewrites71.2%

      \[\leadsto \color{blue}{\left|\frac{-d}{\sqrt{\ell \cdot h}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    6. Applied rewrites77.1%

      \[\leadsto \color{blue}{\frac{\left(1 - \frac{\left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot \left(d + d\right)}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
    7. Taylor expanded in d around inf

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. lower-fabs.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.2

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.2%

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]

    if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 3.9999999999999997e228

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Taylor expanded in l around 0

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      3. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      4. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]

    if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Taylor expanded in l around 0

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in d around -inf

      \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-/.f6417.0

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    10. Applied rewrites17.0%

      \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    11. Taylor expanded in d around inf

      \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h} \]
    12. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h} \]
      3. lower-/.f6410.8

        \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h} \]
    13. Applied rewrites10.8%

      \[\leadsto \frac{\frac{\left(-1 \cdot \left(d \cdot \sqrt{\frac{h}{d}}\right)\right) \cdot \left(d \cdot \sqrt{\frac{\ell}{d}}\right)}{\ell}}{h} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 11: 57.5% accurate, 0.3× speedup?

\[\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 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-30}:\\ \;\;\;\;-1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+228}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(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 (/ (fabs d) (sqrt (* h l)))))
   (if (<= t_0 -1e-30)
     (* -1.0 (sqrt (/ (pow d 2.0) (* h l))))
     (if (<= t_0 0.0)
       t_1
       (if (<= t_0 4e+228) (* (sqrt (/ d h)) (sqrt (/ d l))) t_1)))))
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 = fabs(d) / sqrt((h * l));
	double tmp;
	if (t_0 <= -1e-30) {
		tmp = -1.0 * sqrt((pow(d, 2.0) / (h * l)));
	} else if (t_0 <= 0.0) {
		tmp = t_1;
	} else if (t_0 <= 4e+228) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: 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 = abs(d) / sqrt((h * l))
    if (t_0 <= (-1d-30)) then
        tmp = (-1.0d0) * sqrt(((d ** 2.0d0) / (h * l)))
    else if (t_0 <= 0.0d0) then
        tmp = t_1
    else if (t_0 <= 4d+228) then
        tmp = sqrt((d / h)) * sqrt((d / l))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (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.abs(d) / Math.sqrt((h * l));
	double tmp;
	if (t_0 <= -1e-30) {
		tmp = -1.0 * Math.sqrt((Math.pow(d, 2.0) / (h * l)));
	} else if (t_0 <= 0.0) {
		tmp = t_1;
	} else if (t_0 <= 4e+228) {
		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
	} else {
		tmp = t_1;
	}
	return tmp;
}
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.fabs(d) / math.sqrt((h * l))
	tmp = 0
	if t_0 <= -1e-30:
		tmp = -1.0 * math.sqrt((math.pow(d, 2.0) / (h * l)))
	elif t_0 <= 0.0:
		tmp = t_1
	elif t_0 <= 4e+228:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	else:
		tmp = t_1
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(Float64((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(abs(d) / sqrt(Float64(h * l)))
	tmp = 0.0
	if (t_0 <= -1e-30)
		tmp = Float64(-1.0 * sqrt(Float64((d ^ 2.0) / Float64(h * l))));
	elseif (t_0 <= 0.0)
		tmp = t_1;
	elseif (t_0 <= 4e+228)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = (((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 = abs(d) / sqrt((h * l));
	tmp = 0.0;
	if (t_0 <= -1e-30)
		tmp = -1.0 * sqrt(((d ^ 2.0) / (h * l)));
	elseif (t_0 <= 0.0)
		tmp = t_1;
	elseif (t_0 <= 4e+228)
		tmp = sqrt((d / h)) * sqrt((d / l));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(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[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-30], N[(-1.0 * N[Sqrt[N[(N[Power[d, 2.0], $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], t$95$1, If[LessEqual[t$95$0, 4e+228], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\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 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-30}:\\
\;\;\;\;-1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}}\\

\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -1e-30

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. mult-flipN/A

        \[\leadsto \left(\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \color{blue}{\frac{1}{h}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{1}{h} \cdot \color{blue}{\left(\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1}{h} \cdot \color{blue}{\left(\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}\right)} \]
      5. lower-/.f6423.9

        \[\leadsto \frac{1}{h} \cdot \left(\color{blue}{\sqrt{d \cdot h}} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      6. lift-*.f64N/A

        \[\leadsto \frac{1}{h} \cdot \left(\sqrt{d \cdot h} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \]
      7. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{h} \cdot \left(\sqrt{d \cdot h} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}}\right) \]
      8. lift-sqrt.f64N/A

        \[\leadsto \frac{1}{h} \cdot \left(\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      9. sqrt-unprodN/A

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}} \]
      10. lower-sqrt.f64N/A

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}} \]
      11. lower-*.f6421.7

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}} \]
      12. lift-*.f64N/A

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}} \]
      13. *-commutativeN/A

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}} \]
      14. lower-*.f6421.7

        \[\leadsto \frac{1}{h} \cdot \sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}} \]
    6. Applied rewrites21.7%

      \[\leadsto \frac{1}{h} \cdot \color{blue}{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}} \]
    7. Taylor expanded in h around -inf

      \[\leadsto -1 \cdot \color{blue}{\sqrt{\frac{{d}^{2}}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
      3. lower-/.f64N/A

        \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
      4. lower-pow.f64N/A

        \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
      5. lower-*.f6411.6

        \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
    9. Applied rewrites11.6%

      \[\leadsto -1 \cdot \color{blue}{\sqrt{\frac{{d}^{2}}{h \cdot \ell}}} \]

    if -1e-30 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 3.9999999999999997e228 < (*.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 66.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. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{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(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. unpow2N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)} \cdot \frac{h}{\ell}\right) \]
      7. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      8. 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{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      9. lift-/.f64N/A

        \[\leadsto \left({\left(\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{M \cdot D}{2 \cdot d}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. 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 - \left(\color{blue}{\frac{D}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. count-2-revN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. 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 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. 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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
    3. Applied rewrites67.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}{\left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)}\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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. frac-timesN/A

        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-/.f64N/A

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. sqrt-fabs-revN/A

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      20. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      21. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      22. lift-/.f64N/A

        \[\leadsto \left|\sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      23. associate-*r/N/A

        \[\leadsto \left|\sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      24. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied rewrites71.2%

      \[\leadsto \color{blue}{\left|\frac{-d}{\sqrt{\ell \cdot h}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    6. Applied rewrites77.1%

      \[\leadsto \color{blue}{\frac{\left(1 - \frac{\left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot \left(d + d\right)}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
    7. Taylor expanded in d around inf

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. lower-fabs.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.2

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.2%

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]

    if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 3.9999999999999997e228

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Taylor expanded in l around 0

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      3. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      4. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 12: 56.3% accurate, 0.3× speedup?

\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ t_1 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ t_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)\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{-143}:\\ \;\;\;\;-1 \cdot t\_0\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+228}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (sqrt (/ d h)) (sqrt (/ d l))))
        (t_1 (/ (fabs d) (sqrt (* h l))))
        (t_2
         (*
          (* (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_2 -2e-143)
     (* -1.0 t_0)
     (if (<= t_2 0.0) t_1 (if (<= t_2 4e+228) t_0 t_1)))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((d / h)) * sqrt((d / l));
	double t_1 = fabs(d) / sqrt((h * l));
	double t_2 = (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_2 <= -2e-143) {
		tmp = -1.0 * t_0;
	} else if (t_2 <= 0.0) {
		tmp = t_1;
	} else if (t_2 <= 4e+228) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = sqrt((d / h)) * sqrt((d / l))
    t_1 = abs(d) / sqrt((h * l))
    t_2 = (((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_2 <= (-2d-143)) then
        tmp = (-1.0d0) * t_0
    else if (t_2 <= 0.0d0) then
        tmp = t_1
    else if (t_2 <= 4d+228) then
        tmp = t_0
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt((d / h)) * Math.sqrt((d / l));
	double t_1 = Math.abs(d) / Math.sqrt((h * l));
	double t_2 = (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_2 <= -2e-143) {
		tmp = -1.0 * t_0;
	} else if (t_2 <= 0.0) {
		tmp = t_1;
	} else if (t_2 <= 4e+228) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = math.sqrt((d / h)) * math.sqrt((d / l))
	t_1 = math.fabs(d) / math.sqrt((h * l))
	t_2 = (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_2 <= -2e-143:
		tmp = -1.0 * t_0
	elif t_2 <= 0.0:
		tmp = t_1
	elif t_2 <= 4e+228:
		tmp = t_0
	else:
		tmp = t_1
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)))
	t_1 = Float64(abs(d) / sqrt(Float64(h * l)))
	t_2 = 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_2 <= -2e-143)
		tmp = Float64(-1.0 * t_0);
	elseif (t_2 <= 0.0)
		tmp = t_1;
	elseif (t_2 <= 4e+228)
		tmp = t_0;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt((d / h)) * sqrt((d / l));
	t_1 = abs(d) / sqrt((h * l));
	t_2 = (((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_2 <= -2e-143)
		tmp = -1.0 * t_0;
	elseif (t_2 <= 0.0)
		tmp = t_1;
	elseif (t_2 <= 4e+228)
		tmp = t_0;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$2, -2e-143], N[(-1.0 * t$95$0), $MachinePrecision], If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 4e+228], t$95$0, t$95$1]]]]]]
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
t_1 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\
t_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)\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-143}:\\
\;\;\;\;-1 \cdot t\_0\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\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.9999999999999999e-143

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Taylor expanded in h around -inf

      \[\leadsto -1 \cdot \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}}\right) \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      3. lower-sqrt.f64N/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      4. lower-/.f64N/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      5. lower-sqrt.f64N/A

        \[\leadsto -1 \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      6. lower-/.f648.9

        \[\leadsto -1 \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \]
    7. Applied rewrites8.9%

      \[\leadsto -1 \cdot \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} \]

    if -1.9999999999999999e-143 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 3.9999999999999997e228 < (*.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 66.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. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{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(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. unpow2N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)} \cdot \frac{h}{\ell}\right) \]
      7. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      8. 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{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      9. lift-/.f64N/A

        \[\leadsto \left({\left(\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{M \cdot D}{2 \cdot d}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. 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 - \left(\color{blue}{\frac{D}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. count-2-revN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. 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 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. 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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
    3. Applied rewrites67.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}{\left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)}\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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. frac-timesN/A

        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-/.f64N/A

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. sqrt-fabs-revN/A

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      20. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      21. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      22. lift-/.f64N/A

        \[\leadsto \left|\sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      23. associate-*r/N/A

        \[\leadsto \left|\sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      24. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied rewrites71.2%

      \[\leadsto \color{blue}{\left|\frac{-d}{\sqrt{\ell \cdot h}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    6. Applied rewrites77.1%

      \[\leadsto \color{blue}{\frac{\left(1 - \frac{\left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot \left(d + d\right)}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
    7. Taylor expanded in d around inf

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. lower-fabs.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.2

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.2%

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]

    if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 3.9999999999999997e228

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Taylor expanded in l around 0

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      3. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      4. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 54.7% accurate, 0.3× speedup?

\[\begin{array}{l} t_0 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ t_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)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-143}:\\ \;\;\;\;-1 \cdot \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+228}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ (fabs d) (sqrt (* h l))))
        (t_1
         (*
          (* (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_1 -2e-143)
     (* -1.0 (/ (* d (sqrt (/ h l))) h))
     (if (<= t_1 0.0)
       t_0
       (if (<= t_1 4e+228) (* (sqrt (/ d h)) (sqrt (/ d l))) t_0)))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = fabs(d) / sqrt((h * l));
	double t_1 = (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_1 <= -2e-143) {
		tmp = -1.0 * ((d * sqrt((h / l))) / h);
	} else if (t_1 <= 0.0) {
		tmp = t_0;
	} else if (t_1 <= 4e+228) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else {
		tmp = t_0;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = abs(d) / sqrt((h * l))
    t_1 = (((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_1 <= (-2d-143)) then
        tmp = (-1.0d0) * ((d * sqrt((h / l))) / h)
    else if (t_1 <= 0.0d0) then
        tmp = t_0
    else if (t_1 <= 4d+228) then
        tmp = sqrt((d / h)) * sqrt((d / l))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.abs(d) / Math.sqrt((h * l));
	double t_1 = (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_1 <= -2e-143) {
		tmp = -1.0 * ((d * Math.sqrt((h / l))) / h);
	} else if (t_1 <= 0.0) {
		tmp = t_0;
	} else if (t_1 <= 4e+228) {
		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = math.fabs(d) / math.sqrt((h * l))
	t_1 = (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_1 <= -2e-143:
		tmp = -1.0 * ((d * math.sqrt((h / l))) / h)
	elif t_1 <= 0.0:
		tmp = t_0
	elif t_1 <= 4e+228:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	else:
		tmp = t_0
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(abs(d) / sqrt(Float64(h * l)))
	t_1 = 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_1 <= -2e-143)
		tmp = Float64(-1.0 * Float64(Float64(d * sqrt(Float64(h / l))) / h));
	elseif (t_1 <= 0.0)
		tmp = t_0;
	elseif (t_1 <= 4e+228)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = abs(d) / sqrt((h * l));
	t_1 = (((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_1 <= -2e-143)
		tmp = -1.0 * ((d * sqrt((h / l))) / h);
	elseif (t_1 <= 0.0)
		tmp = t_0;
	elseif (t_1 <= 4e+228)
		tmp = sqrt((d / h)) * sqrt((d / l));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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$1, -2e-143], N[(-1.0 * N[(N[(d * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], t$95$0, If[LessEqual[t$95$1, 4e+228], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
t_0 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\
t_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)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-143}:\\
\;\;\;\;-1 \cdot \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\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.9999999999999999e-143

    1. Initial program 66.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. Applied rewrites28.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(M \cdot \left(\frac{D \cdot \left(D \cdot M\right)}{4 \cdot \left(d \cdot d\right)} \cdot -0.5\right), \frac{h}{\ell} \cdot \sqrt{d \cdot \frac{d}{h \cdot \ell}}, \sqrt{d \cdot \frac{d}{h \cdot \ell}}\right)} \]
    3. Taylor expanded in d around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}}\right) \]
      3. lower-sqrt.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      4. lower-/.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      5. lower-*.f6426.3

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
    5. Applied rewrites26.3%

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    6. Taylor expanded in h around 0

      \[\leadsto -1 \cdot \frac{d \cdot \sqrt{\frac{h}{\ell}}}{\color{blue}{h}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto -1 \cdot \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto -1 \cdot \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
      4. lower-/.f6412.8

        \[\leadsto -1 \cdot \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
    8. Applied rewrites12.8%

      \[\leadsto -1 \cdot \frac{d \cdot \sqrt{\frac{h}{\ell}}}{\color{blue}{h}} \]

    if -1.9999999999999999e-143 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 3.9999999999999997e228 < (*.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 66.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. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{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(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. unpow2N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)} \cdot \frac{h}{\ell}\right) \]
      7. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      8. 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{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      9. lift-/.f64N/A

        \[\leadsto \left({\left(\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{M \cdot D}{2 \cdot d}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. 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 - \left(\color{blue}{\frac{D}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. count-2-revN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. 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 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. 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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
    3. Applied rewrites67.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}{\left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)}\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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. frac-timesN/A

        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-/.f64N/A

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. sqrt-fabs-revN/A

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      20. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      21. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      22. lift-/.f64N/A

        \[\leadsto \left|\sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      23. associate-*r/N/A

        \[\leadsto \left|\sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      24. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied rewrites71.2%

      \[\leadsto \color{blue}{\left|\frac{-d}{\sqrt{\ell \cdot h}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    6. Applied rewrites77.1%

      \[\leadsto \color{blue}{\frac{\left(1 - \frac{\left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot \left(d + d\right)}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
    7. Taylor expanded in d around inf

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. lower-fabs.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.2

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.2%

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]

    if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 3.9999999999999997e228

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Taylor expanded in l around 0

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      3. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      4. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 14: 51.6% accurate, 0.5× speedup?

\[\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 0:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+228}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \end{array} \]
(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 0.0)
     (* d (sqrt (/ 1.0 (* h l))))
     (if (<= t_0 4e+228)
       (* (sqrt (/ d h)) (sqrt (/ d l)))
       (/ (fabs d) (sqrt (* h l)))))))
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 <= 0.0) {
		tmp = d * sqrt((1.0 / (h * l)));
	} else if (t_0 <= 4e+228) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else {
		tmp = fabs(d) / sqrt((h * l));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (((d / h) ** (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 <= 0.0d0) then
        tmp = d * sqrt((1.0d0 / (h * l)))
    else if (t_0 <= 4d+228) then
        tmp = sqrt((d / h)) * sqrt((d / l))
    else
        tmp = abs(d) / sqrt((h * l))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (Math.pow((d / h), (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 <= 0.0) {
		tmp = d * Math.sqrt((1.0 / (h * l)));
	} else if (t_0 <= 4e+228) {
		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
	} else {
		tmp = Math.abs(d) / Math.sqrt((h * l));
	}
	return tmp;
}
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 <= 0.0:
		tmp = d * math.sqrt((1.0 / (h * l)))
	elif t_0 <= 4e+228:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	else:
		tmp = math.fabs(d) / math.sqrt((h * l))
	return tmp
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 <= 0.0)
		tmp = Float64(d * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (t_0 <= 4e+228)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	else
		tmp = Float64(abs(d) / sqrt(Float64(h * l)));
	end
	return tmp
end
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 <= 0.0)
		tmp = d * sqrt((1.0 / (h * l)));
	elseif (t_0 <= 4e+228)
		tmp = sqrt((d / h)) * sqrt((d / l));
	else
		tmp = abs(d) / sqrt((h * l));
	end
	tmp_2 = tmp;
end
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, 0.0], N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+228], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\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 0:\\
\;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+228}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0

    1. Initial program 66.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. Applied rewrites28.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(M \cdot \left(\frac{D \cdot \left(D \cdot M\right)}{4 \cdot \left(d \cdot d\right)} \cdot -0.5\right), \frac{h}{\ell} \cdot \sqrt{d \cdot \frac{d}{h \cdot \ell}}, \sqrt{d \cdot \frac{d}{h \cdot \ell}}\right)} \]
    3. Taylor expanded in d around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}}\right) \]
      3. lower-sqrt.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      4. lower-/.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      5. lower-*.f6426.3

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
    5. Applied rewrites26.3%

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \color{blue}{-1} \]
      3. lift-*.f64N/A

        \[\leadsto \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot -1 \]
      4. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot -1 \]
      5. associate-*l*N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot -1\right)} \]
    7. Applied rewrites26.2%

      \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]
    8. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto d \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto d \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
      3. lower-/.f64N/A

        \[\leadsto d \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
      4. lower-*.f6426.7

        \[\leadsto d \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
    10. Applied rewrites26.7%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]

    if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 3.9999999999999997e228

    1. Initial program 66.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 0

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. lower-/.f6423.9

        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    4. Applied rewrites23.9%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
    5. Taylor expanded in l around 0

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
      6. lower-*.f6432.2

        \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    7. Applied rewrites32.2%

      \[\leadsto \frac{\frac{\sqrt{d \cdot h} \cdot \sqrt{d \cdot \ell}}{\ell}}{h} \]
    8. Taylor expanded in h around inf

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      3. lower-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      4. lower-sqrt.f64N/A

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
      5. lower-/.f6439.4

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
    10. Applied rewrites39.4%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]

    if 3.9999999999999997e228 < (*.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 66.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. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{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(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. unpow2N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)} \cdot \frac{h}{\ell}\right) \]
      7. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      8. 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{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      9. lift-/.f64N/A

        \[\leadsto \left({\left(\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{M \cdot D}{2 \cdot d}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. 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 - \left(\color{blue}{\frac{D}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. count-2-revN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. 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 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. 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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
    3. Applied rewrites67.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}{\left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)}\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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. frac-timesN/A

        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-/.f64N/A

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. sqrt-fabs-revN/A

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      20. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      21. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      22. lift-/.f64N/A

        \[\leadsto \left|\sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      23. associate-*r/N/A

        \[\leadsto \left|\sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      24. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied rewrites71.2%

      \[\leadsto \color{blue}{\left|\frac{-d}{\sqrt{\ell \cdot h}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    6. Applied rewrites77.1%

      \[\leadsto \color{blue}{\frac{\left(1 - \frac{\left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot \left(d + d\right)}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
    7. Taylor expanded in d around inf

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. lower-fabs.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.2

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.2%

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 15: 49.0% accurate, 0.9× speedup?

\[\begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -2 \cdot 10^{-143}:\\ \;\;\;\;\frac{-d}{h \cdot \sqrt{\frac{\ell}{h}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<=
      (*
       (* (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))))
      -2e-143)
   (/ (- d) (* h (sqrt (/ l h))))
   (/ (fabs d) (sqrt (* h l)))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (((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)))) <= -2e-143) {
		tmp = -d / (h * sqrt((l / h)));
	} else {
		tmp = fabs(d) / sqrt((h * l));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (((((d / h) ** (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)))) <= (-2d-143)) then
        tmp = -d / (h * sqrt((l / h)))
    else
        tmp = abs(d) / sqrt((h * l))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (((Math.pow((d / h), (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)))) <= -2e-143) {
		tmp = -d / (h * Math.sqrt((l / h)));
	} else {
		tmp = Math.abs(d) / Math.sqrt((h * l));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if ((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)))) <= -2e-143:
		tmp = -d / (h * math.sqrt((l / h)))
	else:
		tmp = math.fabs(d) / math.sqrt((h * l))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (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)))) <= -2e-143)
		tmp = Float64(Float64(-d) / Float64(h * sqrt(Float64(l / h))));
	else
		tmp = Float64(abs(d) / sqrt(Float64(h * l)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (((((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)))) <= -2e-143)
		tmp = -d / (h * sqrt((l / h)));
	else
		tmp = abs(d) / sqrt((h * l));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[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], -2e-143], N[((-d) / N[(h * N[Sqrt[N[(l / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -2 \cdot 10^{-143}:\\
\;\;\;\;\frac{-d}{h \cdot \sqrt{\frac{\ell}{h}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -1.9999999999999999e-143

    1. Initial program 66.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. Applied rewrites28.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(M \cdot \left(\frac{D \cdot \left(D \cdot M\right)}{4 \cdot \left(d \cdot d\right)} \cdot -0.5\right), \frac{h}{\ell} \cdot \sqrt{d \cdot \frac{d}{h \cdot \ell}}, \sqrt{d \cdot \frac{d}{h \cdot \ell}}\right)} \]
    3. Taylor expanded in d around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}}\right) \]
      3. lower-sqrt.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      4. lower-/.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      5. lower-*.f6426.3

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
    5. Applied rewrites26.3%

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \color{blue}{-1} \]
      3. lift-*.f64N/A

        \[\leadsto \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot -1 \]
      4. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot -1 \]
      5. associate-*l*N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot -1\right)} \]
    7. Applied rewrites26.2%

      \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]
    8. Taylor expanded in h around inf

      \[\leadsto \frac{-d}{h \cdot \color{blue}{\sqrt{\frac{\ell}{h}}}} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{-d}{h \cdot \sqrt{\frac{\ell}{h}}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \frac{-d}{h \cdot \sqrt{\frac{\ell}{h}}} \]
      3. lower-/.f6411.9

        \[\leadsto \frac{-d}{h \cdot \sqrt{\frac{\ell}{h}}} \]
    10. Applied rewrites11.9%

      \[\leadsto \frac{-d}{h \cdot \color{blue}{\sqrt{\frac{\ell}{h}}}} \]

    if -1.9999999999999999e-143 < (*.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 66.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. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{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(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. unpow2N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)} \cdot \frac{h}{\ell}\right) \]
      7. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      8. 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{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      9. lift-/.f64N/A

        \[\leadsto \left({\left(\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{M \cdot D}{2 \cdot d}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. 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 - \left(\color{blue}{\frac{D}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. count-2-revN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. 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 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. 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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
    3. Applied rewrites67.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}{\left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)}\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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. frac-timesN/A

        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-/.f64N/A

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. sqrt-fabs-revN/A

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      20. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      21. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      22. lift-/.f64N/A

        \[\leadsto \left|\sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      23. associate-*r/N/A

        \[\leadsto \left|\sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      24. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied rewrites71.2%

      \[\leadsto \color{blue}{\left|\frac{-d}{\sqrt{\ell \cdot h}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    6. Applied rewrites77.1%

      \[\leadsto \color{blue}{\frac{\left(1 - \frac{\left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot \left(d + d\right)}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
    7. Taylor expanded in d around inf

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. lower-fabs.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.2

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.2%

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 46.4% accurate, 0.9× speedup?

\[\begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -1 \cdot 10^{-30}:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<=
      (*
       (* (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))))
      -1e-30)
   (* d (sqrt (/ 1.0 (* h l))))
   (/ (fabs d) (sqrt (* h l)))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (((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)))) <= -1e-30) {
		tmp = d * sqrt((1.0 / (h * l)));
	} else {
		tmp = fabs(d) / sqrt((h * l));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (((((d / h) ** (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)))) <= (-1d-30)) then
        tmp = d * sqrt((1.0d0 / (h * l)))
    else
        tmp = abs(d) / sqrt((h * l))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (((Math.pow((d / h), (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)))) <= -1e-30) {
		tmp = d * Math.sqrt((1.0 / (h * l)));
	} else {
		tmp = Math.abs(d) / Math.sqrt((h * l));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if ((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)))) <= -1e-30:
		tmp = d * math.sqrt((1.0 / (h * l)))
	else:
		tmp = math.fabs(d) / math.sqrt((h * l))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (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)))) <= -1e-30)
		tmp = Float64(d * sqrt(Float64(1.0 / Float64(h * l))));
	else
		tmp = Float64(abs(d) / sqrt(Float64(h * l)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (((((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)))) <= -1e-30)
		tmp = d * sqrt((1.0 / (h * l)));
	else
		tmp = abs(d) / sqrt((h * l));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[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], -1e-30], N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -1 \cdot 10^{-30}:\\
\;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -1e-30

    1. Initial program 66.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. Applied rewrites28.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(M \cdot \left(\frac{D \cdot \left(D \cdot M\right)}{4 \cdot \left(d \cdot d\right)} \cdot -0.5\right), \frac{h}{\ell} \cdot \sqrt{d \cdot \frac{d}{h \cdot \ell}}, \sqrt{d \cdot \frac{d}{h \cdot \ell}}\right)} \]
    3. Taylor expanded in d around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}}\right) \]
      3. lower-sqrt.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      4. lower-/.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      5. lower-*.f6426.3

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
    5. Applied rewrites26.3%

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \color{blue}{-1} \]
      3. lift-*.f64N/A

        \[\leadsto \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot -1 \]
      4. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot -1 \]
      5. associate-*l*N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot -1\right)} \]
    7. Applied rewrites26.2%

      \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]
    8. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto d \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto d \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
      3. lower-/.f64N/A

        \[\leadsto d \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
      4. lower-*.f6426.7

        \[\leadsto d \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
    10. Applied rewrites26.7%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]

    if -1e-30 < (*.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 66.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. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{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(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. unpow2N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)} \cdot \frac{h}{\ell}\right) \]
      7. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      8. 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{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      9. lift-/.f64N/A

        \[\leadsto \left({\left(\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{M \cdot D}{2 \cdot d}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. 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 - \left(\color{blue}{\frac{D}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. count-2-revN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. 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 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. 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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
    3. Applied rewrites67.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}{\left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)}\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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. frac-timesN/A

        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-/.f64N/A

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. sqrt-fabs-revN/A

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      20. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      21. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      22. lift-/.f64N/A

        \[\leadsto \left|\sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      23. associate-*r/N/A

        \[\leadsto \left|\sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      24. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied rewrites71.2%

      \[\leadsto \color{blue}{\left|\frac{-d}{\sqrt{\ell \cdot h}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    6. Applied rewrites77.1%

      \[\leadsto \color{blue}{\frac{\left(1 - \frac{\left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot \left(d + d\right)}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
    7. Taylor expanded in d around inf

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. lower-fabs.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.2

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.2%

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 46.2% accurate, 0.9× speedup?

\[\begin{array}{l} t_0 := \sqrt{h \cdot \ell}\\ \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -1 \cdot 10^{-30}:\\ \;\;\;\;\frac{-d}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{t\_0}\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (* h l))))
   (if (<=
        (*
         (* (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))))
        -1e-30)
     (/ (- d) t_0)
     (/ (fabs d) t_0))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((h * l));
	double tmp;
	if (((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)))) <= -1e-30) {
		tmp = -d / t_0;
	} else {
		tmp = fabs(d) / t_0;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sqrt((h * l))
    if (((((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)))) <= (-1d-30)) then
        tmp = -d / t_0
    else
        tmp = abs(d) / t_0
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt((h * l));
	double tmp;
	if (((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)))) <= -1e-30) {
		tmp = -d / t_0;
	} else {
		tmp = Math.abs(d) / t_0;
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = math.sqrt((h * l))
	tmp = 0
	if ((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)))) <= -1e-30:
		tmp = -d / t_0
	else:
		tmp = math.fabs(d) / t_0
	return tmp
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(h * l))
	tmp = 0.0
	if (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)))) <= -1e-30)
		tmp = Float64(Float64(-d) / t_0);
	else
		tmp = Float64(abs(d) / t_0);
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt((h * l));
	tmp = 0.0;
	if (((((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)))) <= -1e-30)
		tmp = -d / t_0;
	else
		tmp = abs(d) / t_0;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[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], -1e-30], N[((-d) / t$95$0), $MachinePrecision], N[(N[Abs[d], $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
t_0 := \sqrt{h \cdot \ell}\\
\mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -1 \cdot 10^{-30}:\\
\;\;\;\;\frac{-d}{t\_0}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left|d\right|}{t\_0}\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -1e-30

    1. Initial program 66.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. Applied rewrites28.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(M \cdot \left(\frac{D \cdot \left(D \cdot M\right)}{4 \cdot \left(d \cdot d\right)} \cdot -0.5\right), \frac{h}{\ell} \cdot \sqrt{d \cdot \frac{d}{h \cdot \ell}}, \sqrt{d \cdot \frac{d}{h \cdot \ell}}\right)} \]
    3. Taylor expanded in d around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}}\right) \]
      3. lower-sqrt.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      4. lower-/.f64N/A

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
      5. lower-*.f6426.3

        \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
    5. Applied rewrites26.3%

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \color{blue}{-1} \]
      3. lift-*.f64N/A

        \[\leadsto \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot -1 \]
      4. *-commutativeN/A

        \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot -1 \]
      5. associate-*l*N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot -1\right)} \]
    7. Applied rewrites26.2%

      \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]

    if -1e-30 < (*.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 66.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. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{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(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. unpow2N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)} \cdot \frac{h}{\ell}\right) \]
      7. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      8. 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{M \cdot D}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
      9. lift-/.f64N/A

        \[\leadsto \left({\left(\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{M \cdot D}{2 \cdot d}} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lower-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. 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 - \left(\color{blue}{\frac{D}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{2 \cdot d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. count-2-revN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. 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 - \left(\frac{D}{\color{blue}{d + d}} \cdot M\right) \cdot \left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. 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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \color{blue}{\left(\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right)}\right) \]
    3. Applied rewrites67.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}{\left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)}\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 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      4. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\frac{1}{2}}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot {\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\frac{1}{2}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      9. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      10. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      11. lift-/.f64N/A

        \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\frac{d}{\ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      12. frac-timesN/A

        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      14. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      15. lift-/.f64N/A

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      17. sqrt-fabs-revN/A

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      18. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      19. lower-fabs.f6451.7

        \[\leadsto \color{blue}{\left|\sqrt{d \cdot \frac{d}{h \cdot \ell}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      20. lift-sqrt.f64N/A

        \[\leadsto \left|\color{blue}{\sqrt{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      21. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\color{blue}{d \cdot \frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      22. lift-/.f64N/A

        \[\leadsto \left|\sqrt{d \cdot \color{blue}{\frac{d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      23. associate-*r/N/A

        \[\leadsto \left|\sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      24. lift-*.f64N/A

        \[\leadsto \left|\sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}}\right| \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. Applied rewrites71.2%

      \[\leadsto \color{blue}{\left|\frac{-d}{\sqrt{\ell \cdot h}}\right|} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
    6. Applied rewrites77.1%

      \[\leadsto \color{blue}{\frac{\left(1 - \frac{\left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right) \cdot \left(M \cdot D\right)}{\ell \cdot \left(d + d\right)}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
    7. Taylor expanded in d around inf

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. lower-fabs.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. lower-sqrt.f64N/A

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.2

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.2%

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 26.2% accurate, 9.2× speedup?

\[\frac{-d}{\sqrt{h \cdot \ell}} \]
(FPCore (d h l M D) :precision binary64 (/ (- d) (sqrt (* h l))))
double code(double d, double h, double l, double M, double D) {
	return -d / sqrt((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 / sqrt((h * l))
end function
public static double code(double d, double h, double l, double M, double D) {
	return -d / Math.sqrt((h * l));
}
def code(d, h, l, M, D):
	return -d / math.sqrt((h * l))
function code(d, h, l, M, D)
	return Float64(Float64(-d) / sqrt(Float64(h * l)))
end
function tmp = code(d, h, l, M, D)
	tmp = -d / sqrt((h * l));
end
code[d_, h_, l_, M_, D_] := N[((-d) / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\frac{-d}{\sqrt{h \cdot \ell}}
Derivation
  1. Initial program 66.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. Applied rewrites28.6%

    \[\leadsto \color{blue}{\mathsf{fma}\left(M \cdot \left(\frac{D \cdot \left(D \cdot M\right)}{4 \cdot \left(d \cdot d\right)} \cdot -0.5\right), \frac{h}{\ell} \cdot \sqrt{d \cdot \frac{d}{h \cdot \ell}}, \sqrt{d \cdot \frac{d}{h \cdot \ell}}\right)} \]
  3. Taylor expanded in d around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
  4. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    2. lower-*.f64N/A

      \[\leadsto -1 \cdot \left(d \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}}\right) \]
    3. lower-sqrt.f64N/A

      \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
    4. lower-/.f64N/A

      \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
    5. lower-*.f6426.3

      \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
  5. Applied rewrites26.3%

    \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
  6. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
    2. *-commutativeN/A

      \[\leadsto \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \color{blue}{-1} \]
    3. lift-*.f64N/A

      \[\leadsto \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot -1 \]
    4. *-commutativeN/A

      \[\leadsto \left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \cdot -1 \]
    5. associate-*l*N/A

      \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot -1\right)} \]
  7. Applied rewrites26.2%

    \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]
  8. Add Preprocessing

Reproduce

?
herbie shell --seed 2025167 
(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)))))