Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.7% → 87.5%
Time: 10.5s
Alternatives: 19
Speedup: 0.4×

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 19 alternatives:

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

Initial Program: 66.7% 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: 87.5% 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|, D\right)\\ t_3 := \mathsf{max}\left(\left|M\right|, D\right)\\ t_4 := t\_2 \cdot t\_3\\ t_5 := \frac{t\_4}{d}\\ t_6 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{t\_4}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_7 := -0.125 \cdot \frac{t\_5 \cdot h}{\ell}\\ \mathbf{if}\;t\_6 \leq -1 \cdot 10^{-166}:\\ \;\;\;\;\left(t\_0 \cdot t\_1\right) \cdot \mathsf{fma}\left(t\_5, t\_7, 1\right)\\ \mathbf{elif}\;t\_6 \leq 0:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(-0.125 \cdot \frac{t\_3 \cdot \left(t\_2 \cdot h\right)}{d \cdot \ell}, \frac{t\_3 \cdot t\_2}{d}, 1\right)\\ \mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+213}:\\ \;\;\;\;\left(\mathsf{fma}\left(t\_7 \cdot t\_3, \frac{t\_2}{d}, 1\right) \cdot t\_0\right) \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\left|d\right| \cdot \frac{\mathsf{fma}\left(t\_7 \cdot t\_2, \frac{t\_3}{d}, 1\right)}{\sqrt{\ell \cdot h}}\\ \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) D))
        (t_3 (fmax (fabs M) D))
        (t_4 (* t_2 t_3))
        (t_5 (/ t_4 d))
        (t_6
         (*
          (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
          (- 1.0 (* (* (/ 1.0 2.0) (pow (/ t_4 (* 2.0 d)) 2.0)) (/ h l)))))
        (t_7 (* -0.125 (/ (* t_5 h) l))))
   (if (<= t_6 -1e-166)
     (* (* t_0 t_1) (fma t_5 t_7 1.0))
     (if (<= t_6 0.0)
       (*
        (/ (fabs d) (sqrt (* h l)))
        (fma (* -0.125 (/ (* t_3 (* t_2 h)) (* d l))) (/ (* t_3 t_2) d) 1.0))
       (if (<= t_6 5e+213)
         (* (* (fma (* t_7 t_3) (/ t_2 d) 1.0) t_0) t_1)
         (* (fabs d) (/ (fma (* t_7 t_2) (/ t_3 d) 1.0) (sqrt (* l h)))))))))
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), D);
	double t_3 = fmax(fabs(M), D);
	double t_4 = t_2 * t_3;
	double t_5 = t_4 / d;
	double t_6 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow((t_4 / (2.0 * d)), 2.0)) * (h / l)));
	double t_7 = -0.125 * ((t_5 * h) / l);
	double tmp;
	if (t_6 <= -1e-166) {
		tmp = (t_0 * t_1) * fma(t_5, t_7, 1.0);
	} else if (t_6 <= 0.0) {
		tmp = (fabs(d) / sqrt((h * l))) * fma((-0.125 * ((t_3 * (t_2 * h)) / (d * l))), ((t_3 * t_2) / d), 1.0);
	} else if (t_6 <= 5e+213) {
		tmp = (fma((t_7 * t_3), (t_2 / d), 1.0) * t_0) * t_1;
	} else {
		tmp = fabs(d) * (fma((t_7 * t_2), (t_3 / d), 1.0) / sqrt((l * h)));
	}
	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), D)
	t_3 = fmax(abs(M), D)
	t_4 = Float64(t_2 * t_3)
	t_5 = Float64(t_4 / d)
	t_6 = 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(t_4 / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
	t_7 = Float64(-0.125 * Float64(Float64(t_5 * h) / l))
	tmp = 0.0
	if (t_6 <= -1e-166)
		tmp = Float64(Float64(t_0 * t_1) * fma(t_5, t_7, 1.0));
	elseif (t_6 <= 0.0)
		tmp = Float64(Float64(abs(d) / sqrt(Float64(h * l))) * fma(Float64(-0.125 * Float64(Float64(t_3 * Float64(t_2 * h)) / Float64(d * l))), Float64(Float64(t_3 * t_2) / d), 1.0));
	elseif (t_6 <= 5e+213)
		tmp = Float64(Float64(fma(Float64(t_7 * t_3), Float64(t_2 / d), 1.0) * t_0) * t_1);
	else
		tmp = Float64(abs(d) * Float64(fma(Float64(t_7 * t_2), Float64(t_3 / d), 1.0) / sqrt(Float64(l * h))));
	end
	return tmp
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Min[N[Abs[M], $MachinePrecision], D], $MachinePrecision]}, Block[{t$95$3 = N[Max[N[Abs[M], $MachinePrecision], D], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / d), $MachinePrecision]}, Block[{t$95$6 = 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[(t$95$4 / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(-0.125 * N[(N[(t$95$5 * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$6, -1e-166], N[(N[(t$95$0 * t$95$1), $MachinePrecision] * N[(t$95$5 * t$95$7 + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$6, 0.0], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 * N[(N[(t$95$3 * N[(t$95$2 * h), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$3 * t$95$2), $MachinePrecision] / d), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$6, 5e+213], N[(N[(N[(N[(t$95$7 * t$95$3), $MachinePrecision] * N[(t$95$2 / d), $MachinePrecision] + 1.0), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[Abs[d], $MachinePrecision] * N[(N[(N[(t$95$7 * t$95$2), $MachinePrecision] * N[(t$95$3 / d), $MachinePrecision] + 1.0), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell}}\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := \mathsf{min}\left(\left|M\right|, D\right)\\
t_3 := \mathsf{max}\left(\left|M\right|, D\right)\\
t_4 := t\_2 \cdot t\_3\\
t_5 := \frac{t\_4}{d}\\
t_6 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{t\_4}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
t_7 := -0.125 \cdot \frac{t\_5 \cdot h}{\ell}\\
\mathbf{if}\;t\_6 \leq -1 \cdot 10^{-166}:\\
\;\;\;\;\left(t\_0 \cdot t\_1\right) \cdot \mathsf{fma}\left(t\_5, t\_7, 1\right)\\

\mathbf{elif}\;t\_6 \leq 0:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(-0.125 \cdot \frac{t\_3 \cdot \left(t\_2 \cdot h\right)}{d \cdot \ell}, \frac{t\_3 \cdot t\_2}{d}, 1\right)\\

\mathbf{elif}\;t\_6 \leq 5 \cdot 10^{+213}:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_7 \cdot t\_3, \frac{t\_2}{d}, 1\right) \cdot t\_0\right) \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;\left|d\right| \cdot \frac{\mathsf{fma}\left(t\_7 \cdot t\_2, \frac{t\_3}{d}, 1\right)}{\sqrt{\ell \cdot 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)))) < -1.00000000000000004e-166

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000004e-166 < (*.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999998e213 < (*.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.1% accurate, 0.4× speedup?

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+213}:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_1 \cdot \mathsf{max}\left(M, D\right), \frac{\mathsf{min}\left(M, D\right)}{d}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\

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


\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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999998e213 < (*.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 85.1% accurate, 0.4× speedup?

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

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

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


\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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.9999999999999998e213 < (*.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left|d\right| \cdot \frac{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\frac{M \cdot D}{d} \cdot h}{\ell}\right) \cdot M, \frac{D}{d}, 1\right)}{\sqrt{\ell \cdot h}}} \]
    6. Recombined 3 regimes into one program.
    7. Add Preprocessing

    Alternative 4: 85.1% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 4.9999999999999998e213 < (*.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left|d\right| \cdot \frac{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\frac{M \cdot D}{d} \cdot h}{\ell}\right) \cdot M, \frac{D}{d}, 1\right)}{\sqrt{\ell \cdot h}}} \]
      6. Recombined 3 regimes into one program.
      7. Add Preprocessing

      Alternative 5: 84.5% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 4.9999999999999998e213 < (*.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left|d\right| \cdot \frac{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\frac{M \cdot D}{d} \cdot h}{\ell}\right) \cdot M, \frac{D}{d}, 1\right)}{\sqrt{\ell \cdot h}}} \]
        6. Recombined 3 regimes into one program.
        7. Add Preprocessing

        Alternative 6: 84.1% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 4.9999999999999998e213 < (*.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left|d\right| \cdot \frac{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\frac{M \cdot D}{d} \cdot h}{\ell}\right) \cdot M, \frac{D}{d}, 1\right)}{\sqrt{\ell \cdot h}}} \]
          6. Recombined 3 regimes into one program.
          7. Add Preprocessing

          Alternative 7: 84.1% accurate, 0.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 4.9999999999999998e213 < (*.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left|d\right| \cdot \frac{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\frac{M \cdot D}{d} \cdot h}{\ell}\right) \cdot M, \frac{D}{d}, 1\right)}{\sqrt{\ell \cdot h}}} \]
            6. Recombined 3 regimes into one program.
            7. Add Preprocessing

            Alternative 8: 83.6% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 4.9999999999999998e213 < (*.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.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left|d\right| \cdot \frac{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\frac{M \cdot D}{d} \cdot h}{\ell}\right) \cdot M, \frac{D}{d}, 1\right)}{\sqrt{\ell \cdot h}}} \]
              6. Recombined 3 regimes into one program.
              7. Add Preprocessing

              Alternative 9: 83.6% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 66.7%

                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                2. 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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  2. *-commutativeN/A

                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  3. lower-*.f6466.7%

                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  4. lift-pow.f64N/A

                    \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  5. lift-/.f64N/A

                    \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  6. metadata-evalN/A

                    \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  7. unpow1/2N/A

                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  8. lower-sqrt.f6466.7%

                    \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  9. lift-pow.f64N/A

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  10. lift-/.f64N/A

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  11. metadata-evalN/A

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  12. unpow1/2N/A

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  13. lower-sqrt.f6466.7%

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                3. Applied rewrites66.7%

                  \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                4. Taylor expanded in d around inf

                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                5. Step-by-step derivation
                  1. Applied rewrites38.8%

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]

                  if 4.9999999999999998e213 < (*.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.7%

                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    3. lower-*.f6466.7%

                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    4. lift-pow.f64N/A

                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    5. lift-/.f64N/A

                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    6. metadata-evalN/A

                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    7. unpow1/2N/A

                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    8. lower-sqrt.f6466.7%

                      \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    9. lift-pow.f64N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    10. lift-/.f64N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    11. metadata-evalN/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    12. unpow1/2N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    13. lower-sqrt.f6466.7%

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  3. Applied rewrites66.7%

                    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  4. Applied rewrites71.2%

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                  5. Step-by-step derivation
                    1. lower-unsound-*.f64N/A

                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    2. lower-unsound-sqrt.f64N/A

                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    3. lower-unsound-sqrt.f64N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    4. sqrt-prodN/A

                      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    5. lift-/.f64N/A

                      \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    6. lift-/.f64N/A

                      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    7. frac-timesN/A

                      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    8. *-commutativeN/A

                      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    9. lift-*.f64N/A

                      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    10. lift-*.f64N/A

                      \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    11. sqrt-divN/A

                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    12. lower-unsound-sqrt.f64N/A

                      \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    13. lower-sqrt.f64N/A

                      \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    14. lift-*.f64N/A

                      \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    15. rem-sqrt-square-revN/A

                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    16. lower-unsound-/.f64N/A

                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    17. lower-fabs.f64N/A

                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    18. lower-unsound-sqrt.f6478.2%

                      \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                  6. Applied rewrites78.2%

                    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                  7. Applied rewrites77.8%

                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\frac{M \cdot D}{d} \cdot h}{\ell}\right) \cdot M, \frac{D}{d}, 1\right) \cdot \left|d\right|}{\sqrt{\ell \cdot h}}} \]
                6. Recombined 3 regimes into one program.
                7. Add Preprocessing

                Alternative 10: 83.4% 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 := t\_0 \cdot t\_1\\ t_3 := \frac{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\frac{t\_2}{d} \cdot h}{\ell}\right) \cdot t\_0, \frac{t\_1}{d}, 1\right) \cdot \left|d\right|}{\sqrt{\ell \cdot h}}\\ 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\_2}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_4 \leq 0:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+213}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \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 (* t_0 t_1))
                        (t_3
                         (/
                          (*
                           (fma (* (* -0.125 (/ (* (/ t_2 d) h) l)) t_0) (/ t_1 d) 1.0)
                           (fabs d))
                          (sqrt (* l h))))
                        (t_4
                         (*
                          (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
                          (- 1.0 (* (* (/ 1.0 2.0) (pow (/ t_2 (* 2.0 d)) 2.0)) (/ h l))))))
                   (if (<= t_4 0.0)
                     t_3
                     (if (<= t_4 5e+213) (* (* (sqrt (/ d l)) (sqrt (/ d h))) 1.0) t_3))))
                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 = t_0 * t_1;
                	double t_3 = (fma(((-0.125 * (((t_2 / d) * h) / l)) * t_0), (t_1 / d), 1.0) * fabs(d)) / sqrt((l * h));
                	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_2 / (2.0 * d)), 2.0)) * (h / l)));
                	double tmp;
                	if (t_4 <= 0.0) {
                		tmp = t_3;
                	} else if (t_4 <= 5e+213) {
                		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
                	} else {
                		tmp = t_3;
                	}
                	return tmp;
                }
                
                function code(d, h, l, M, D)
                	t_0 = fmin(abs(M), D)
                	t_1 = fmax(abs(M), D)
                	t_2 = Float64(t_0 * t_1)
                	t_3 = Float64(Float64(fma(Float64(Float64(-0.125 * Float64(Float64(Float64(t_2 / d) * h) / l)) * t_0), Float64(t_1 / d), 1.0) * abs(d)) / sqrt(Float64(l * h)))
                	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(t_2 / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                	tmp = 0.0
                	if (t_4 <= 0.0)
                		tmp = t_3;
                	elseif (t_4 <= 5e+213)
                		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
                	else
                		tmp = t_3;
                	end
                	return 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[(t$95$0 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(-0.125 * N[(N[(N[(t$95$2 / d), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(t$95$1 / d), $MachinePrecision] + 1.0), $MachinePrecision] * N[Abs[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $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[(t$95$2 / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], t$95$3, If[LessEqual[t$95$4, 5e+213], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], t$95$3]]]]]]]
                
                \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 := t\_0 \cdot t\_1\\
                t_3 := \frac{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\frac{t\_2}{d} \cdot h}{\ell}\right) \cdot t\_0, \frac{t\_1}{d}, 1\right) \cdot \left|d\right|}{\sqrt{\ell \cdot h}}\\
                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\_2}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                \mathbf{if}\;t\_4 \leq 0:\\
                \;\;\;\;t\_3\\
                
                \mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+213}:\\
                \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_3\\
                
                
                \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 4.9999999999999998e213 < (*.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.7%

                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    3. lower-*.f6466.7%

                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    4. lift-pow.f64N/A

                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    5. lift-/.f64N/A

                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    6. metadata-evalN/A

                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    7. unpow1/2N/A

                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    8. lower-sqrt.f6466.7%

                      \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    9. lift-pow.f64N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    10. lift-/.f64N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    11. metadata-evalN/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    12. unpow1/2N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    13. lower-sqrt.f6466.7%

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  3. Applied rewrites66.7%

                    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  4. Applied rewrites71.2%

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                  5. Step-by-step derivation
                    1. lower-unsound-*.f64N/A

                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    2. lower-unsound-sqrt.f64N/A

                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    3. lower-unsound-sqrt.f64N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    4. sqrt-prodN/A

                      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    5. lift-/.f64N/A

                      \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    6. lift-/.f64N/A

                      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    7. frac-timesN/A

                      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    8. *-commutativeN/A

                      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    9. lift-*.f64N/A

                      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    10. lift-*.f64N/A

                      \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    11. sqrt-divN/A

                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    12. lower-unsound-sqrt.f64N/A

                      \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    13. lower-sqrt.f64N/A

                      \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    14. lift-*.f64N/A

                      \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    15. rem-sqrt-square-revN/A

                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    16. lower-unsound-/.f64N/A

                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    17. lower-fabs.f64N/A

                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    18. lower-unsound-sqrt.f6478.2%

                      \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                  6. Applied rewrites78.2%

                    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                  7. Applied rewrites77.8%

                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(-0.125 \cdot \frac{\frac{M \cdot D}{d} \cdot h}{\ell}\right) \cdot M, \frac{D}{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)))) < 4.9999999999999998e213

                  1. Initial program 66.7%

                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  2. 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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    3. lower-*.f6466.7%

                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    4. lift-pow.f64N/A

                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    5. lift-/.f64N/A

                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    6. metadata-evalN/A

                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    7. unpow1/2N/A

                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    8. lower-sqrt.f6466.7%

                      \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    9. lift-pow.f64N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    10. lift-/.f64N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    11. metadata-evalN/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    12. unpow1/2N/A

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    13. lower-sqrt.f6466.7%

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  3. Applied rewrites66.7%

                    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                  4. Taylor expanded in d around inf

                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                  5. Step-by-step derivation
                    1. Applied rewrites38.8%

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                  6. Recombined 2 regimes into one program.
                  7. Add Preprocessing

                  Alternative 11: 80.4% 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{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(-0.125 \cdot \frac{t\_1 \cdot \left(t\_0 \cdot h\right)}{d \cdot \ell}, \frac{t\_1 \cdot t\_0}{d}, 1\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\_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 5 \cdot 10^{+213}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \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
                           (*
                            (/ (fabs d) (sqrt (* h l)))
                            (fma
                             (* -0.125 (/ (* t_1 (* t_0 h)) (* d l)))
                             (/ (* t_1 t_0) d)
                             1.0)))
                          (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 5e+213) (* (* (sqrt (/ d l)) (sqrt (/ d h))) 1.0) 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 = (fabs(d) / sqrt((h * l))) * fma((-0.125 * ((t_1 * (t_0 * h)) / (d * l))), ((t_1 * t_0) / d), 1.0);
                  	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 <= 5e+213) {
                  		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
                  	} 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(abs(d) / sqrt(Float64(h * l))) * fma(Float64(-0.125 * Float64(Float64(t_1 * Float64(t_0 * h)) / Float64(d * l))), Float64(Float64(t_1 * t_0) / d), 1.0))
                  	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 <= 5e+213)
                  		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
                  	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[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 * N[(N[(t$95$1 * N[(t$95$0 * h), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * t$95$0), $MachinePrecision] / d), $MachinePrecision] + 1.0), $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, 5e+213], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $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{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(-0.125 \cdot \frac{t\_1 \cdot \left(t\_0 \cdot h\right)}{d \cdot \ell}, \frac{t\_1 \cdot t\_0}{d}, 1\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\_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 5 \cdot 10^{+213}:\\
                  \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                  
                  \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 4.9999999999999998e213 < (*.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.7%

                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    2. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      2. *-commutativeN/A

                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      3. lower-*.f6466.7%

                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      4. lift-pow.f64N/A

                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      5. lift-/.f64N/A

                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      6. metadata-evalN/A

                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      7. unpow1/2N/A

                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      8. lower-sqrt.f6466.7%

                        \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      9. lift-pow.f64N/A

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      10. lift-/.f64N/A

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      11. metadata-evalN/A

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      12. unpow1/2N/A

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      13. lower-sqrt.f6466.7%

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    3. Applied rewrites66.7%

                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    4. Applied rewrites71.2%

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                    5. Step-by-step derivation
                      1. lower-unsound-*.f64N/A

                        \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      2. lower-unsound-sqrt.f64N/A

                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      3. lower-unsound-sqrt.f64N/A

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      4. sqrt-prodN/A

                        \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      5. lift-/.f64N/A

                        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      6. lift-/.f64N/A

                        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      7. frac-timesN/A

                        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      8. *-commutativeN/A

                        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      9. lift-*.f64N/A

                        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      10. lift-*.f64N/A

                        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      11. sqrt-divN/A

                        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      12. lower-unsound-sqrt.f64N/A

                        \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      13. lower-sqrt.f64N/A

                        \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      14. lift-*.f64N/A

                        \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      15. rem-sqrt-square-revN/A

                        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      16. lower-unsound-/.f64N/A

                        \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      17. lower-fabs.f64N/A

                        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      18. lower-unsound-sqrt.f6478.2%

                        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    6. Applied rewrites78.2%

                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                    7. Taylor expanded in d around 0

                      \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\color{blue}{\frac{-1}{8} \cdot \frac{D \cdot \left(M \cdot h\right)}{d \cdot \ell}}, \frac{D \cdot M}{d}, 1\right) \]
                    8. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{-1}{8} \cdot \color{blue}{\frac{D \cdot \left(M \cdot h\right)}{d \cdot \ell}}, \frac{D \cdot M}{d}, 1\right) \]
                      2. lower-/.f64N/A

                        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{-1}{8} \cdot \frac{D \cdot \left(M \cdot h\right)}{\color{blue}{d \cdot \ell}}, \frac{D \cdot M}{d}, 1\right) \]
                      3. lower-*.f64N/A

                        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{-1}{8} \cdot \frac{D \cdot \left(M \cdot h\right)}{\color{blue}{d} \cdot \ell}, \frac{D \cdot M}{d}, 1\right) \]
                      4. lower-*.f64N/A

                        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{-1}{8} \cdot \frac{D \cdot \left(M \cdot h\right)}{d \cdot \ell}, \frac{D \cdot M}{d}, 1\right) \]
                      5. lower-*.f6473.6%

                        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(-0.125 \cdot \frac{D \cdot \left(M \cdot h\right)}{d \cdot \color{blue}{\ell}}, \frac{D \cdot M}{d}, 1\right) \]
                    9. Applied rewrites73.6%

                      \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\color{blue}{-0.125 \cdot \frac{D \cdot \left(M \cdot h\right)}{d \cdot \ell}}, \frac{D \cdot M}{d}, 1\right) \]

                    if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.9999999999999998e213

                    1. Initial program 66.7%

                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    2. 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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      2. *-commutativeN/A

                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      3. lower-*.f6466.7%

                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      4. lift-pow.f64N/A

                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      5. lift-/.f64N/A

                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      6. metadata-evalN/A

                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      7. unpow1/2N/A

                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      8. lower-sqrt.f6466.7%

                        \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      9. lift-pow.f64N/A

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      10. lift-/.f64N/A

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      11. metadata-evalN/A

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      12. unpow1/2N/A

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      13. lower-sqrt.f6466.7%

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    3. Applied rewrites66.7%

                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                    4. Taylor expanded in d around inf

                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                    5. Step-by-step derivation
                      1. Applied rewrites38.8%

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                    6. Recombined 2 regimes into one program.
                    7. Add Preprocessing

                    Alternative 12: 56.6% 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}} \cdot 1\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-166}:\\ \;\;\;\;\frac{\sqrt{d \cdot h} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+213}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \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))) 1.0)))
                       (if (<= t_0 -1e-166)
                         (/ (* (sqrt (* d h)) (* -1.0 (* d (sqrt (/ 1.0 (* d l)))))) h)
                         (if (<= t_0 0.0)
                           t_1
                           (if (<= t_0 5e+213) (* (* (sqrt (/ d l)) (sqrt (/ d h))) 1.0) 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))) * 1.0;
                    	double tmp;
                    	if (t_0 <= -1e-166) {
                    		tmp = (sqrt((d * h)) * (-1.0 * (d * sqrt((1.0 / (d * l)))))) / h;
                    	} else if (t_0 <= 0.0) {
                    		tmp = t_1;
                    	} else if (t_0 <= 5e+213) {
                    		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.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) :: 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))) * 1.0d0
                        if (t_0 <= (-1d-166)) then
                            tmp = (sqrt((d * h)) * ((-1.0d0) * (d * sqrt((1.0d0 / (d * l)))))) / h
                        else if (t_0 <= 0.0d0) then
                            tmp = t_1
                        else if (t_0 <= 5d+213) then
                            tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0d0
                        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))) * 1.0;
                    	double tmp;
                    	if (t_0 <= -1e-166) {
                    		tmp = (Math.sqrt((d * h)) * (-1.0 * (d * Math.sqrt((1.0 / (d * l)))))) / h;
                    	} else if (t_0 <= 0.0) {
                    		tmp = t_1;
                    	} else if (t_0 <= 5e+213) {
                    		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * 1.0;
                    	} 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))) * 1.0
                    	tmp = 0
                    	if t_0 <= -1e-166:
                    		tmp = (math.sqrt((d * h)) * (-1.0 * (d * math.sqrt((1.0 / (d * l)))))) / h
                    	elif t_0 <= 0.0:
                    		tmp = t_1
                    	elif t_0 <= 5e+213:
                    		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * 1.0
                    	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(abs(d) / sqrt(Float64(h * l))) * 1.0)
                    	tmp = 0.0
                    	if (t_0 <= -1e-166)
                    		tmp = Float64(Float64(sqrt(Float64(d * h)) * Float64(-1.0 * Float64(d * sqrt(Float64(1.0 / Float64(d * l)))))) / h);
                    	elseif (t_0 <= 0.0)
                    		tmp = t_1;
                    	elseif (t_0 <= 5e+213)
                    		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
                    	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))) * 1.0;
                    	tmp = 0.0;
                    	if (t_0 <= -1e-166)
                    		tmp = (sqrt((d * h)) * (-1.0 * (d * sqrt((1.0 / (d * l)))))) / h;
                    	elseif (t_0 <= 0.0)
                    		tmp = t_1;
                    	elseif (t_0 <= 5e+213)
                    		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
                    	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[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-166], N[(N[(N[Sqrt[N[(d * h), $MachinePrecision]], $MachinePrecision] * N[(-1.0 * N[(d * N[Sqrt[N[(1.0 / N[(d * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[t$95$0, 0.0], t$95$1, If[LessEqual[t$95$0, 5e+213], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $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}} \cdot 1\\
                    \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-166}:\\
                    \;\;\;\;\frac{\sqrt{d \cdot h} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h}\\
                    
                    \mathbf{elif}\;t\_0 \leq 0:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+213}:\\
                    \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                    
                    \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.00000000000000004e-166

                      1. Initial program 66.7%

                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      2. Taylor expanded in 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.3%

                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                      4. Applied rewrites23.3%

                        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
                      5. Taylor expanded in d around -inf

                        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]
                      6. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]
                        2. lower-*.f64N/A

                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]
                        3. lower-sqrt.f64N/A

                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]
                        4. lower-/.f64N/A

                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]
                        5. lower-*.f6414.7%

                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]
                      7. Applied rewrites14.7%

                        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]

                      if -1.00000000000000004e-166 < (*.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 4.9999999999999998e213 < (*.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.7%

                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      2. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        2. *-commutativeN/A

                          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        3. lower-*.f6466.7%

                          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        4. lift-pow.f64N/A

                          \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        5. lift-/.f64N/A

                          \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        6. metadata-evalN/A

                          \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        7. unpow1/2N/A

                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        8. lower-sqrt.f6466.7%

                          \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        9. lift-pow.f64N/A

                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        10. lift-/.f64N/A

                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        11. metadata-evalN/A

                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        12. unpow1/2N/A

                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        13. lower-sqrt.f6466.7%

                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      3. Applied rewrites66.7%

                        \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                      4. Applied rewrites71.2%

                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                      5. Step-by-step derivation
                        1. lower-unsound-*.f64N/A

                          \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        2. lower-unsound-sqrt.f64N/A

                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        3. lower-unsound-sqrt.f64N/A

                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        4. sqrt-prodN/A

                          \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        5. lift-/.f64N/A

                          \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        6. lift-/.f64N/A

                          \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        7. frac-timesN/A

                          \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        8. *-commutativeN/A

                          \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        9. lift-*.f64N/A

                          \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        10. lift-*.f64N/A

                          \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        11. sqrt-divN/A

                          \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        12. lower-unsound-sqrt.f64N/A

                          \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        13. lower-sqrt.f64N/A

                          \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        14. lift-*.f64N/A

                          \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        15. rem-sqrt-square-revN/A

                          \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        16. lower-unsound-/.f64N/A

                          \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        17. lower-fabs.f64N/A

                          \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                        18. lower-unsound-sqrt.f6478.2%

                          \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      6. Applied rewrites78.2%

                        \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                      7. Taylor expanded in d around inf

                        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]
                      8. Step-by-step derivation
                        1. Applied rewrites42.5%

                          \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]

                        if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.9999999999999998e213

                        1. Initial program 66.7%

                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        2. 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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          2. *-commutativeN/A

                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          3. lower-*.f6466.7%

                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          4. lift-pow.f64N/A

                            \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          5. lift-/.f64N/A

                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          6. metadata-evalN/A

                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          7. unpow1/2N/A

                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          8. lower-sqrt.f6466.7%

                            \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          9. lift-pow.f64N/A

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          10. lift-/.f64N/A

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          11. metadata-evalN/A

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          12. unpow1/2N/A

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          13. lower-sqrt.f6466.7%

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        3. Applied rewrites66.7%

                          \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        4. Taylor expanded in d around inf

                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                        5. Step-by-step derivation
                          1. Applied rewrites38.8%

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                        6. Recombined 3 regimes into one program.
                        7. Add Preprocessing

                        Alternative 13: 55.6% accurate, 0.3× speedup?

                        \[\begin{array}{l} t_0 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 1\\ 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 -1 \cdot 10^{-166}:\\ \;\;\;\;\frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+213}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                        (FPCore (d h l M D)
                         :precision binary64
                         (let* ((t_0 (* (/ (fabs d) (sqrt (* h l))) 1.0))
                                (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 -1e-166)
                             (/ (* -1.0 (* d (sqrt (/ h l)))) h)
                             (if (<= t_1 0.0)
                               t_0
                               (if (<= t_1 5e+213) (* (* (sqrt (/ d l)) (sqrt (/ d h))) 1.0) t_0)))))
                        double code(double d, double h, double l, double M, double D) {
                        	double t_0 = (fabs(d) / sqrt((h * l))) * 1.0;
                        	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 <= -1e-166) {
                        		tmp = (-1.0 * (d * sqrt((h / l)))) / h;
                        	} else if (t_1 <= 0.0) {
                        		tmp = t_0;
                        	} else if (t_1 <= 5e+213) {
                        		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
                        	} 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))) * 1.0d0
                            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 <= (-1d-166)) then
                                tmp = ((-1.0d0) * (d * sqrt((h / l)))) / h
                            else if (t_1 <= 0.0d0) then
                                tmp = t_0
                            else if (t_1 <= 5d+213) then
                                tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0d0
                            else
                                tmp = t_0
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double d, double h, double l, double M, double D) {
                        	double t_0 = (Math.abs(d) / Math.sqrt((h * l))) * 1.0;
                        	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 <= -1e-166) {
                        		tmp = (-1.0 * (d * Math.sqrt((h / l)))) / h;
                        	} else if (t_1 <= 0.0) {
                        		tmp = t_0;
                        	} else if (t_1 <= 5e+213) {
                        		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * 1.0;
                        	} else {
                        		tmp = t_0;
                        	}
                        	return tmp;
                        }
                        
                        def code(d, h, l, M, D):
                        	t_0 = (math.fabs(d) / math.sqrt((h * l))) * 1.0
                        	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 <= -1e-166:
                        		tmp = (-1.0 * (d * math.sqrt((h / l)))) / h
                        	elif t_1 <= 0.0:
                        		tmp = t_0
                        	elif t_1 <= 5e+213:
                        		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * 1.0
                        	else:
                        		tmp = t_0
                        	return tmp
                        
                        function code(d, h, l, M, D)
                        	t_0 = Float64(Float64(abs(d) / sqrt(Float64(h * l))) * 1.0)
                        	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 <= -1e-166)
                        		tmp = Float64(Float64(-1.0 * Float64(d * sqrt(Float64(h / l)))) / h);
                        	elseif (t_1 <= 0.0)
                        		tmp = t_0;
                        	elseif (t_1 <= 5e+213)
                        		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
                        	else
                        		tmp = t_0;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(d, h, l, M, D)
                        	t_0 = (abs(d) / sqrt((h * l))) * 1.0;
                        	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 <= -1e-166)
                        		tmp = (-1.0 * (d * sqrt((h / l)))) / h;
                        	elseif (t_1 <= 0.0)
                        		tmp = t_0;
                        	elseif (t_1 <= 5e+213)
                        		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
                        	else
                        		tmp = t_0;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $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, -1e-166], N[(N[(-1.0 * N[(d * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[t$95$1, 0.0], t$95$0, If[LessEqual[t$95$1, 5e+213], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], t$95$0]]]]]
                        
                        \begin{array}{l}
                        t_0 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 1\\
                        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 -1 \cdot 10^{-166}:\\
                        \;\;\;\;\frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h}\\
                        
                        \mathbf{elif}\;t\_1 \leq 0:\\
                        \;\;\;\;t\_0\\
                        
                        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+213}:\\
                        \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                        
                        \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.00000000000000004e-166

                          1. Initial program 66.7%

                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          2. Taylor expanded in 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.3%

                              \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                          4. Applied rewrites23.3%

                            \[\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}}}{h} \]
                            2. lift-sqrt.f64N/A

                              \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                            3. lift-sqrt.f64N/A

                              \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                            4. sqrt-unprodN/A

                              \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                            5. lower-sqrt.f64N/A

                              \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                            6. lower-*.f6421.1%

                              \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                            7. lift-*.f64N/A

                              \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                            8. *-commutativeN/A

                              \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                            9. lower-*.f6421.1%

                              \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                          6. Applied rewrites21.1%

                            \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                          7. Taylor expanded in d around -inf

                            \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
                          8. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
                            2. lower-*.f64N/A

                              \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
                            3. lower-sqrt.f64N/A

                              \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
                            4. lower-/.f6413.6%

                              \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
                          9. Applied rewrites13.6%

                            \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]

                          if -1.00000000000000004e-166 < (*.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 4.9999999999999998e213 < (*.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.7%

                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          2. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto \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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            2. *-commutativeN/A

                              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            3. lower-*.f6466.7%

                              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            4. lift-pow.f64N/A

                              \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            5. lift-/.f64N/A

                              \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            6. metadata-evalN/A

                              \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            7. unpow1/2N/A

                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            8. lower-sqrt.f6466.7%

                              \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            9. lift-pow.f64N/A

                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            10. lift-/.f64N/A

                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            11. metadata-evalN/A

                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            12. unpow1/2N/A

                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            13. lower-sqrt.f6466.7%

                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          3. Applied rewrites66.7%

                            \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          4. Applied rewrites71.2%

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                          5. Step-by-step derivation
                            1. lower-unsound-*.f64N/A

                              \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            2. lower-unsound-sqrt.f64N/A

                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            3. lower-unsound-sqrt.f64N/A

                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            4. sqrt-prodN/A

                              \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            5. lift-/.f64N/A

                              \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            6. lift-/.f64N/A

                              \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            7. frac-timesN/A

                              \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            8. *-commutativeN/A

                              \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            9. lift-*.f64N/A

                              \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            10. lift-*.f64N/A

                              \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            11. sqrt-divN/A

                              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            12. lower-unsound-sqrt.f64N/A

                              \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            13. lower-sqrt.f64N/A

                              \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            14. lift-*.f64N/A

                              \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            15. rem-sqrt-square-revN/A

                              \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            16. lower-unsound-/.f64N/A

                              \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            17. lower-fabs.f64N/A

                              \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                            18. lower-unsound-sqrt.f6478.2%

                              \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                          6. Applied rewrites78.2%

                            \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                          7. Taylor expanded in d around inf

                            \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]
                          8. Step-by-step derivation
                            1. Applied rewrites42.5%

                              \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]

                            if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.9999999999999998e213

                            1. Initial program 66.7%

                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            2. 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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              2. *-commutativeN/A

                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              3. lower-*.f6466.7%

                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              4. lift-pow.f64N/A

                                \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              5. lift-/.f64N/A

                                \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              6. metadata-evalN/A

                                \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              7. unpow1/2N/A

                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              8. lower-sqrt.f6466.7%

                                \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              9. lift-pow.f64N/A

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              10. lift-/.f64N/A

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              11. metadata-evalN/A

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              12. unpow1/2N/A

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              13. lower-sqrt.f6466.7%

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            3. Applied rewrites66.7%

                              \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            4. Taylor expanded in d around inf

                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                            5. Step-by-step derivation
                              1. Applied rewrites38.8%

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                            6. Recombined 3 regimes into one program.
                            7. Add Preprocessing

                            Alternative 14: 51.3% accurate, 0.3× speedup?

                            \[\begin{array}{l} t_0 := d \cdot \sqrt{\frac{h}{\ell}}\\ t_1 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 1\\ 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 -1 \cdot 10^{-166}:\\ \;\;\;\;\frac{-1 \cdot t\_0}{h}\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+213}:\\ \;\;\;\;\frac{t\_0}{h}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                            (FPCore (d h l M D)
                             :precision binary64
                             (let* ((t_0 (* d (sqrt (/ h l))))
                                    (t_1 (* (/ (fabs d) (sqrt (* h l))) 1.0))
                                    (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 -1e-166)
                                 (/ (* -1.0 t_0) h)
                                 (if (<= t_2 0.0) t_1 (if (<= t_2 5e+213) (/ t_0 h) t_1)))))
                            double code(double d, double h, double l, double M, double D) {
                            	double t_0 = d * sqrt((h / l));
                            	double t_1 = (fabs(d) / sqrt((h * l))) * 1.0;
                            	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 <= -1e-166) {
                            		tmp = (-1.0 * t_0) / h;
                            	} else if (t_2 <= 0.0) {
                            		tmp = t_1;
                            	} else if (t_2 <= 5e+213) {
                            		tmp = t_0 / h;
                            	} 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 = d * sqrt((h / l))
                                t_1 = (abs(d) / sqrt((h * l))) * 1.0d0
                                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 <= (-1d-166)) then
                                    tmp = ((-1.0d0) * t_0) / h
                                else if (t_2 <= 0.0d0) then
                                    tmp = t_1
                                else if (t_2 <= 5d+213) then
                                    tmp = t_0 / h
                                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 = d * Math.sqrt((h / l));
                            	double t_1 = (Math.abs(d) / Math.sqrt((h * l))) * 1.0;
                            	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 <= -1e-166) {
                            		tmp = (-1.0 * t_0) / h;
                            	} else if (t_2 <= 0.0) {
                            		tmp = t_1;
                            	} else if (t_2 <= 5e+213) {
                            		tmp = t_0 / h;
                            	} else {
                            		tmp = t_1;
                            	}
                            	return tmp;
                            }
                            
                            def code(d, h, l, M, D):
                            	t_0 = d * math.sqrt((h / l))
                            	t_1 = (math.fabs(d) / math.sqrt((h * l))) * 1.0
                            	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 <= -1e-166:
                            		tmp = (-1.0 * t_0) / h
                            	elif t_2 <= 0.0:
                            		tmp = t_1
                            	elif t_2 <= 5e+213:
                            		tmp = t_0 / h
                            	else:
                            		tmp = t_1
                            	return tmp
                            
                            function code(d, h, l, M, D)
                            	t_0 = Float64(d * sqrt(Float64(h / l)))
                            	t_1 = Float64(Float64(abs(d) / sqrt(Float64(h * l))) * 1.0)
                            	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 <= -1e-166)
                            		tmp = Float64(Float64(-1.0 * t_0) / h);
                            	elseif (t_2 <= 0.0)
                            		tmp = t_1;
                            	elseif (t_2 <= 5e+213)
                            		tmp = Float64(t_0 / h);
                            	else
                            		tmp = t_1;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(d, h, l, M, D)
                            	t_0 = d * sqrt((h / l));
                            	t_1 = (abs(d) / sqrt((h * l))) * 1.0;
                            	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 <= -1e-166)
                            		tmp = (-1.0 * t_0) / h;
                            	elseif (t_2 <= 0.0)
                            		tmp = t_1;
                            	elseif (t_2 <= 5e+213)
                            		tmp = t_0 / h;
                            	else
                            		tmp = t_1;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $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, -1e-166], N[(N[(-1.0 * t$95$0), $MachinePrecision] / h), $MachinePrecision], If[LessEqual[t$95$2, 0.0], t$95$1, If[LessEqual[t$95$2, 5e+213], N[(t$95$0 / h), $MachinePrecision], t$95$1]]]]]]
                            
                            \begin{array}{l}
                            t_0 := d \cdot \sqrt{\frac{h}{\ell}}\\
                            t_1 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 1\\
                            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 -1 \cdot 10^{-166}:\\
                            \;\;\;\;\frac{-1 \cdot t\_0}{h}\\
                            
                            \mathbf{elif}\;t\_2 \leq 0:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+213}:\\
                            \;\;\;\;\frac{t\_0}{h}\\
                            
                            \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.00000000000000004e-166

                              1. Initial program 66.7%

                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              2. Taylor expanded in 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.3%

                                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                              4. Applied rewrites23.3%

                                \[\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}}}{h} \]
                                2. lift-sqrt.f64N/A

                                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                3. lift-sqrt.f64N/A

                                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                4. sqrt-unprodN/A

                                  \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                5. lower-sqrt.f64N/A

                                  \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                6. lower-*.f6421.1%

                                  \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                7. lift-*.f64N/A

                                  \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                8. *-commutativeN/A

                                  \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                9. lower-*.f6421.1%

                                  \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                              6. Applied rewrites21.1%

                                \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                              7. Taylor expanded in d around -inf

                                \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
                              8. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
                                2. lower-*.f64N/A

                                  \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
                                3. lower-sqrt.f64N/A

                                  \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
                                4. lower-/.f6413.6%

                                  \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
                              9. Applied rewrites13.6%

                                \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]

                              if -1.00000000000000004e-166 < (*.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 4.9999999999999998e213 < (*.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.7%

                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              2. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto \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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                2. *-commutativeN/A

                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                3. lower-*.f6466.7%

                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                4. lift-pow.f64N/A

                                  \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                5. lift-/.f64N/A

                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                6. metadata-evalN/A

                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                7. unpow1/2N/A

                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                8. lower-sqrt.f6466.7%

                                  \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                9. lift-pow.f64N/A

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                10. lift-/.f64N/A

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                11. metadata-evalN/A

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                12. unpow1/2N/A

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                13. lower-sqrt.f6466.7%

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              3. Applied rewrites66.7%

                                \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              4. Applied rewrites71.2%

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                              5. Step-by-step derivation
                                1. lower-unsound-*.f64N/A

                                  \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                2. lower-unsound-sqrt.f64N/A

                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                3. lower-unsound-sqrt.f64N/A

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                4. sqrt-prodN/A

                                  \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                5. lift-/.f64N/A

                                  \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                6. lift-/.f64N/A

                                  \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                7. frac-timesN/A

                                  \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                8. *-commutativeN/A

                                  \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                9. lift-*.f64N/A

                                  \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                10. lift-*.f64N/A

                                  \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                11. sqrt-divN/A

                                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                12. lower-unsound-sqrt.f64N/A

                                  \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                13. lower-sqrt.f64N/A

                                  \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                14. lift-*.f64N/A

                                  \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                15. rem-sqrt-square-revN/A

                                  \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                16. lower-unsound-/.f64N/A

                                  \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                17. lower-fabs.f64N/A

                                  \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                18. lower-unsound-sqrt.f6478.2%

                                  \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                              6. Applied rewrites78.2%

                                \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                              7. Taylor expanded in d around inf

                                \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]
                              8. Step-by-step derivation
                                1. Applied rewrites42.5%

                                  \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]

                                if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.9999999999999998e213

                                1. Initial program 66.7%

                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                2. Taylor expanded in 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.3%

                                    \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                4. Applied rewrites23.3%

                                  \[\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}}}{h} \]
                                  2. lift-sqrt.f64N/A

                                    \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                  3. lift-sqrt.f64N/A

                                    \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                  4. sqrt-unprodN/A

                                    \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                  5. lower-sqrt.f64N/A

                                    \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                  6. lower-*.f6421.1%

                                    \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                  7. lift-*.f64N/A

                                    \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                  8. *-commutativeN/A

                                    \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                  9. lower-*.f6421.1%

                                    \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                6. Applied rewrites21.1%

                                  \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                7. Taylor expanded in d around 0

                                  \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                8. Step-by-step derivation
                                  1. lower-*.f64N/A

                                    \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                  2. lower-sqrt.f64N/A

                                    \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                  3. lower-/.f6436.1%

                                    \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                9. Applied rewrites36.1%

                                  \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                              9. Recombined 3 regimes into one program.
                              10. Add Preprocessing

                              Alternative 15: 46.4% 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:\\ \;\;\;\;-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+213}:\\ \;\;\;\;\frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 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))))))
                                 (if (<= t_0 0.0)
                                   (* -1.0 (* d (sqrt (/ 1.0 (* h l)))))
                                   (if (<= t_0 5e+213)
                                     (/ (* d (sqrt (/ h l))) h)
                                     (* (/ (fabs d) (sqrt (* h l))) 1.0)))))
                              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 = -1.0 * (d * sqrt((1.0 / (h * l))));
                              	} else if (t_0 <= 5e+213) {
                              		tmp = (d * sqrt((h / l))) / h;
                              	} else {
                              		tmp = (fabs(d) / sqrt((h * l))) * 1.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 = (((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 = (-1.0d0) * (d * sqrt((1.0d0 / (h * l))))
                                  else if (t_0 <= 5d+213) then
                                      tmp = (d * sqrt((h / l))) / h
                                  else
                                      tmp = (abs(d) / sqrt((h * l))) * 1.0d0
                                  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 = -1.0 * (d * Math.sqrt((1.0 / (h * l))));
                              	} else if (t_0 <= 5e+213) {
                              		tmp = (d * Math.sqrt((h / l))) / h;
                              	} else {
                              		tmp = (Math.abs(d) / Math.sqrt((h * l))) * 1.0;
                              	}
                              	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 = -1.0 * (d * math.sqrt((1.0 / (h * l))))
                              	elif t_0 <= 5e+213:
                              		tmp = (d * math.sqrt((h / l))) / h
                              	else:
                              		tmp = (math.fabs(d) / math.sqrt((h * l))) * 1.0
                              	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(-1.0 * Float64(d * sqrt(Float64(1.0 / Float64(h * l)))));
                              	elseif (t_0 <= 5e+213)
                              		tmp = Float64(Float64(d * sqrt(Float64(h / l))) / h);
                              	else
                              		tmp = Float64(Float64(abs(d) / sqrt(Float64(h * l))) * 1.0);
                              	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 = -1.0 * (d * sqrt((1.0 / (h * l))));
                              	elseif (t_0 <= 5e+213)
                              		tmp = (d * sqrt((h / l))) / h;
                              	else
                              		tmp = (abs(d) / sqrt((h * l))) * 1.0;
                              	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[(-1.0 * N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+213], N[(N[(d * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $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:\\
                              \;\;\;\;-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
                              
                              \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+213}:\\
                              \;\;\;\;\frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 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)))) < -0.0

                                1. Initial program 66.7%

                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                2. Applied rewrites36.7%

                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{h \cdot \left(\left(D \cdot D\right) \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)}{\ell \cdot \left(d \cdot d\right)}, -0.5, 1\right) \cdot \sqrt{d \cdot \frac{d}{h \cdot \ell}}} \]
                                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)} \]

                                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)))) < 4.9999999999999998e213

                                1. Initial program 66.7%

                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                2. Taylor expanded in 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.3%

                                    \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                4. Applied rewrites23.3%

                                  \[\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}}}{h} \]
                                  2. lift-sqrt.f64N/A

                                    \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                  3. lift-sqrt.f64N/A

                                    \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                  4. sqrt-unprodN/A

                                    \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                  5. lower-sqrt.f64N/A

                                    \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                  6. lower-*.f6421.1%

                                    \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                  7. lift-*.f64N/A

                                    \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                  8. *-commutativeN/A

                                    \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                  9. lower-*.f6421.1%

                                    \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                6. Applied rewrites21.1%

                                  \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                7. Taylor expanded in d around 0

                                  \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                8. Step-by-step derivation
                                  1. lower-*.f64N/A

                                    \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                  2. lower-sqrt.f64N/A

                                    \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                  3. lower-/.f6436.1%

                                    \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                9. Applied rewrites36.1%

                                  \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]

                                if 4.9999999999999998e213 < (*.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.7%

                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                2. Step-by-step derivation
                                  1. lift-*.f64N/A

                                    \[\leadsto \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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  2. *-commutativeN/A

                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  3. lower-*.f6466.7%

                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  4. lift-pow.f64N/A

                                    \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  5. lift-/.f64N/A

                                    \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  6. metadata-evalN/A

                                    \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  7. unpow1/2N/A

                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  8. lower-sqrt.f6466.7%

                                    \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  9. lift-pow.f64N/A

                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  10. lift-/.f64N/A

                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  11. metadata-evalN/A

                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  12. unpow1/2N/A

                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  13. lower-sqrt.f6466.7%

                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                3. Applied rewrites66.7%

                                  \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                4. Applied rewrites71.2%

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                                5. Step-by-step derivation
                                  1. lower-unsound-*.f64N/A

                                    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  2. lower-unsound-sqrt.f64N/A

                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  3. lower-unsound-sqrt.f64N/A

                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  4. sqrt-prodN/A

                                    \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  5. lift-/.f64N/A

                                    \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  6. lift-/.f64N/A

                                    \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  7. frac-timesN/A

                                    \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  8. *-commutativeN/A

                                    \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  9. lift-*.f64N/A

                                    \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  10. lift-*.f64N/A

                                    \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  11. sqrt-divN/A

                                    \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  12. lower-unsound-sqrt.f64N/A

                                    \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  13. lower-sqrt.f64N/A

                                    \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  14. lift-*.f64N/A

                                    \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  15. rem-sqrt-square-revN/A

                                    \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  16. lower-unsound-/.f64N/A

                                    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  17. lower-fabs.f64N/A

                                    \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  18. lower-unsound-sqrt.f6478.2%

                                    \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                6. Applied rewrites78.2%

                                  \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                7. Taylor expanded in d around inf

                                  \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]
                                8. Step-by-step derivation
                                  1. Applied rewrites42.5%

                                    \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]
                                9. Recombined 3 regimes into one program.
                                10. Add Preprocessing

                                Alternative 16: 44.2% accurate, 4.2× speedup?

                                \[\begin{array}{l} \mathbf{if}\;d \leq 1.25 \cdot 10^{-94}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 1\\ \mathbf{elif}\;d \leq 4.7 \cdot 10^{+165}:\\ \;\;\;\;\frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}}\\ \end{array} \]
                                (FPCore (d h l M D)
                                 :precision binary64
                                 (if (<= d 1.25e-94)
                                   (* (/ (fabs d) (sqrt (* h l))) 1.0)
                                   (if (<= d 4.7e+165)
                                     (/ (* d (/ (sqrt h) (sqrt l))) h)
                                     (/ (fabs d) (* l (sqrt (/ h l)))))))
                                double code(double d, double h, double l, double M, double D) {
                                	double tmp;
                                	if (d <= 1.25e-94) {
                                		tmp = (fabs(d) / sqrt((h * l))) * 1.0;
                                	} else if (d <= 4.7e+165) {
                                		tmp = (d * (sqrt(h) / sqrt(l))) / h;
                                	} else {
                                		tmp = fabs(d) / (l * 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 <= 1.25d-94) then
                                        tmp = (abs(d) / sqrt((h * l))) * 1.0d0
                                    else if (d <= 4.7d+165) then
                                        tmp = (d * (sqrt(h) / sqrt(l))) / h
                                    else
                                        tmp = abs(d) / (l * 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 (d <= 1.25e-94) {
                                		tmp = (Math.abs(d) / Math.sqrt((h * l))) * 1.0;
                                	} else if (d <= 4.7e+165) {
                                		tmp = (d * (Math.sqrt(h) / Math.sqrt(l))) / h;
                                	} else {
                                		tmp = Math.abs(d) / (l * Math.sqrt((h / l)));
                                	}
                                	return tmp;
                                }
                                
                                def code(d, h, l, M, D):
                                	tmp = 0
                                	if d <= 1.25e-94:
                                		tmp = (math.fabs(d) / math.sqrt((h * l))) * 1.0
                                	elif d <= 4.7e+165:
                                		tmp = (d * (math.sqrt(h) / math.sqrt(l))) / h
                                	else:
                                		tmp = math.fabs(d) / (l * math.sqrt((h / l)))
                                	return tmp
                                
                                function code(d, h, l, M, D)
                                	tmp = 0.0
                                	if (d <= 1.25e-94)
                                		tmp = Float64(Float64(abs(d) / sqrt(Float64(h * l))) * 1.0);
                                	elseif (d <= 4.7e+165)
                                		tmp = Float64(Float64(d * Float64(sqrt(h) / sqrt(l))) / h);
                                	else
                                		tmp = Float64(abs(d) / Float64(l * sqrt(Float64(h / l))));
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(d, h, l, M, D)
                                	tmp = 0.0;
                                	if (d <= 1.25e-94)
                                		tmp = (abs(d) / sqrt((h * l))) * 1.0;
                                	elseif (d <= 4.7e+165)
                                		tmp = (d * (sqrt(h) / sqrt(l))) / h;
                                	else
                                		tmp = abs(d) / (l * sqrt((h / l)));
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[d_, h_, l_, M_, D_] := If[LessEqual[d, 1.25e-94], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[d, 4.7e+165], N[(N[(d * N[(N[Sqrt[h], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], N[(N[Abs[d], $MachinePrecision] / N[(l * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                \mathbf{if}\;d \leq 1.25 \cdot 10^{-94}:\\
                                \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 1\\
                                
                                \mathbf{elif}\;d \leq 4.7 \cdot 10^{+165}:\\
                                \;\;\;\;\frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}}\\
                                
                                
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if d < 1.2499999999999999e-94

                                  1. Initial program 66.7%

                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  2. 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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    2. *-commutativeN/A

                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    3. lower-*.f6466.7%

                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    4. lift-pow.f64N/A

                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    5. lift-/.f64N/A

                                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    6. metadata-evalN/A

                                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    7. unpow1/2N/A

                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    8. lower-sqrt.f6466.7%

                                      \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    9. lift-pow.f64N/A

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    10. lift-/.f64N/A

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    11. metadata-evalN/A

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    12. unpow1/2N/A

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    13. lower-sqrt.f6466.7%

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  3. Applied rewrites66.7%

                                    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  4. Applied rewrites71.2%

                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                                  5. Step-by-step derivation
                                    1. lower-unsound-*.f64N/A

                                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    2. lower-unsound-sqrt.f64N/A

                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    3. lower-unsound-sqrt.f64N/A

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    4. sqrt-prodN/A

                                      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    5. lift-/.f64N/A

                                      \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    6. lift-/.f64N/A

                                      \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    7. frac-timesN/A

                                      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    8. *-commutativeN/A

                                      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    9. lift-*.f64N/A

                                      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    10. lift-*.f64N/A

                                      \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    11. sqrt-divN/A

                                      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    12. lower-unsound-sqrt.f64N/A

                                      \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    13. lower-sqrt.f64N/A

                                      \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    14. lift-*.f64N/A

                                      \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    15. rem-sqrt-square-revN/A

                                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    16. lower-unsound-/.f64N/A

                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    17. lower-fabs.f64N/A

                                      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    18. lower-unsound-sqrt.f6478.2%

                                      \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  6. Applied rewrites78.2%

                                    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                  7. Taylor expanded in d around inf

                                    \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]
                                  8. Step-by-step derivation
                                    1. Applied rewrites42.5%

                                      \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]

                                    if 1.2499999999999999e-94 < d < 4.70000000000000016e165

                                    1. Initial program 66.7%

                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    2. Taylor expanded in 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.3%

                                        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                    4. Applied rewrites23.3%

                                      \[\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}}}{h} \]
                                      2. lift-sqrt.f64N/A

                                        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                      3. lift-sqrt.f64N/A

                                        \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                      4. sqrt-unprodN/A

                                        \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                      5. lower-sqrt.f64N/A

                                        \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                      6. lower-*.f6421.1%

                                        \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                      7. lift-*.f64N/A

                                        \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                      8. *-commutativeN/A

                                        \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                      9. lower-*.f6421.1%

                                        \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                    6. Applied rewrites21.1%

                                      \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                    7. Taylor expanded in d around 0

                                      \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                    8. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                      2. lower-sqrt.f64N/A

                                        \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                      3. lower-/.f6436.1%

                                        \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                    9. Applied rewrites36.1%

                                      \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                    10. Step-by-step derivation
                                      1. lift-sqrt.f64N/A

                                        \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                      2. lift-/.f64N/A

                                        \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                      3. sqrt-divN/A

                                        \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]
                                      4. lower-unsound-/.f64N/A

                                        \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]
                                      5. lower-unsound-sqrt.f64N/A

                                        \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]
                                      6. lower-unsound-sqrt.f6421.8%

                                        \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]
                                    11. Applied rewrites21.8%

                                      \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]

                                    if 4.70000000000000016e165 < d

                                    1. Initial program 66.7%

                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    2. 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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      2. *-commutativeN/A

                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      3. lower-*.f6466.7%

                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      4. lift-pow.f64N/A

                                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      5. lift-/.f64N/A

                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      6. metadata-evalN/A

                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      7. unpow1/2N/A

                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      8. lower-sqrt.f6466.7%

                                        \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      9. lift-pow.f64N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      10. lift-/.f64N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      11. metadata-evalN/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      12. unpow1/2N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      13. lower-sqrt.f6466.7%

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    3. Applied rewrites66.7%

                                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    4. Applied rewrites71.2%

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                                    5. Step-by-step derivation
                                      1. lower-unsound-*.f64N/A

                                        \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      2. lower-unsound-sqrt.f64N/A

                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      3. lower-unsound-sqrt.f64N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      4. sqrt-prodN/A

                                        \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      5. lift-/.f64N/A

                                        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      6. lift-/.f64N/A

                                        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      7. frac-timesN/A

                                        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      8. *-commutativeN/A

                                        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      9. lift-*.f64N/A

                                        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      10. lift-*.f64N/A

                                        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      11. sqrt-divN/A

                                        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      12. lower-unsound-sqrt.f64N/A

                                        \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      13. lower-sqrt.f64N/A

                                        \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      14. lift-*.f64N/A

                                        \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      15. rem-sqrt-square-revN/A

                                        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      16. lower-unsound-/.f64N/A

                                        \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      17. lower-fabs.f64N/A

                                        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      18. lower-unsound-sqrt.f6478.2%

                                        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    6. Applied rewrites78.2%

                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    7. Taylor expanded in l around inf

                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}}} \]
                                    8. Step-by-step derivation
                                      1. lower-/.f64N/A

                                        \[\leadsto \frac{\left|d\right|}{\color{blue}{\ell \cdot \sqrt{\frac{h}{\ell}}}} \]
                                      2. lower-fabs.f64N/A

                                        \[\leadsto \frac{\left|d\right|}{\color{blue}{\ell} \cdot \sqrt{\frac{h}{\ell}}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \frac{\left|d\right|}{\ell \cdot \color{blue}{\sqrt{\frac{h}{\ell}}}} \]
                                      4. lower-sqrt.f64N/A

                                        \[\leadsto \frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}} \]
                                      5. lower-/.f6422.3%

                                        \[\leadsto \frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}} \]
                                    9. Applied rewrites22.3%

                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}}} \]
                                  9. Recombined 3 regimes into one program.
                                  10. Add Preprocessing

                                  Alternative 17: 43.3% 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)\\ t_1 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 1\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+213}:\\ \;\;\;\;\frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \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))) 1.0)))
                                     (if (<= t_0 0.0) t_1 (if (<= t_0 5e+213) (/ (* d (sqrt (/ h l))) h) 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))) * 1.0;
                                  	double tmp;
                                  	if (t_0 <= 0.0) {
                                  		tmp = t_1;
                                  	} else if (t_0 <= 5e+213) {
                                  		tmp = (d * sqrt((h / l))) / h;
                                  	} 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))) * 1.0d0
                                      if (t_0 <= 0.0d0) then
                                          tmp = t_1
                                      else if (t_0 <= 5d+213) then
                                          tmp = (d * sqrt((h / l))) / h
                                      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))) * 1.0;
                                  	double tmp;
                                  	if (t_0 <= 0.0) {
                                  		tmp = t_1;
                                  	} else if (t_0 <= 5e+213) {
                                  		tmp = (d * Math.sqrt((h / l))) / h;
                                  	} 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))) * 1.0
                                  	tmp = 0
                                  	if t_0 <= 0.0:
                                  		tmp = t_1
                                  	elif t_0 <= 5e+213:
                                  		tmp = (d * math.sqrt((h / l))) / h
                                  	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(abs(d) / sqrt(Float64(h * l))) * 1.0)
                                  	tmp = 0.0
                                  	if (t_0 <= 0.0)
                                  		tmp = t_1;
                                  	elseif (t_0 <= 5e+213)
                                  		tmp = Float64(Float64(d * sqrt(Float64(h / l))) / h);
                                  	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))) * 1.0;
                                  	tmp = 0.0;
                                  	if (t_0 <= 0.0)
                                  		tmp = t_1;
                                  	elseif (t_0 <= 5e+213)
                                  		tmp = (d * sqrt((h / l))) / h;
                                  	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[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], t$95$1, If[LessEqual[t$95$0, 5e+213], N[(N[(d * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $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}} \cdot 1\\
                                  \mathbf{if}\;t\_0 \leq 0:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+213}:\\
                                  \;\;\;\;\frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}\\
                                  
                                  \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 4.9999999999999998e213 < (*.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.7%

                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    2. Step-by-step derivation
                                      1. lift-*.f64N/A

                                        \[\leadsto \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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      2. *-commutativeN/A

                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      3. lower-*.f6466.7%

                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      4. lift-pow.f64N/A

                                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      5. lift-/.f64N/A

                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      6. metadata-evalN/A

                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      7. unpow1/2N/A

                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      8. lower-sqrt.f6466.7%

                                        \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      9. lift-pow.f64N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      10. lift-/.f64N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      11. metadata-evalN/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      12. unpow1/2N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      13. lower-sqrt.f6466.7%

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    3. Applied rewrites66.7%

                                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    4. Applied rewrites71.2%

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                                    5. Step-by-step derivation
                                      1. lower-unsound-*.f64N/A

                                        \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      2. lower-unsound-sqrt.f64N/A

                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      3. lower-unsound-sqrt.f64N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      4. sqrt-prodN/A

                                        \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      5. lift-/.f64N/A

                                        \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      6. lift-/.f64N/A

                                        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      7. frac-timesN/A

                                        \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      8. *-commutativeN/A

                                        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      9. lift-*.f64N/A

                                        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      10. lift-*.f64N/A

                                        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      11. sqrt-divN/A

                                        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      12. lower-unsound-sqrt.f64N/A

                                        \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      13. lower-sqrt.f64N/A

                                        \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      14. lift-*.f64N/A

                                        \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      15. rem-sqrt-square-revN/A

                                        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      16. lower-unsound-/.f64N/A

                                        \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      17. lower-fabs.f64N/A

                                        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      18. lower-unsound-sqrt.f6478.2%

                                        \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    6. Applied rewrites78.2%

                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                    7. Taylor expanded in d around inf

                                      \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]
                                    8. Step-by-step derivation
                                      1. Applied rewrites42.5%

                                        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]

                                      if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 4.9999999999999998e213

                                      1. Initial program 66.7%

                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      2. Taylor expanded in 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.3%

                                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                      4. Applied rewrites23.3%

                                        \[\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}}}{h} \]
                                        2. lift-sqrt.f64N/A

                                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                        3. lift-sqrt.f64N/A

                                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                        4. sqrt-unprodN/A

                                          \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                        5. lower-sqrt.f64N/A

                                          \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                        6. lower-*.f6421.1%

                                          \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                        7. lift-*.f64N/A

                                          \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                        8. *-commutativeN/A

                                          \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                        9. lower-*.f6421.1%

                                          \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                      6. Applied rewrites21.1%

                                        \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                      7. Taylor expanded in d around 0

                                        \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                      8. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                        2. lower-sqrt.f64N/A

                                          \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                        3. lower-/.f6436.1%

                                          \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                      9. Applied rewrites36.1%

                                        \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                    9. Recombined 2 regimes into one program.
                                    10. Add Preprocessing

                                    Alternative 18: 41.2% accurate, 5.3× speedup?

                                    \[\begin{array}{l} \mathbf{if}\;h \leq 3.7 \cdot 10^{-246}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}}\\ \end{array} \]
                                    (FPCore (d h l M D)
                                     :precision binary64
                                     (if (<= h 3.7e-246)
                                       (* (/ (fabs d) (sqrt (* h l))) 1.0)
                                       (/ (fabs d) (* l (sqrt (/ h l))))))
                                    double code(double d, double h, double l, double M, double D) {
                                    	double tmp;
                                    	if (h <= 3.7e-246) {
                                    		tmp = (fabs(d) / sqrt((h * l))) * 1.0;
                                    	} else {
                                    		tmp = fabs(d) / (l * 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 (h <= 3.7d-246) then
                                            tmp = (abs(d) / sqrt((h * l))) * 1.0d0
                                        else
                                            tmp = abs(d) / (l * 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 (h <= 3.7e-246) {
                                    		tmp = (Math.abs(d) / Math.sqrt((h * l))) * 1.0;
                                    	} else {
                                    		tmp = Math.abs(d) / (l * Math.sqrt((h / l)));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(d, h, l, M, D):
                                    	tmp = 0
                                    	if h <= 3.7e-246:
                                    		tmp = (math.fabs(d) / math.sqrt((h * l))) * 1.0
                                    	else:
                                    		tmp = math.fabs(d) / (l * math.sqrt((h / l)))
                                    	return tmp
                                    
                                    function code(d, h, l, M, D)
                                    	tmp = 0.0
                                    	if (h <= 3.7e-246)
                                    		tmp = Float64(Float64(abs(d) / sqrt(Float64(h * l))) * 1.0);
                                    	else
                                    		tmp = Float64(abs(d) / Float64(l * sqrt(Float64(h / l))));
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(d, h, l, M, D)
                                    	tmp = 0.0;
                                    	if (h <= 3.7e-246)
                                    		tmp = (abs(d) / sqrt((h * l))) * 1.0;
                                    	else
                                    		tmp = abs(d) / (l * sqrt((h / l)));
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[d_, h_, l_, M_, D_] := If[LessEqual[h, 3.7e-246], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[Abs[d], $MachinePrecision] / N[(l * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    \mathbf{if}\;h \leq 3.7 \cdot 10^{-246}:\\
                                    \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot 1\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}}\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if h < 3.7e-246

                                      1. Initial program 66.7%

                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      2. 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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        2. *-commutativeN/A

                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        3. lower-*.f6466.7%

                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        4. lift-pow.f64N/A

                                          \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        5. lift-/.f64N/A

                                          \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        6. metadata-evalN/A

                                          \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        7. unpow1/2N/A

                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        8. lower-sqrt.f6466.7%

                                          \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        9. lift-pow.f64N/A

                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        10. lift-/.f64N/A

                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        11. metadata-evalN/A

                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        12. unpow1/2N/A

                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        13. lower-sqrt.f6466.7%

                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      3. Applied rewrites66.7%

                                        \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      4. Applied rewrites71.2%

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                                      5. Step-by-step derivation
                                        1. lower-unsound-*.f64N/A

                                          \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        2. lower-unsound-sqrt.f64N/A

                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        3. lower-unsound-sqrt.f64N/A

                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        4. sqrt-prodN/A

                                          \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        5. lift-/.f64N/A

                                          \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        6. lift-/.f64N/A

                                          \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        7. frac-timesN/A

                                          \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        8. *-commutativeN/A

                                          \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        9. lift-*.f64N/A

                                          \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        10. lift-*.f64N/A

                                          \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        11. sqrt-divN/A

                                          \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        12. lower-unsound-sqrt.f64N/A

                                          \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        13. lower-sqrt.f64N/A

                                          \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        14. lift-*.f64N/A

                                          \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        15. rem-sqrt-square-revN/A

                                          \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        16. lower-unsound-/.f64N/A

                                          \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        17. lower-fabs.f64N/A

                                          \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        18. lower-unsound-sqrt.f6478.2%

                                          \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      6. Applied rewrites78.2%

                                        \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                      7. Taylor expanded in d around inf

                                        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]
                                      8. Step-by-step derivation
                                        1. Applied rewrites42.5%

                                          \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot \color{blue}{1} \]

                                        if 3.7e-246 < h

                                        1. Initial program 66.7%

                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        2. 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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          2. *-commutativeN/A

                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          3. lower-*.f6466.7%

                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          4. lift-pow.f64N/A

                                            \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          5. lift-/.f64N/A

                                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          6. metadata-evalN/A

                                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          7. unpow1/2N/A

                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          8. lower-sqrt.f6466.7%

                                            \[\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{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          9. lift-pow.f64N/A

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          10. lift-/.f64N/A

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          11. metadata-evalN/A

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          12. unpow1/2N/A

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          13. lower-sqrt.f6466.7%

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        3. Applied rewrites66.7%

                                          \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        4. Applied rewrites71.2%

                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right)} \]
                                        5. Step-by-step derivation
                                          1. lower-unsound-*.f64N/A

                                            \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          2. lower-unsound-sqrt.f64N/A

                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          3. lower-unsound-sqrt.f64N/A

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          4. sqrt-prodN/A

                                            \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          5. lift-/.f64N/A

                                            \[\leadsto \sqrt{\color{blue}{\frac{d}{\ell}} \cdot \frac{d}{h}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          6. lift-/.f64N/A

                                            \[\leadsto \sqrt{\frac{d}{\ell} \cdot \color{blue}{\frac{d}{h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          7. frac-timesN/A

                                            \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{\ell \cdot h}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          8. *-commutativeN/A

                                            \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          9. lift-*.f64N/A

                                            \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          10. lift-*.f64N/A

                                            \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          11. sqrt-divN/A

                                            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          12. lower-unsound-sqrt.f64N/A

                                            \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          13. lower-sqrt.f64N/A

                                            \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          14. lift-*.f64N/A

                                            \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          15. rem-sqrt-square-revN/A

                                            \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          16. lower-unsound-/.f64N/A

                                            \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          17. lower-fabs.f64N/A

                                            \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \cdot \mathsf{fma}\left(\frac{\left(\frac{-1}{4} \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                          18. lower-unsound-sqrt.f6478.2%

                                            \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        6. Applied rewrites78.2%

                                          \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \cdot \mathsf{fma}\left(\frac{\left(-0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h}{\ell \cdot 2}, \frac{D \cdot M}{d}, 1\right) \]
                                        7. Taylor expanded in l around inf

                                          \[\leadsto \color{blue}{\frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}}} \]
                                        8. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto \frac{\left|d\right|}{\color{blue}{\ell \cdot \sqrt{\frac{h}{\ell}}}} \]
                                          2. lower-fabs.f64N/A

                                            \[\leadsto \frac{\left|d\right|}{\color{blue}{\ell} \cdot \sqrt{\frac{h}{\ell}}} \]
                                          3. lower-*.f64N/A

                                            \[\leadsto \frac{\left|d\right|}{\ell \cdot \color{blue}{\sqrt{\frac{h}{\ell}}}} \]
                                          4. lower-sqrt.f64N/A

                                            \[\leadsto \frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}} \]
                                          5. lower-/.f6422.3%

                                            \[\leadsto \frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}} \]
                                        9. Applied rewrites22.3%

                                          \[\leadsto \color{blue}{\frac{\left|d\right|}{\ell \cdot \sqrt{\frac{h}{\ell}}}} \]
                                      9. Recombined 2 regimes into one program.
                                      10. Add Preprocessing

                                      Alternative 19: 36.1% accurate, 7.4× speedup?

                                      \[\frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                      (FPCore (d h l M D) :precision binary64 (/ (* d (sqrt (/ h l))) h))
                                      double code(double d, double h, double l, double M, double D) {
                                      	return (d * sqrt((h / l))) / h;
                                      }
                                      
                                      module fmin_fmax_functions
                                          implicit none
                                          private
                                          public fmax
                                          public fmin
                                      
                                          interface fmax
                                              module procedure fmax88
                                              module procedure fmax44
                                              module procedure fmax84
                                              module procedure fmax48
                                          end interface
                                          interface fmin
                                              module procedure fmin88
                                              module procedure fmin44
                                              module procedure fmin84
                                              module procedure fmin48
                                          end interface
                                      contains
                                          real(8) function fmax88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmax44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmax84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmax48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmin44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmin48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                          end function
                                      end module
                                      
                                      real(8) function code(d, h, l, m, d_1)
                                      use fmin_fmax_functions
                                          real(8), intent (in) :: d
                                          real(8), intent (in) :: h
                                          real(8), intent (in) :: l
                                          real(8), intent (in) :: m
                                          real(8), intent (in) :: d_1
                                          code = (d * sqrt((h / l))) / h
                                      end function
                                      
                                      public static double code(double d, double h, double l, double M, double D) {
                                      	return (d * Math.sqrt((h / l))) / h;
                                      }
                                      
                                      def code(d, h, l, M, D):
                                      	return (d * math.sqrt((h / l))) / h
                                      
                                      function code(d, h, l, M, D)
                                      	return Float64(Float64(d * sqrt(Float64(h / l))) / h)
                                      end
                                      
                                      function tmp = code(d, h, l, M, D)
                                      	tmp = (d * sqrt((h / l))) / h;
                                      end
                                      
                                      code[d_, h_, l_, M_, D_] := N[(N[(d * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]
                                      
                                      \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}
                                      
                                      Derivation
                                      1. Initial program 66.7%

                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      2. Taylor expanded in 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.3%

                                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                      4. Applied rewrites23.3%

                                        \[\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}}}{h} \]
                                        2. lift-sqrt.f64N/A

                                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                        3. lift-sqrt.f64N/A

                                          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                                        4. sqrt-unprodN/A

                                          \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                        5. lower-sqrt.f64N/A

                                          \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                        6. lower-*.f6421.1%

                                          \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                        7. lift-*.f64N/A

                                          \[\leadsto \frac{\sqrt{\left(d \cdot h\right) \cdot \frac{d}{\ell}}}{h} \]
                                        8. *-commutativeN/A

                                          \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                        9. lower-*.f6421.1%

                                          \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                      6. Applied rewrites21.1%

                                        \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
                                      7. Taylor expanded in d around 0

                                        \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                      8. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                        2. lower-sqrt.f64N/A

                                          \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                        3. lower-/.f6436.1%

                                          \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                      9. Applied rewrites36.1%

                                        \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
                                      10. Add Preprocessing

                                      Reproduce

                                      ?
                                      herbie shell --seed 2025195 
                                      (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)))))