Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.4% → 76.7%
Time: 11.7s
Alternatives: 19
Speedup: 1.2×

Specification

?
\[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
(FPCore (d h l M D)
 :precision binary64
 (*
  (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
  (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
double code(double d, double h, double l, double M, double D) {
	return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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.4% 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: 76.7% accurate, 1.1× 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 := -0.25 \cdot t\_1\\ t_3 := \frac{t\_1}{d + d} \cdot t\_0\\ \mathbf{if}\;d \leq -4.6 \cdot 10^{-303}:\\ \;\;\;\;-\mathsf{fma}\left(\left(\frac{\left(t\_0 \cdot t\_2\right) \cdot h}{\ell \cdot d} \cdot \frac{-0.5}{d}\right) \cdot t\_0, t\_1, -1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;d \leq 4.8 \cdot 10^{-222}:\\ \;\;\;\;\frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h}\\ \mathbf{elif}\;d \leq 3 \cdot 10^{+156}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\frac{t\_0}{d} \cdot t\_2}{d} \cdot \frac{\left(\left(t\_0 \cdot t\_1\right) \cdot -0.5\right) \cdot h}{\ell}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}}\right) \cdot \left(1 - \left(t\_3 \cdot \left(t\_3 \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\\ \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 (* -0.25 t_1))
        (t_3 (* (/ t_1 (+ d d)) t_0)))
   (if (<= d -4.6e-303)
     (-
      (*
       (fma (* (* (/ (* (* t_0 t_2) h) (* l d)) (/ -0.5 d)) t_0) t_1 -1.0)
       (/ (- d) (sqrt (* h l)))))
     (if (<= d 4.8e-222)
       (/ (* (* d (sqrt (/ h d))) (* -1.0 (* d (sqrt (/ 1.0 (* d l)))))) h)
       (if (<= d 3e+156)
         (*
          (* (sqrt (/ d l)) (sqrt (/ d h)))
          (- 1.0 (* (/ (* (/ t_0 d) t_2) d) (/ (* (* (* t_0 t_1) -0.5) h) l))))
         (*
          (* (sqrt d) (sqrt (/ d (* h l))))
          (- 1.0 (* (* t_3 (* t_3 0.5)) (/ h l)))))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = fmin(fabs(M), fabs(D));
	double t_1 = fmax(fabs(M), fabs(D));
	double t_2 = -0.25 * t_1;
	double t_3 = (t_1 / (d + d)) * t_0;
	double tmp;
	if (d <= -4.6e-303) {
		tmp = -(fma((((((t_0 * t_2) * h) / (l * d)) * (-0.5 / d)) * t_0), t_1, -1.0) * (-d / sqrt((h * l))));
	} else if (d <= 4.8e-222) {
		tmp = ((d * sqrt((h / d))) * (-1.0 * (d * sqrt((1.0 / (d * l)))))) / h;
	} else if (d <= 3e+156) {
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((t_0 / d) * t_2) / d) * ((((t_0 * t_1) * -0.5) * h) / l)));
	} else {
		tmp = (sqrt(d) * sqrt((d / (h * l)))) * (1.0 - ((t_3 * (t_3 * 0.5)) * (h / l)));
	}
	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(-0.25 * t_1)
	t_3 = Float64(Float64(t_1 / Float64(d + d)) * t_0)
	tmp = 0.0
	if (d <= -4.6e-303)
		tmp = Float64(-Float64(fma(Float64(Float64(Float64(Float64(Float64(t_0 * t_2) * h) / Float64(l * d)) * Float64(-0.5 / d)) * t_0), t_1, -1.0) * Float64(Float64(-d) / sqrt(Float64(h * l)))));
	elseif (d <= 4.8e-222)
		tmp = Float64(Float64(Float64(d * sqrt(Float64(h / d))) * Float64(-1.0 * Float64(d * sqrt(Float64(1.0 / Float64(d * l)))))) / h);
	elseif (d <= 3e+156)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(Float64(t_0 / d) * t_2) / d) * Float64(Float64(Float64(Float64(t_0 * t_1) * -0.5) * h) / l))));
	else
		tmp = Float64(Float64(sqrt(d) * sqrt(Float64(d / Float64(h * l)))) * Float64(1.0 - Float64(Float64(t_3 * Float64(t_3 * 0.5)) * Float64(h / l))));
	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[(-0.25 * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$1 / N[(d + d), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[d, -4.6e-303], (-N[(N[(N[(N[(N[(N[(N[(t$95$0 * t$95$2), $MachinePrecision] * h), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(-0.5 / d), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$1 + -1.0), $MachinePrecision] * N[((-d) / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), If[LessEqual[d, 4.8e-222], N[(N[(N[(d * N[Sqrt[N[(h / d), $MachinePrecision]], $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[d, 3e+156], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(t$95$0 / d), $MachinePrecision] * t$95$2), $MachinePrecision] / d), $MachinePrecision] * N[(N[(N[(N[(t$95$0 * t$95$1), $MachinePrecision] * -0.5), $MachinePrecision] * h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[d], $MachinePrecision] * N[Sqrt[N[(d / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(t$95$3 * N[(t$95$3 * 0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\
t_1 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\
t_2 := -0.25 \cdot t\_1\\
t_3 := \frac{t\_1}{d + d} \cdot t\_0\\
\mathbf{if}\;d \leq -4.6 \cdot 10^{-303}:\\
\;\;\;\;-\mathsf{fma}\left(\left(\frac{\left(t\_0 \cdot t\_2\right) \cdot h}{\ell \cdot d} \cdot \frac{-0.5}{d}\right) \cdot t\_0, t\_1, -1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\

\mathbf{elif}\;d \leq 4.8 \cdot 10^{-222}:\\
\;\;\;\;\frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h}\\

\mathbf{elif}\;d \leq 3 \cdot 10^{+156}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\frac{t\_0}{d} \cdot t\_2}{d} \cdot \frac{\left(\left(t\_0 \cdot t\_1\right) \cdot -0.5\right) \cdot h}{\ell}\right)\\

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -4.5999999999999999e-303

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.5999999999999999e-303 < d < 4.7999999999999999e-222

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      3. lower-/.f6431.1%

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

      \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\ell}}}{h} \]
    8. Taylor expanded in d around -inf

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

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

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

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

        \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]
      5. lower-*.f6421.8%

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

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

    if 4.7999999999999999e-222 < d < 3e156

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e156 < d

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 75.0% accurate, 1.1× speedup?

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.0000000000000019e-309

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000019e-309 < l

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 74.8% accurate, 0.3× speedup?

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

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

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

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


\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)))) < -3.9999999999999999e-132

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999999e-132 < (*.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 1e281 < (*.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.4%

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

        \[\leadsto \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. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
    6. Applied rewrites13.9%

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

      \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\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)))) < 1e281

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 74.7% accurate, 1.2× 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)\\ \mathbf{if}\;\ell \leq 10^{-309}:\\ \;\;\;\;-\mathsf{fma}\left(\left(\frac{\left(t\_0 \cdot \left(-0.25 \cdot t\_1\right)\right) \cdot h}{\ell \cdot d} \cdot \frac{-0.5}{d}\right) \cdot t\_0, t\_1, -1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \frac{\sqrt{d}}{\sqrt{h}}\right) \cdot \left(1 - \frac{\left(\left(0.5 \cdot \left(t\_1 \cdot -0.5\right)\right) \cdot \frac{t\_0}{d}\right) \cdot \left(\left(t\_0 \cdot t\_1\right) \cdot -0.5\right)}{d} \cdot \frac{h}{\ell}\right)\\ \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))))
   (if (<= l 1e-309)
     (-
      (*
       (fma
        (* (* (/ (* (* t_0 (* -0.25 t_1)) h) (* l d)) (/ -0.5 d)) t_0)
        t_1
        -1.0)
       (/ (- d) (sqrt (* h l)))))
     (*
      (* (sqrt (/ d l)) (/ (sqrt d) (sqrt h)))
      (-
       1.0
       (*
        (/ (* (* (* 0.5 (* t_1 -0.5)) (/ t_0 d)) (* (* t_0 t_1) -0.5)) d)
        (/ h l)))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = fmin(fabs(M), fabs(D));
	double t_1 = fmax(fabs(M), fabs(D));
	double tmp;
	if (l <= 1e-309) {
		tmp = -(fma((((((t_0 * (-0.25 * t_1)) * h) / (l * d)) * (-0.5 / d)) * t_0), t_1, -1.0) * (-d / sqrt((h * l))));
	} else {
		tmp = (sqrt((d / l)) * (sqrt(d) / sqrt(h))) * (1.0 - (((((0.5 * (t_1 * -0.5)) * (t_0 / d)) * ((t_0 * t_1) * -0.5)) / d) * (h / l)));
	}
	return tmp;
}
function code(d, h, l, M, D)
	t_0 = fmin(abs(M), abs(D))
	t_1 = fmax(abs(M), abs(D))
	tmp = 0.0
	if (l <= 1e-309)
		tmp = Float64(-Float64(fma(Float64(Float64(Float64(Float64(Float64(t_0 * Float64(-0.25 * t_1)) * h) / Float64(l * d)) * Float64(-0.5 / d)) * t_0), t_1, -1.0) * Float64(Float64(-d) / sqrt(Float64(h * l)))));
	else
		tmp = Float64(Float64(sqrt(Float64(d / l)) * Float64(sqrt(d) / sqrt(h))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(0.5 * Float64(t_1 * -0.5)) * Float64(t_0 / d)) * Float64(Float64(t_0 * t_1) * -0.5)) / d) * Float64(h / l))));
	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]}, If[LessEqual[l, 1e-309], (-N[(N[(N[(N[(N[(N[(N[(t$95$0 * N[(-0.25 * t$95$1), $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(-0.5 / d), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$1 + -1.0), $MachinePrecision] * N[((-d) / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(0.5 * N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$0 * t$95$1), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\
t_1 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\
\mathbf{if}\;\ell \leq 10^{-309}:\\
\;\;\;\;-\mathsf{fma}\left(\left(\frac{\left(t\_0 \cdot \left(-0.25 \cdot t\_1\right)\right) \cdot h}{\ell \cdot d} \cdot \frac{-0.5}{d}\right) \cdot t\_0, t\_1, -1\right) \cdot \frac{-d}{\sqrt{h \cdot \ell}}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.0000000000000019e-309

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000019e-309 < l

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 74.5% accurate, 0.5× 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)\\ \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{t\_0 \cdot t\_1}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+281}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{h}{\ell} \cdot \left(\left(0.5 \cdot \left(t\_1 \cdot -0.5\right)\right) \cdot \frac{t\_0}{d}\right)\right) \cdot \left(\left(t\_0 \cdot \frac{-0.5}{d}\right) \cdot t\_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\ \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))))
   (if (<=
        (*
         (* (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))))
        1e+281)
     (*
      (* (sqrt (/ d l)) (sqrt (/ d h)))
      (-
       1.0
       (*
        (* (/ h l) (* (* 0.5 (* t_1 -0.5)) (/ t_0 d)))
        (* (* t_0 (/ -0.5 d)) t_1))))
     (fabs (* (* (/ (/ 1.0 d) (sqrt (* h l))) d) d)))))
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 tmp;
	if (((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)))) <= 1e+281) {
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((h / l) * ((0.5 * (t_1 * -0.5)) * (t_0 / d))) * ((t_0 * (-0.5 / d)) * t_1)));
	} else {
		tmp = fabs(((((1.0 / d) / sqrt((h * l))) * d) * d));
	}
	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 = fmin(abs(m), abs(d_1))
    t_1 = fmax(abs(m), abs(d_1))
    if (((((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((t_0 * t_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))) <= 1d+281) then
        tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - (((h / l) * ((0.5d0 * (t_1 * (-0.5d0))) * (t_0 / d))) * ((t_0 * ((-0.5d0) / d)) * t_1)))
    else
        tmp = abs(((((1.0d0 / d) / sqrt((h * l))) * d) * d))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = fmin(Math.abs(M), Math.abs(D));
	double t_1 = fmax(Math.abs(M), Math.abs(D));
	double tmp;
	if (((Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)))) <= 1e+281) {
		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - (((h / l) * ((0.5 * (t_1 * -0.5)) * (t_0 / d))) * ((t_0 * (-0.5 / d)) * t_1)));
	} else {
		tmp = Math.abs(((((1.0 / d) / Math.sqrt((h * l))) * d) * d));
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = fmin(math.fabs(M), math.fabs(D))
	t_1 = fmax(math.fabs(M), math.fabs(D))
	tmp = 0
	if ((math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)))) <= 1e+281:
		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - (((h / l) * ((0.5 * (t_1 * -0.5)) * (t_0 / d))) * ((t_0 * (-0.5 / d)) * t_1)))
	else:
		tmp = math.fabs(((((1.0 / d) / math.sqrt((h * l))) * d) * d))
	return tmp
function code(d, h, l, M, D)
	t_0 = fmin(abs(M), abs(D))
	t_1 = fmax(abs(M), abs(D))
	tmp = 0.0
	if (Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(t_0 * t_1) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) <= 1e+281)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(h / l) * Float64(Float64(0.5 * Float64(t_1 * -0.5)) * Float64(t_0 / d))) * Float64(Float64(t_0 * Float64(-0.5 / d)) * t_1))));
	else
		tmp = abs(Float64(Float64(Float64(Float64(1.0 / d) / sqrt(Float64(h * l))) * d) * d));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = min(abs(M), abs(D));
	t_1 = max(abs(M), abs(D));
	tmp = 0.0;
	if (((((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((t_0 * t_1) / (2.0 * d)) ^ 2.0)) * (h / l)))) <= 1e+281)
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (((h / l) * ((0.5 * (t_1 * -0.5)) * (t_0 / d))) * ((t_0 * (-0.5 / d)) * t_1)));
	else
		tmp = abs(((((1.0 / d) / sqrt((h * l))) * d) * d));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Min[N[Abs[M], $MachinePrecision], N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Max[N[Abs[M], $MachinePrecision], N[Abs[D], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(t$95$0 * t$95$1), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+281], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(h / l), $MachinePrecision] * N[(N[(0.5 * N[(t$95$1 * -0.5), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$0 * N[(-0.5 / d), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(N[(N[(1.0 / d), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
t_0 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\
t_1 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\
\mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{t\_0 \cdot t\_1}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+281}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{h}{\ell} \cdot \left(\left(0.5 \cdot \left(t\_1 \cdot -0.5\right)\right) \cdot \frac{t\_0}{d}\right)\right) \cdot \left(\left(t\_0 \cdot \frac{-0.5}{d}\right) \cdot t\_1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\


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

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e281 < (*.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.4%

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

        \[\leadsto \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. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
    6. Applied rewrites13.9%

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

      \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right| \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 74.2% accurate, 0.6× speedup?

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

\mathbf{else}:\\
\;\;\;\;\left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\


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

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e281 < (*.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.4%

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

        \[\leadsto \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. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
    6. Applied rewrites13.9%

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

      \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right| \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 74.2% accurate, 0.6× speedup?

\[\begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+281}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(h \cdot \frac{\mathsf{min}\left(M, D\right)}{d}\right) \cdot \left(-0.25 \cdot \mathsf{max}\left(M, D\right)\right)}{\ell} \cdot \left(\left(\mathsf{min}\left(M, D\right) \cdot \frac{-0.5}{d}\right) \cdot \mathsf{max}\left(M, D\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<=
      (*
       (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
       (-
        1.0
        (*
         (* (/ 1.0 2.0) (pow (/ (* (fmin M D) (fmax M D)) (* 2.0 d)) 2.0))
         (/ h l))))
      1e+281)
   (*
    (* (sqrt (/ d l)) (sqrt (/ d h)))
    (-
     1.0
     (*
      (/ (* (* h (/ (fmin M D) d)) (* -0.25 (fmax M D))) l)
      (* (* (fmin M D) (/ -0.5 d)) (fmax M D)))))
   (fabs (* (* (/ (/ 1.0 d) (sqrt (* h l))) d) d))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (((pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)))) <= 1e+281) {
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((h * (fmin(M, D) / d)) * (-0.25 * fmax(M, D))) / l) * ((fmin(M, D) * (-0.5 / d)) * fmax(M, D))));
	} else {
		tmp = fabs(((((1.0 / d) / sqrt((h * l))) * d) * d));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (((((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((fmin(m, d_1) * fmax(m, d_1)) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))) <= 1d+281) then
        tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - ((((h * (fmin(m, d_1) / d)) * ((-0.25d0) * fmax(m, d_1))) / l) * ((fmin(m, d_1) * ((-0.5d0) / d)) * fmax(m, d_1))))
    else
        tmp = abs(((((1.0d0 / d) / sqrt((h * l))) * d) * d))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (((Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)))) <= 1e+281) {
		tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - ((((h * (fmin(M, D) / d)) * (-0.25 * fmax(M, D))) / l) * ((fmin(M, D) * (-0.5 / d)) * fmax(M, D))));
	} else {
		tmp = Math.abs(((((1.0 / d) / Math.sqrt((h * l))) * d) * d));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if ((math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)))) <= 1e+281:
		tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - ((((h * (fmin(M, D) / d)) * (-0.25 * fmax(M, D))) / l) * ((fmin(M, D) * (-0.5 / d)) * fmax(M, D))))
	else:
		tmp = math.fabs(((((1.0 / d) / math.sqrt((h * l))) * d) * d))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(fmin(M, D) * fmax(M, D)) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) <= 1e+281)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(Float64(Float64(Float64(h * Float64(fmin(M, D) / d)) * Float64(-0.25 * fmax(M, D))) / l) * Float64(Float64(fmin(M, D) * Float64(-0.5 / d)) * fmax(M, D)))));
	else
		tmp = abs(Float64(Float64(Float64(Float64(1.0 / d) / sqrt(Float64(h * l))) * d) * d));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (((((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((min(M, D) * max(M, D)) / (2.0 * d)) ^ 2.0)) * (h / l)))) <= 1e+281)
		tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((h * (min(M, D) / d)) * (-0.25 * max(M, D))) / l) * ((min(M, D) * (-0.5 / d)) * max(M, D))));
	else
		tmp = abs(((((1.0 / d) / sqrt((h * l))) * d) * d));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(N[Min[M, D], $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+281], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(h * N[(N[Min[M, D], $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(-0.25 * N[Max[M, D], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Min[M, D], $MachinePrecision] * N[(-0.5 / d), $MachinePrecision]), $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(N[(N[(1.0 / d), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+281}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{\left(h \cdot \frac{\mathsf{min}\left(M, D\right)}{d}\right) \cdot \left(-0.25 \cdot \mathsf{max}\left(M, D\right)\right)}{\ell} \cdot \left(\left(\mathsf{min}\left(M, D\right) \cdot \frac{-0.5}{d}\right) \cdot \mathsf{max}\left(M, D\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\


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

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e281 < (*.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.4%

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

        \[\leadsto \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. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
    6. Applied rewrites13.9%

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

      \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right| \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 8: 73.2% accurate, 0.5× 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 := t\_0 \cdot t\_1\\ \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{t\_2}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+281}:\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{\left(t\_2 \cdot \left(\frac{t\_0}{d} \cdot \left(-0.25 \cdot t\_1\right)\right)\right) \cdot 0.5}{d}, \frac{h}{\ell}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\ \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 (* t_0 t_1)))
   (if (<=
        (*
         (* (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))))
        1e+281)
     (*
      (*
       (fma (/ (* (* t_2 (* (/ t_0 d) (* -0.25 t_1))) 0.5) d) (/ h l) 1.0)
       (sqrt (/ d l)))
      (sqrt (/ d h)))
     (fabs (* (* (/ (/ 1.0 d) (sqrt (* h l))) d) d)))))
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 = t_0 * t_1;
	double tmp;
	if (((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)))) <= 1e+281) {
		tmp = (fma((((t_2 * ((t_0 / d) * (-0.25 * t_1))) * 0.5) / d), (h / l), 1.0) * sqrt((d / l))) * sqrt((d / h));
	} else {
		tmp = fabs(((((1.0 / d) / sqrt((h * l))) * d) * d));
	}
	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(t_0 * t_1)
	tmp = 0.0
	if (Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(t_2 / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) <= 1e+281)
		tmp = Float64(Float64(fma(Float64(Float64(Float64(t_2 * Float64(Float64(t_0 / d) * Float64(-0.25 * t_1))) * 0.5) / d), Float64(h / l), 1.0) * sqrt(Float64(d / l))) * sqrt(Float64(d / h)));
	else
		tmp = abs(Float64(Float64(Float64(Float64(1.0 / d) / sqrt(Float64(h * l))) * d) * d));
	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[(t$95$0 * t$95$1), $MachinePrecision]}, If[LessEqual[N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(t$95$2 / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+281], N[(N[(N[(N[(N[(N[(t$95$2 * N[(N[(t$95$0 / d), $MachinePrecision] * N[(-0.25 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] / d), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(N[(N[(1.0 / d), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
t_0 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\
t_1 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\
t_2 := t\_0 \cdot t\_1\\
\mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{t\_2}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+281}:\\
\;\;\;\;\left(\mathsf{fma}\left(\frac{\left(t\_2 \cdot \left(\frac{t\_0}{d} \cdot \left(-0.25 \cdot t\_1\right)\right)\right) \cdot 0.5}{d}, \frac{h}{\ell}, 1\right) \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \sqrt{\frac{d}{h}}\\

\mathbf{else}:\\
\;\;\;\;\left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\


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

    1. Initial program 66.4%

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

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

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

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

      \[\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. Step-by-step derivation
      1. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e281 < (*.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.4%

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

        \[\leadsto \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. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
    6. Applied rewrites13.9%

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

      \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right| \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 71.6% accurate, 0.6× speedup?

\[\begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+281}:\\ \;\;\;\;\left(\mathsf{fma}\left(\frac{\mathsf{max}\left(M, D\right) \cdot \left(\left(\frac{\mathsf{max}\left(M, D\right)}{d} \cdot \mathsf{min}\left(M, D\right)\right) \cdot \mathsf{min}\left(M, D\right)\right)}{d} \cdot -0.125, \frac{h}{\ell}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<=
      (*
       (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
       (-
        1.0
        (*
         (* (/ 1.0 2.0) (pow (/ (* (fmin M D) (fmax M D)) (* 2.0 d)) 2.0))
         (/ h l))))
      1e+281)
   (*
    (*
     (fma
      (*
       (/ (* (fmax M D) (* (* (/ (fmax M D) d) (fmin M D)) (fmin M D))) d)
       -0.125)
      (/ h l)
      1.0)
     (sqrt (/ d h)))
    (sqrt (/ d l)))
   (fabs (* (* (/ (/ 1.0 d) (sqrt (* h l))) d) d))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (((pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)))) <= 1e+281) {
		tmp = (fma((((fmax(M, D) * (((fmax(M, D) / d) * fmin(M, D)) * fmin(M, D))) / d) * -0.125), (h / l), 1.0) * sqrt((d / h))) * sqrt((d / l));
	} else {
		tmp = fabs(((((1.0 / d) / sqrt((h * l))) * d) * d));
	}
	return tmp;
}
function code(d, h, l, M, D)
	tmp = 0.0
	if (Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(fmin(M, D) * fmax(M, D)) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) <= 1e+281)
		tmp = Float64(Float64(fma(Float64(Float64(Float64(fmax(M, D) * Float64(Float64(Float64(fmax(M, D) / d) * fmin(M, D)) * fmin(M, D))) / d) * -0.125), Float64(h / l), 1.0) * sqrt(Float64(d / h))) * sqrt(Float64(d / l)));
	else
		tmp = abs(Float64(Float64(Float64(Float64(1.0 / d) / sqrt(Float64(h * l))) * d) * d));
	end
	return tmp
end
code[d_, h_, l_, M_, D_] := If[LessEqual[N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(N[Min[M, D], $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+281], N[(N[(N[(N[(N[(N[(N[Max[M, D], $MachinePrecision] * N[(N[(N[(N[Max[M, D], $MachinePrecision] / d), $MachinePrecision] * N[Min[M, D], $MachinePrecision]), $MachinePrecision] * N[Min[M, D], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * -0.125), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(N[(N[(1.0 / d), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq 10^{+281}:\\
\;\;\;\;\left(\mathsf{fma}\left(\frac{\mathsf{max}\left(M, D\right) \cdot \left(\left(\frac{\mathsf{max}\left(M, D\right)}{d} \cdot \mathsf{min}\left(M, D\right)\right) \cdot \mathsf{min}\left(M, D\right)\right)}{d} \cdot -0.125, \frac{h}{\ell}, 1\right) \cdot \sqrt{\frac{d}{h}}\right) \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\


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

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e281 < (*.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.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \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. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      3. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \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. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. lift-/.f64N/A

        \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. metadata-evalN/A

        \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      7. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      8. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      9. mult-flipN/A

        \[\leadsto \sqrt{\color{blue}{\left(d \cdot \frac{1}{h}\right)} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      10. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \left(\frac{1}{h} \cdot \frac{d}{\ell}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      11. sqrt-prodN/A

        \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      12. lower-unsound-*.f64N/A

        \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      13. lower-unsound-sqrt.f64N/A

        \[\leadsto \left(\color{blue}{\sqrt{d}} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      14. lower-unsound-sqrt.f64N/A

        \[\leadsto \left(\sqrt{d} \cdot \color{blue}{\sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      15. lift-/.f64N/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      16. frac-2negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      17. frac-2negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      18. frac-timesN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)\right)}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      19. remove-double-negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1 \cdot \color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      20. *-lft-identityN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{\color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      21. remove-double-negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(h\right)\right)\right)\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      22. remove-double-negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{h} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      23. remove-double-negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \color{blue}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      24. lower-/.f64N/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{d}{h \cdot \ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    3. Applied rewrites32.2%

      \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    4. Taylor expanded in d around inf

      \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto {d}^{2} \cdot \color{blue}{\left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
      2. lower-pow.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\color{blue}{\sqrt{\frac{1}{d}}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      3. lower-*.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \color{blue}{\sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
      4. lower-sqrt.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\color{blue}{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
      5. lower-/.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{\color{blue}{1}}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      6. lower-sqrt.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      7. lower-/.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      8. lower-*.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      9. lower-*.f6413.9%

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
    6. Applied rewrites13.9%

      \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
    7. Applied rewrites39.0%

      \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right| \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 70.0% accurate, 0.3× speedup?

\[\begin{array}{l} t_0 := \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot 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{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-132}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\mathsf{max}\left(M, D\right) \cdot \left(\left(\frac{\mathsf{max}\left(M, D\right)}{d} \cdot \mathsf{min}\left(M, D\right)\right) \cdot \mathsf{min}\left(M, D\right)\right)}{d} \cdot -0.125, \frac{h}{\ell}, 1\right) \cdot \sqrt{\frac{d}{h \cdot \ell} \cdot d}\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 10^{+281}:\\ \;\;\;\;\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 (* (* (/ (/ 1.0 d) (sqrt (* h l))) d) d)))
        (t_1
         (*
          (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
          (-
           1.0
           (*
            (* (/ 1.0 2.0) (pow (/ (* (fmin M D) (fmax M D)) (* 2.0 d)) 2.0))
            (/ h l))))))
   (if (<= t_1 -4e-132)
     (*
      (fma
       (*
        (/ (* (fmax M D) (* (* (/ (fmax M D) d) (fmin M D)) (fmin M D))) d)
        -0.125)
       (/ h l)
       1.0)
      (sqrt (* (/ d (* h l)) d)))
     (if (<= t_1 0.0)
       t_0
       (if (<= t_1 1e+281) (* (* (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(((((1.0 / d) / sqrt((h * l))) * d) * 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(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)));
	double tmp;
	if (t_1 <= -4e-132) {
		tmp = fma((((fmax(M, D) * (((fmax(M, D) / d) * fmin(M, D)) * fmin(M, D))) / d) * -0.125), (h / l), 1.0) * sqrt(((d / (h * l)) * d));
	} else if (t_1 <= 0.0) {
		tmp = t_0;
	} else if (t_1 <= 1e+281) {
		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(d, h, l, M, D)
	t_0 = abs(Float64(Float64(Float64(Float64(1.0 / d) / sqrt(Float64(h * l))) * d) * 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(Float64(fmin(M, D) * fmax(M, D)) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
	tmp = 0.0
	if (t_1 <= -4e-132)
		tmp = Float64(fma(Float64(Float64(Float64(fmax(M, D) * Float64(Float64(Float64(fmax(M, D) / d) * fmin(M, D)) * fmin(M, D))) / d) * -0.125), Float64(h / l), 1.0) * sqrt(Float64(Float64(d / Float64(h * l)) * d)));
	elseif (t_1 <= 0.0)
		tmp = t_0;
	elseif (t_1 <= 1e+281)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
	else
		tmp = t_0;
	end
	return tmp
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Abs[N[(N[(N[(N[(1.0 / d), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision] * 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[(N[(N[Min[M, D], $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-132], N[(N[(N[(N[(N[(N[Max[M, D], $MachinePrecision] * N[(N[(N[(N[Max[M, D], $MachinePrecision] / d), $MachinePrecision] * N[Min[M, D], $MachinePrecision]), $MachinePrecision] * N[Min[M, D], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * -0.125), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(N[(d / N[(h * l), $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], t$95$0, If[LessEqual[t$95$1, 1e+281], 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 := \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot 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{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{-132}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\mathsf{max}\left(M, D\right) \cdot \left(\left(\frac{\mathsf{max}\left(M, D\right)}{d} \cdot \mathsf{min}\left(M, D\right)\right) \cdot \mathsf{min}\left(M, D\right)\right)}{d} \cdot -0.125, \frac{h}{\ell}, 1\right) \cdot \sqrt{\frac{d}{h \cdot \ell} \cdot d}\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_1 \leq 10^{+281}:\\
\;\;\;\;\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)))) < -3.9999999999999999e-132

    1. Initial program 66.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right)} \cdot \frac{h}{\ell}\right) \]
      2. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{2}\right)} \cdot \frac{h}{\ell}\right) \]
      3. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      4. unpow2N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)} \cdot \frac{h}{\ell}\right) \]
      6. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right) \]
      7. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right) \]
      8. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right) \]
      9. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right) \]
      10. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{2 \cdot d} \cdot \left(M \cdot \left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{1}{2}\right)\right)\right)} \cdot \frac{h}{\ell}\right) \]
      11. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{2 \cdot d} \cdot \left(M \cdot \left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{1}{2}\right)\right)\right) \cdot \frac{h}{\ell}\right) \]
      12. lift-*.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{2 \cdot d} \cdot \left(M \cdot \left(\frac{\color{blue}{M \cdot D}}{2 \cdot d} \cdot \frac{1}{2}\right)\right)\right) \cdot \frac{h}{\ell}\right) \]
      13. associate-/l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{2 \cdot d} \cdot \left(M \cdot \left(\color{blue}{\left(M \cdot \frac{D}{2 \cdot d}\right)} \cdot \frac{1}{2}\right)\right)\right) \cdot \frac{h}{\ell}\right) \]
      14. *-commutativeN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{2 \cdot d} \cdot \left(M \cdot \left(\color{blue}{\left(\frac{D}{2 \cdot d} \cdot M\right)} \cdot \frac{1}{2}\right)\right)\right) \cdot \frac{h}{\ell}\right) \]
      15. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{2 \cdot d} \cdot \left(M \cdot \color{blue}{\left(\frac{D}{2 \cdot d} \cdot \left(M \cdot \frac{1}{2}\right)\right)}\right)\right) \cdot \frac{h}{\ell}\right) \]
      16. lift-/.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{2 \cdot d} \cdot \left(M \cdot \left(\frac{D}{2 \cdot d} \cdot \left(M \cdot \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \cdot \frac{h}{\ell}\right) \]
      17. mult-flipN/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{2 \cdot d} \cdot \left(M \cdot \left(\frac{D}{2 \cdot d} \cdot \color{blue}{\frac{M}{2}}\right)\right)\right) \cdot \frac{h}{\ell}\right) \]
      18. associate-*l*N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{2 \cdot d} \cdot \color{blue}{\left(\left(M \cdot \frac{D}{2 \cdot d}\right) \cdot \frac{M}{2}\right)}\right) \cdot \frac{h}{\ell}\right) \]
    3. Applied rewrites58.8%

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{d + d} \cdot \left(\frac{D}{d} \cdot \left(\left(M \cdot M\right) \cdot 0.25\right)\right)\right)} \cdot \frac{h}{\ell}\right) \]
    4. Applied rewrites49.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{D \cdot \left(\left(\frac{D}{d} \cdot M\right) \cdot M\right)}{d} \cdot -0.125, \frac{h}{\ell}, 1\right) \cdot \sqrt{\frac{d}{h \cdot \ell} \cdot d}} \]

    if -3.9999999999999999e-132 < (*.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 1e281 < (*.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.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \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. lift-pow.f64N/A

        \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      3. lift-pow.f64N/A

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \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. pow-prod-downN/A

        \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      5. lift-/.f64N/A

        \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      6. metadata-evalN/A

        \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      7. unpow1/2N/A

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      8. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      9. mult-flipN/A

        \[\leadsto \sqrt{\color{blue}{\left(d \cdot \frac{1}{h}\right)} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      10. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{d \cdot \left(\frac{1}{h} \cdot \frac{d}{\ell}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      11. sqrt-prodN/A

        \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      12. lower-unsound-*.f64N/A

        \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      13. lower-unsound-sqrt.f64N/A

        \[\leadsto \left(\color{blue}{\sqrt{d}} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      14. lower-unsound-sqrt.f64N/A

        \[\leadsto \left(\sqrt{d} \cdot \color{blue}{\sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      15. lift-/.f64N/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      16. frac-2negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      17. frac-2negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      18. frac-timesN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)\right)}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      19. remove-double-negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1 \cdot \color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      20. *-lft-identityN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{\color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      21. remove-double-negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(h\right)\right)\right)\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      22. remove-double-negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{h} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      23. remove-double-negN/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \color{blue}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      24. lower-/.f64N/A

        \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{d}{h \cdot \ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    3. Applied rewrites32.2%

      \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    4. Taylor expanded in d around inf

      \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto {d}^{2} \cdot \color{blue}{\left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
      2. lower-pow.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\color{blue}{\sqrt{\frac{1}{d}}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      3. lower-*.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \color{blue}{\sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
      4. lower-sqrt.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\color{blue}{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
      5. lower-/.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{\color{blue}{1}}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      6. lower-sqrt.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      7. lower-/.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      8. lower-*.f64N/A

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      9. lower-*.f6413.9%

        \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
    6. Applied rewrites13.9%

      \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
    7. Applied rewrites39.0%

      \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\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)))) < 1e281

    1. Initial program 66.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. 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.4%

        \[\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.4%

        \[\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.4%

        \[\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.4%

      \[\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 rewrites39.1%

        \[\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 11: 65.2% accurate, 0.3× speedup?

    \[\begin{array}{l} t_0 := \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\ t_1 := \mathsf{min}\left(\left|M\right|, D\right)\\ t_2 := \mathsf{max}\left(\left|M\right|, D\right)\\ t_3 := t\_1 \cdot t\_2\\ 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\_3}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_4 \leq -2 \cdot 10^{-71}:\\ \;\;\;\;\mathsf{fma}\left(\left(\frac{t\_3 \cdot t\_2}{d \cdot d} \cdot -0.125\right) \cdot t\_1, \frac{h}{\ell}, 1\right) \cdot \sqrt{\frac{d}{h \cdot \ell} \cdot d}\\ \mathbf{elif}\;t\_4 \leq 0:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_4 \leq 10^{+281}:\\ \;\;\;\;\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 (* (* (/ (/ 1.0 d) (sqrt (* h l))) d) d)))
            (t_1 (fmin (fabs M) D))
            (t_2 (fmax (fabs M) D))
            (t_3 (* t_1 t_2))
            (t_4
             (*
              (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
              (- 1.0 (* (* (/ 1.0 2.0) (pow (/ t_3 (* 2.0 d)) 2.0)) (/ h l))))))
       (if (<= t_4 -2e-71)
         (*
          (fma (* (* (/ (* t_3 t_2) (* d d)) -0.125) t_1) (/ h l) 1.0)
          (sqrt (* (/ d (* h l)) d)))
         (if (<= t_4 0.0)
           t_0
           (if (<= t_4 1e+281) (* (* (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(((((1.0 / d) / sqrt((h * l))) * d) * d));
    	double t_1 = fmin(fabs(M), D);
    	double t_2 = fmax(fabs(M), D);
    	double t_3 = t_1 * t_2;
    	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_3 / (2.0 * d)), 2.0)) * (h / l)));
    	double tmp;
    	if (t_4 <= -2e-71) {
    		tmp = fma(((((t_3 * t_2) / (d * d)) * -0.125) * t_1), (h / l), 1.0) * sqrt(((d / (h * l)) * d));
    	} else if (t_4 <= 0.0) {
    		tmp = t_0;
    	} else if (t_4 <= 1e+281) {
    		tmp = (sqrt((d / l)) * sqrt((d / h))) * 1.0;
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    function code(d, h, l, M, D)
    	t_0 = abs(Float64(Float64(Float64(Float64(1.0 / d) / sqrt(Float64(h * l))) * d) * d))
    	t_1 = fmin(abs(M), D)
    	t_2 = fmax(abs(M), D)
    	t_3 = Float64(t_1 * t_2)
    	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_3 / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
    	tmp = 0.0
    	if (t_4 <= -2e-71)
    		tmp = Float64(fma(Float64(Float64(Float64(Float64(t_3 * t_2) / Float64(d * d)) * -0.125) * t_1), Float64(h / l), 1.0) * sqrt(Float64(Float64(d / Float64(h * l)) * d)));
    	elseif (t_4 <= 0.0)
    		tmp = t_0;
    	elseif (t_4 <= 1e+281)
    		tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * 1.0);
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Abs[N[(N[(N[(N[(1.0 / d), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Min[N[Abs[M], $MachinePrecision], D], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Abs[M], $MachinePrecision], D], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * t$95$2), $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$3 / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -2e-71], N[(N[(N[(N[(N[(N[(t$95$3 * t$95$2), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(h / l), $MachinePrecision] + 1.0), $MachinePrecision] * N[Sqrt[N[(N[(d / N[(h * l), $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 0.0], t$95$0, If[LessEqual[t$95$4, 1e+281], 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 := \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\
    t_1 := \mathsf{min}\left(\left|M\right|, D\right)\\
    t_2 := \mathsf{max}\left(\left|M\right|, D\right)\\
    t_3 := t\_1 \cdot t\_2\\
    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\_3}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
    \mathbf{if}\;t\_4 \leq -2 \cdot 10^{-71}:\\
    \;\;\;\;\mathsf{fma}\left(\left(\frac{t\_3 \cdot t\_2}{d \cdot d} \cdot -0.125\right) \cdot t\_1, \frac{h}{\ell}, 1\right) \cdot \sqrt{\frac{d}{h \cdot \ell} \cdot d}\\
    
    \mathbf{elif}\;t\_4 \leq 0:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;t\_4 \leq 10^{+281}:\\
    \;\;\;\;\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.9999999999999998e-71

      1. Initial program 66.4%

        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. 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.4%

          \[\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.4%

          \[\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.4%

          \[\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.4%

        \[\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. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}\right) \cdot \frac{h}{\ell}\right) \]
        2. unpow2N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{\left(\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}\right)}\right) \cdot \frac{h}{\ell}\right) \]
        3. lift-/.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\color{blue}{\frac{M \cdot D}{2 \cdot d}} \cdot \frac{M \cdot D}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        4. frac-2negN/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\color{blue}{\frac{\mathsf{neg}\left(M \cdot D\right)}{\mathsf{neg}\left(2 \cdot d\right)}} \cdot \frac{M \cdot D}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        5. distribute-frac-neg2N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right)} \cdot \frac{M \cdot D}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        6. lift-/.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\left(\mathsf{neg}\left(\frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \color{blue}{\frac{M \cdot D}{2 \cdot d}}\right)\right) \cdot \frac{h}{\ell}\right) \]
        7. frac-2negN/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\left(\mathsf{neg}\left(\frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \color{blue}{\frac{\mathsf{neg}\left(M \cdot D\right)}{\mathsf{neg}\left(2 \cdot d\right)}}\right)\right) \cdot \frac{h}{\ell}\right) \]
        8. distribute-frac-neg2N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\left(\mathsf{neg}\left(\frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right)}\right)\right) \cdot \frac{h}{\ell}\right) \]
        9. sqr-negN/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{\left(\frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)}\right) \cdot \frac{h}{\ell}\right) \]
        10. lower-*.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{\left(\frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)}\right) \cdot \frac{h}{\ell}\right) \]
        11. distribute-neg-fracN/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\frac{M \cdot D}{2 \cdot d}\right)\right)} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        12. distribute-neg-frac2N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\color{blue}{\frac{M \cdot D}{\mathsf{neg}\left(2 \cdot d\right)}} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        13. lower-/.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\color{blue}{\frac{M \cdot D}{\mathsf{neg}\left(2 \cdot d\right)}} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        14. lift-*.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{\color{blue}{M \cdot D}}{\mathsf{neg}\left(2 \cdot d\right)} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        15. *-commutativeN/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{\color{blue}{D \cdot M}}{\mathsf{neg}\left(2 \cdot d\right)} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        16. lower-*.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{\color{blue}{D \cdot M}}{\mathsf{neg}\left(2 \cdot d\right)} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        17. lift-*.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{\mathsf{neg}\left(\color{blue}{2 \cdot d}\right)} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        18. distribute-lft-neg-inN/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{\color{blue}{\left(\mathsf{neg}\left(2\right)\right) \cdot d}} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        19. lower-*.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{\color{blue}{\left(\mathsf{neg}\left(2\right)\right) \cdot d}} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        20. metadata-evalN/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{\color{blue}{-2} \cdot d} \cdot \frac{\mathsf{neg}\left(M \cdot D\right)}{2 \cdot d}\right)\right) \cdot \frac{h}{\ell}\right) \]
        21. distribute-neg-fracN/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{-2 \cdot d} \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{M \cdot D}{2 \cdot d}\right)\right)}\right)\right) \cdot \frac{h}{\ell}\right) \]
        22. distribute-neg-frac2N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{-2 \cdot d} \cdot \color{blue}{\frac{M \cdot D}{\mathsf{neg}\left(2 \cdot d\right)}}\right)\right) \cdot \frac{h}{\ell}\right) \]
        23. lower-/.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{-2 \cdot d} \cdot \color{blue}{\frac{M \cdot D}{\mathsf{neg}\left(2 \cdot d\right)}}\right)\right) \cdot \frac{h}{\ell}\right) \]
        24. lift-*.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{-2 \cdot d} \cdot \frac{\color{blue}{M \cdot D}}{\mathsf{neg}\left(2 \cdot d\right)}\right)\right) \cdot \frac{h}{\ell}\right) \]
        25. *-commutativeN/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{-2 \cdot d} \cdot \frac{\color{blue}{D \cdot M}}{\mathsf{neg}\left(2 \cdot d\right)}\right)\right) \cdot \frac{h}{\ell}\right) \]
        26. lower-*.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{-2 \cdot d} \cdot \frac{\color{blue}{D \cdot M}}{\mathsf{neg}\left(2 \cdot d\right)}\right)\right) \cdot \frac{h}{\ell}\right) \]
        27. lift-*.f64N/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{-2 \cdot d} \cdot \frac{D \cdot M}{\mathsf{neg}\left(\color{blue}{2 \cdot d}\right)}\right)\right) \cdot \frac{h}{\ell}\right) \]
        28. distribute-lft-neg-inN/A

          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \left(\frac{D \cdot M}{-2 \cdot d} \cdot \frac{D \cdot M}{\color{blue}{\left(\mathsf{neg}\left(2\right)\right) \cdot d}}\right)\right) \cdot \frac{h}{\ell}\right) \]
      5. Applied rewrites66.4%

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot \color{blue}{\left(\frac{D \cdot M}{-2 \cdot d} \cdot \frac{D \cdot M}{-2 \cdot d}\right)}\right) \cdot \frac{h}{\ell}\right) \]
      6. Applied rewrites40.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\frac{\left(M \cdot D\right) \cdot D}{d \cdot d} \cdot -0.125\right) \cdot M, \frac{h}{\ell}, 1\right) \cdot \sqrt{\frac{d}{h \cdot \ell} \cdot d}} \]

      if -1.9999999999999998e-71 < (*.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 1e281 < (*.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.4%

        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \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. lift-pow.f64N/A

          \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        3. lift-pow.f64N/A

          \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \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. pow-prod-downN/A

          \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        5. lift-/.f64N/A

          \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        6. metadata-evalN/A

          \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        7. unpow1/2N/A

          \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        8. lift-/.f64N/A

          \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        9. mult-flipN/A

          \[\leadsto \sqrt{\color{blue}{\left(d \cdot \frac{1}{h}\right)} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        10. associate-*l*N/A

          \[\leadsto \sqrt{\color{blue}{d \cdot \left(\frac{1}{h} \cdot \frac{d}{\ell}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        11. sqrt-prodN/A

          \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        12. lower-unsound-*.f64N/A

          \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        13. lower-unsound-sqrt.f64N/A

          \[\leadsto \left(\color{blue}{\sqrt{d}} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        14. lower-unsound-sqrt.f64N/A

          \[\leadsto \left(\sqrt{d} \cdot \color{blue}{\sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        15. lift-/.f64N/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        16. frac-2negN/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        17. frac-2negN/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        18. frac-timesN/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)\right)}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        19. remove-double-negN/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1 \cdot \color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        20. *-lft-identityN/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{\color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        21. remove-double-negN/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(h\right)\right)\right)\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        22. remove-double-negN/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{h} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        23. remove-double-negN/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \color{blue}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        24. lower-/.f64N/A

          \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{d}{h \cdot \ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      3. Applied rewrites32.2%

        \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      4. Taylor expanded in d around inf

        \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
      5. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto {d}^{2} \cdot \color{blue}{\left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
        2. lower-pow.f64N/A

          \[\leadsto {d}^{2} \cdot \left(\color{blue}{\sqrt{\frac{1}{d}}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
        3. lower-*.f64N/A

          \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \color{blue}{\sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
        4. lower-sqrt.f64N/A

          \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\color{blue}{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
        5. lower-/.f64N/A

          \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{\color{blue}{1}}{d \cdot \left(h \cdot \ell\right)}}\right) \]
        6. lower-sqrt.f64N/A

          \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
        7. lower-/.f64N/A

          \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
        8. lower-*.f64N/A

          \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
        9. lower-*.f6413.9%

          \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
      6. Applied rewrites13.9%

        \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
      7. Applied rewrites39.0%

        \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\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)))) < 1e281

      1. Initial program 66.4%

        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. 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.4%

          \[\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.4%

          \[\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.4%

          \[\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.4%

        \[\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 rewrites39.1%

          \[\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 12: 55.8% 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 := \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\ \mathbf{if}\;t\_0 \leq -4 \cdot 10^{-132}:\\ \;\;\;\;-1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}}\\ \mathbf{elif}\;t\_0 \leq 0:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{+281}:\\ \;\;\;\;\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 (* (* (/ (/ 1.0 d) (sqrt (* h l))) d) d))))
         (if (<= t_0 -4e-132)
           (* -1.0 (sqrt (/ (pow d 2.0) (* h l))))
           (if (<= t_0 0.0)
             t_1
             (if (<= t_0 1e+281) (* (* (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(((((1.0 / d) / sqrt((h * l))) * d) * d));
      	double tmp;
      	if (t_0 <= -4e-132) {
      		tmp = -1.0 * sqrt((pow(d, 2.0) / (h * l)));
      	} else if (t_0 <= 0.0) {
      		tmp = t_1;
      	} else if (t_0 <= 1e+281) {
      		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(((((1.0d0 / d) / sqrt((h * l))) * d) * d))
          if (t_0 <= (-4d-132)) then
              tmp = (-1.0d0) * sqrt(((d ** 2.0d0) / (h * l)))
          else if (t_0 <= 0.0d0) then
              tmp = t_1
          else if (t_0 <= 1d+281) 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(((((1.0 / d) / Math.sqrt((h * l))) * d) * d));
      	double tmp;
      	if (t_0 <= -4e-132) {
      		tmp = -1.0 * Math.sqrt((Math.pow(d, 2.0) / (h * l)));
      	} else if (t_0 <= 0.0) {
      		tmp = t_1;
      	} else if (t_0 <= 1e+281) {
      		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(((((1.0 / d) / math.sqrt((h * l))) * d) * d))
      	tmp = 0
      	if t_0 <= -4e-132:
      		tmp = -1.0 * math.sqrt((math.pow(d, 2.0) / (h * l)))
      	elif t_0 <= 0.0:
      		tmp = t_1
      	elif t_0 <= 1e+281:
      		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 = abs(Float64(Float64(Float64(Float64(1.0 / d) / sqrt(Float64(h * l))) * d) * d))
      	tmp = 0.0
      	if (t_0 <= -4e-132)
      		tmp = Float64(-1.0 * sqrt(Float64((d ^ 2.0) / Float64(h * l))));
      	elseif (t_0 <= 0.0)
      		tmp = t_1;
      	elseif (t_0 <= 1e+281)
      		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(((((1.0 / d) / sqrt((h * l))) * d) * d));
      	tmp = 0.0;
      	if (t_0 <= -4e-132)
      		tmp = -1.0 * sqrt(((d ^ 2.0) / (h * l)));
      	elseif (t_0 <= 0.0)
      		tmp = t_1;
      	elseif (t_0 <= 1e+281)
      		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[Abs[N[(N[(N[(N[(1.0 / d), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -4e-132], N[(-1.0 * N[Sqrt[N[(N[Power[d, 2.0], $MachinePrecision] / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.0], t$95$1, If[LessEqual[t$95$0, 1e+281], 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 := \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\
      \mathbf{if}\;t\_0 \leq -4 \cdot 10^{-132}:\\
      \;\;\;\;-1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}}\\
      
      \mathbf{elif}\;t\_0 \leq 0:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_0 \leq 10^{+281}:\\
      \;\;\;\;\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)))) < -3.9999999999999999e-132

        1. Initial program 66.4%

          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        2. Taylor expanded in h around 0

          \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
          3. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
          5. lower-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
          6. lower-/.f6423.9%

            \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
        4. Applied rewrites23.9%

          \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{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.6%

            \[\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.6%

            \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
        6. Applied rewrites21.6%

          \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{\color{blue}{h}} \]
        7. Taylor expanded in h around -inf

          \[\leadsto -1 \cdot \color{blue}{\sqrt{\frac{{d}^{2}}{h \cdot \ell}}} \]
        8. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
          2. lower-sqrt.f64N/A

            \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
          3. lower-/.f64N/A

            \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
          4. lower-pow.f64N/A

            \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
          5. lower-*.f6411.8%

            \[\leadsto -1 \cdot \sqrt{\frac{{d}^{2}}{h \cdot \ell}} \]
        9. Applied rewrites11.8%

          \[\leadsto -1 \cdot \color{blue}{\sqrt{\frac{{d}^{2}}{h \cdot \ell}}} \]

        if -3.9999999999999999e-132 < (*.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 1e281 < (*.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.4%

          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \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. lift-pow.f64N/A

            \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          3. lift-pow.f64N/A

            \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \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. pow-prod-downN/A

            \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          5. lift-/.f64N/A

            \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          6. metadata-evalN/A

            \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          7. unpow1/2N/A

            \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          8. lift-/.f64N/A

            \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          9. mult-flipN/A

            \[\leadsto \sqrt{\color{blue}{\left(d \cdot \frac{1}{h}\right)} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          10. associate-*l*N/A

            \[\leadsto \sqrt{\color{blue}{d \cdot \left(\frac{1}{h} \cdot \frac{d}{\ell}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          11. sqrt-prodN/A

            \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          12. lower-unsound-*.f64N/A

            \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          13. lower-unsound-sqrt.f64N/A

            \[\leadsto \left(\color{blue}{\sqrt{d}} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          14. lower-unsound-sqrt.f64N/A

            \[\leadsto \left(\sqrt{d} \cdot \color{blue}{\sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          15. lift-/.f64N/A

            \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          16. frac-2negN/A

            \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          17. frac-2negN/A

            \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          18. frac-timesN/A

            \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)\right)}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          19. remove-double-negN/A

            \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1 \cdot \color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          20. *-lft-identityN/A

            \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{\color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          21. remove-double-negN/A

            \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(h\right)\right)\right)\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          22. remove-double-negN/A

            \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{h} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          23. remove-double-negN/A

            \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \color{blue}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          24. lower-/.f64N/A

            \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{d}{h \cdot \ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        3. Applied rewrites32.2%

          \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        4. Taylor expanded in d around inf

          \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
        5. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto {d}^{2} \cdot \color{blue}{\left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
          2. lower-pow.f64N/A

            \[\leadsto {d}^{2} \cdot \left(\color{blue}{\sqrt{\frac{1}{d}}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
          3. lower-*.f64N/A

            \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \color{blue}{\sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
          4. lower-sqrt.f64N/A

            \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\color{blue}{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
          5. lower-/.f64N/A

            \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{\color{blue}{1}}{d \cdot \left(h \cdot \ell\right)}}\right) \]
          6. lower-sqrt.f64N/A

            \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
          7. lower-/.f64N/A

            \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
          8. lower-*.f64N/A

            \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
          9. lower-*.f6413.9%

            \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
        6. Applied rewrites13.9%

          \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
        7. Applied rewrites39.0%

          \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\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)))) < 1e281

        1. Initial program 66.4%

          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
        2. 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.4%

            \[\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.4%

            \[\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.4%

            \[\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.4%

          \[\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 rewrites39.1%

            \[\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 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \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 := \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-71}:\\ \;\;\;\;\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 10^{+281}:\\ \;\;\;\;\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 (* (* (/ (/ 1.0 d) (sqrt (* h l))) d) d))))
           (if (<= t_0 -2e-71)
             (/ (* (sqrt (* d h)) (* -1.0 (* d (sqrt (/ 1.0 (* d l)))))) h)
             (if (<= t_0 0.0)
               t_1
               (if (<= t_0 1e+281) (* (* (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(((((1.0 / d) / sqrt((h * l))) * d) * d));
        	double tmp;
        	if (t_0 <= -2e-71) {
        		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 <= 1e+281) {
        		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(((((1.0d0 / d) / sqrt((h * l))) * d) * d))
            if (t_0 <= (-2d-71)) 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 <= 1d+281) 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(((((1.0 / d) / Math.sqrt((h * l))) * d) * d));
        	double tmp;
        	if (t_0 <= -2e-71) {
        		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 <= 1e+281) {
        		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(((((1.0 / d) / math.sqrt((h * l))) * d) * d))
        	tmp = 0
        	if t_0 <= -2e-71:
        		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 <= 1e+281:
        		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 = abs(Float64(Float64(Float64(Float64(1.0 / d) / sqrt(Float64(h * l))) * d) * d))
        	tmp = 0.0
        	if (t_0 <= -2e-71)
        		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 <= 1e+281)
        		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(((((1.0 / d) / sqrt((h * l))) * d) * d));
        	tmp = 0.0;
        	if (t_0 <= -2e-71)
        		tmp = (sqrt((d * h)) * (-1.0 * (d * sqrt((1.0 / (d * l)))))) / h;
        	elseif (t_0 <= 0.0)
        		tmp = t_1;
        	elseif (t_0 <= 1e+281)
        		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[Abs[N[(N[(N[(N[(1.0 / d), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -2e-71], 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, 1e+281], 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 := \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\right|\\
        \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-71}:\\
        \;\;\;\;\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 10^{+281}:\\
        \;\;\;\;\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.9999999999999998e-71

          1. Initial program 66.4%

            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          2. Taylor expanded in h around 0

            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
            3. lower-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
            5. lower-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
            6. lower-/.f6423.9%

              \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
          4. Applied rewrites23.9%

            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
          5. Taylor expanded in 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.3%

              \[\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.3%

            \[\leadsto \frac{\sqrt{d \cdot h} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]

          if -1.9999999999999998e-71 < (*.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 1e281 < (*.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.4%

            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          2. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \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. lift-pow.f64N/A

              \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            3. lift-pow.f64N/A

              \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \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. pow-prod-downN/A

              \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            5. lift-/.f64N/A

              \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            6. metadata-evalN/A

              \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            7. unpow1/2N/A

              \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            8. lift-/.f64N/A

              \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            9. mult-flipN/A

              \[\leadsto \sqrt{\color{blue}{\left(d \cdot \frac{1}{h}\right)} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            10. associate-*l*N/A

              \[\leadsto \sqrt{\color{blue}{d \cdot \left(\frac{1}{h} \cdot \frac{d}{\ell}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            11. sqrt-prodN/A

              \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            12. lower-unsound-*.f64N/A

              \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            13. lower-unsound-sqrt.f64N/A

              \[\leadsto \left(\color{blue}{\sqrt{d}} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            14. lower-unsound-sqrt.f64N/A

              \[\leadsto \left(\sqrt{d} \cdot \color{blue}{\sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            15. lift-/.f64N/A

              \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            16. frac-2negN/A

              \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            17. frac-2negN/A

              \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            18. frac-timesN/A

              \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)\right)}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            19. remove-double-negN/A

              \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1 \cdot \color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            20. *-lft-identityN/A

              \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{\color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            21. remove-double-negN/A

              \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(h\right)\right)\right)\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            22. remove-double-negN/A

              \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{h} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            23. remove-double-negN/A

              \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \color{blue}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            24. lower-/.f64N/A

              \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{d}{h \cdot \ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          3. Applied rewrites32.2%

            \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          4. Taylor expanded in d around inf

            \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
          5. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto {d}^{2} \cdot \color{blue}{\left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
            2. lower-pow.f64N/A

              \[\leadsto {d}^{2} \cdot \left(\color{blue}{\sqrt{\frac{1}{d}}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
            3. lower-*.f64N/A

              \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \color{blue}{\sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
            4. lower-sqrt.f64N/A

              \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\color{blue}{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
            5. lower-/.f64N/A

              \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{\color{blue}{1}}{d \cdot \left(h \cdot \ell\right)}}\right) \]
            6. lower-sqrt.f64N/A

              \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
            7. lower-/.f64N/A

              \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
            8. lower-*.f64N/A

              \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
            9. lower-*.f6413.9%

              \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
          6. Applied rewrites13.9%

            \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
          7. Applied rewrites39.0%

            \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\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)))) < 1e281

          1. Initial program 66.4%

            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
          2. 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.4%

              \[\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.4%

              \[\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.4%

              \[\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.4%

            \[\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 rewrites39.1%

              \[\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: 54.5% accurate, 0.3× speedup?

          \[\begin{array}{l} t_0 := \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot 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{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-132}:\\ \;\;\;\;\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 10^{+281}:\\ \;\;\;\;\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 (* (* (/ (/ 1.0 d) (sqrt (* h l))) d) d)))
                  (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 -4e-132)
               (/ (* -1.0 (* d (sqrt (/ h l)))) h)
               (if (<= t_1 0.0)
                 t_0
                 (if (<= t_1 1e+281) (* (* (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(((((1.0 / d) / sqrt((h * l))) * d) * 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(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
          	double tmp;
          	if (t_1 <= -4e-132) {
          		tmp = (-1.0 * (d * sqrt((h / l)))) / h;
          	} else if (t_1 <= 0.0) {
          		tmp = t_0;
          	} else if (t_1 <= 1e+281) {
          		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(((((1.0d0 / d) / sqrt((h * l))) * d) * d))
              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 <= (-4d-132)) then
                  tmp = ((-1.0d0) * (d * sqrt((h / l)))) / h
              else if (t_1 <= 0.0d0) then
                  tmp = t_0
              else if (t_1 <= 1d+281) 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(((((1.0 / d) / Math.sqrt((h * l))) * d) * d));
          	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 <= -4e-132) {
          		tmp = (-1.0 * (d * Math.sqrt((h / l)))) / h;
          	} else if (t_1 <= 0.0) {
          		tmp = t_0;
          	} else if (t_1 <= 1e+281) {
          		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(((((1.0 / d) / math.sqrt((h * l))) * d) * d))
          	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 <= -4e-132:
          		tmp = (-1.0 * (d * math.sqrt((h / l)))) / h
          	elif t_1 <= 0.0:
          		tmp = t_0
          	elif t_1 <= 1e+281:
          		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 = abs(Float64(Float64(Float64(Float64(1.0 / d) / sqrt(Float64(h * l))) * d) * 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(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
          	tmp = 0.0
          	if (t_1 <= -4e-132)
          		tmp = Float64(Float64(-1.0 * Float64(d * sqrt(Float64(h / l)))) / h);
          	elseif (t_1 <= 0.0)
          		tmp = t_0;
          	elseif (t_1 <= 1e+281)
          		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(((((1.0 / d) / sqrt((h * l))) * d) * d));
          	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 <= -4e-132)
          		tmp = (-1.0 * (d * sqrt((h / l)))) / h;
          	elseif (t_1 <= 0.0)
          		tmp = t_0;
          	elseif (t_1 <= 1e+281)
          		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[Abs[N[(N[(N[(N[(1.0 / d), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * d), $MachinePrecision] * 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[(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, -4e-132], 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, 1e+281], 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 := \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot 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{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
          \mathbf{if}\;t\_1 \leq -4 \cdot 10^{-132}:\\
          \;\;\;\;\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 10^{+281}:\\
          \;\;\;\;\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)))) < -3.9999999999999999e-132

            1. Initial program 66.4%

              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            2. Taylor expanded in h around 0

              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
            3. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              3. lower-sqrt.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              4. lower-*.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              5. lower-sqrt.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              6. lower-/.f6423.9%

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
            4. Applied rewrites23.9%

              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
            5. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{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.6%

                \[\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.6%

                \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
            6. Applied rewrites21.6%

              \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{\color{blue}{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.1%

                \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
            9. Applied rewrites13.1%

              \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]

            if -3.9999999999999999e-132 < (*.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 1e281 < (*.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.4%

              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            2. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \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. lift-pow.f64N/A

                \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              3. lift-pow.f64N/A

                \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \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. pow-prod-downN/A

                \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              5. lift-/.f64N/A

                \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              6. metadata-evalN/A

                \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              7. unpow1/2N/A

                \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              8. lift-/.f64N/A

                \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              9. mult-flipN/A

                \[\leadsto \sqrt{\color{blue}{\left(d \cdot \frac{1}{h}\right)} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              10. associate-*l*N/A

                \[\leadsto \sqrt{\color{blue}{d \cdot \left(\frac{1}{h} \cdot \frac{d}{\ell}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              11. sqrt-prodN/A

                \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              12. lower-unsound-*.f64N/A

                \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              13. lower-unsound-sqrt.f64N/A

                \[\leadsto \left(\color{blue}{\sqrt{d}} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              14. lower-unsound-sqrt.f64N/A

                \[\leadsto \left(\sqrt{d} \cdot \color{blue}{\sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              15. lift-/.f64N/A

                \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              16. frac-2negN/A

                \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              17. frac-2negN/A

                \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              18. frac-timesN/A

                \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)\right)}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              19. remove-double-negN/A

                \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1 \cdot \color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              20. *-lft-identityN/A

                \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{\color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              21. remove-double-negN/A

                \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(h\right)\right)\right)\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              22. remove-double-negN/A

                \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{h} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              23. remove-double-negN/A

                \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \color{blue}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              24. lower-/.f64N/A

                \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{d}{h \cdot \ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            3. Applied rewrites32.2%

              \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            4. Taylor expanded in d around inf

              \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
            5. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto {d}^{2} \cdot \color{blue}{\left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
              2. lower-pow.f64N/A

                \[\leadsto {d}^{2} \cdot \left(\color{blue}{\sqrt{\frac{1}{d}}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
              3. lower-*.f64N/A

                \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \color{blue}{\sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
              4. lower-sqrt.f64N/A

                \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\color{blue}{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
              5. lower-/.f64N/A

                \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{\color{blue}{1}}{d \cdot \left(h \cdot \ell\right)}}\right) \]
              6. lower-sqrt.f64N/A

                \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
              7. lower-/.f64N/A

                \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
              8. lower-*.f64N/A

                \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
              9. lower-*.f6413.9%

                \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
            6. Applied rewrites13.9%

              \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
            7. Applied rewrites39.0%

              \[\leadsto \left|\left(\frac{\frac{1}{d}}{\sqrt{h \cdot \ell}} \cdot d\right) \cdot d\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)))) < 1e281

            1. Initial program 66.4%

              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            2. 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.4%

                \[\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.4%

                \[\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.4%

                \[\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.4%

              \[\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 rewrites39.1%

                \[\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 15: 43.8% accurate, 4.0× speedup?

            \[\begin{array}{l} \mathbf{if}\;\ell \leq -7.5 \cdot 10^{-282}:\\ \;\;\;\;-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;\ell \leq 1.25 \cdot 10^{-194}:\\ \;\;\;\;\frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h}\\ \end{array} \]
            (FPCore (d h l M D)
             :precision binary64
             (if (<= l -7.5e-282)
               (* -1.0 (* d (sqrt (/ 1.0 (* h l)))))
               (if (<= l 1.25e-194)
                 (/ (* -1.0 (* d (sqrt (/ h l)))) h)
                 (/ (* d (/ (sqrt h) (sqrt l))) h))))
            double code(double d, double h, double l, double M, double D) {
            	double tmp;
            	if (l <= -7.5e-282) {
            		tmp = -1.0 * (d * sqrt((1.0 / (h * l))));
            	} else if (l <= 1.25e-194) {
            		tmp = (-1.0 * (d * sqrt((h / l)))) / h;
            	} else {
            		tmp = (d * (sqrt(h) / sqrt(l))) / h;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(d, h, l, m, d_1)
            use fmin_fmax_functions
                real(8), intent (in) :: d
                real(8), intent (in) :: h
                real(8), intent (in) :: l
                real(8), intent (in) :: m
                real(8), intent (in) :: d_1
                real(8) :: tmp
                if (l <= (-7.5d-282)) then
                    tmp = (-1.0d0) * (d * sqrt((1.0d0 / (h * l))))
                else if (l <= 1.25d-194) then
                    tmp = ((-1.0d0) * (d * sqrt((h / l)))) / h
                else
                    tmp = (d * (sqrt(h) / sqrt(l))) / h
                end if
                code = tmp
            end function
            
            public static double code(double d, double h, double l, double M, double D) {
            	double tmp;
            	if (l <= -7.5e-282) {
            		tmp = -1.0 * (d * Math.sqrt((1.0 / (h * l))));
            	} else if (l <= 1.25e-194) {
            		tmp = (-1.0 * (d * Math.sqrt((h / l)))) / h;
            	} else {
            		tmp = (d * (Math.sqrt(h) / Math.sqrt(l))) / h;
            	}
            	return tmp;
            }
            
            def code(d, h, l, M, D):
            	tmp = 0
            	if l <= -7.5e-282:
            		tmp = -1.0 * (d * math.sqrt((1.0 / (h * l))))
            	elif l <= 1.25e-194:
            		tmp = (-1.0 * (d * math.sqrt((h / l)))) / h
            	else:
            		tmp = (d * (math.sqrt(h) / math.sqrt(l))) / h
            	return tmp
            
            function code(d, h, l, M, D)
            	tmp = 0.0
            	if (l <= -7.5e-282)
            		tmp = Float64(-1.0 * Float64(d * sqrt(Float64(1.0 / Float64(h * l)))));
            	elseif (l <= 1.25e-194)
            		tmp = Float64(Float64(-1.0 * Float64(d * sqrt(Float64(h / l)))) / h);
            	else
            		tmp = Float64(Float64(d * Float64(sqrt(h) / sqrt(l))) / h);
            	end
            	return tmp
            end
            
            function tmp_2 = code(d, h, l, M, D)
            	tmp = 0.0;
            	if (l <= -7.5e-282)
            		tmp = -1.0 * (d * sqrt((1.0 / (h * l))));
            	elseif (l <= 1.25e-194)
            		tmp = (-1.0 * (d * sqrt((h / l)))) / h;
            	else
            		tmp = (d * (sqrt(h) / sqrt(l))) / h;
            	end
            	tmp_2 = tmp;
            end
            
            code[d_, h_, l_, M_, D_] := If[LessEqual[l, -7.5e-282], N[(-1.0 * N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.25e-194], N[(N[(-1.0 * N[(d * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], N[(N[(d * N[(N[Sqrt[h], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]]]
            
            \begin{array}{l}
            \mathbf{if}\;\ell \leq -7.5 \cdot 10^{-282}:\\
            \;\;\;\;-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
            
            \mathbf{elif}\;\ell \leq 1.25 \cdot 10^{-194}:\\
            \;\;\;\;\frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if l < -7.4999999999999994e-282

              1. Initial program 66.4%

                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              2. Applied rewrites29.2%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{h}{\ell}, \left(M \cdot \left(\frac{D \cdot \left(D \cdot M\right)}{4 \cdot \left(d \cdot d\right)} \cdot -0.5\right)\right) \cdot \sqrt{d \cdot \frac{d}{h \cdot \ell}}, \sqrt{d \cdot \frac{d}{h \cdot \ell}}\right)} \]
              3. Taylor expanded in d around -inf

                \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
              4. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto -1 \cdot \left(d \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}}\right) \]
                3. lower-sqrt.f64N/A

                  \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
                4. lower-/.f64N/A

                  \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
                5. lower-*.f6425.9%

                  \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
              5. Applied rewrites25.9%

                \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]

              if -7.4999999999999994e-282 < l < 1.2500000000000001e-194

              1. Initial program 66.4%

                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              2. Taylor expanded in h around 0

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                5. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                6. lower-/.f6423.9%

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              4. Applied rewrites23.9%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{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.6%

                  \[\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.6%

                  \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
              6. Applied rewrites21.6%

                \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{\color{blue}{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.1%

                  \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]
              9. Applied rewrites13.1%

                \[\leadsto \frac{-1 \cdot \left(d \cdot \sqrt{\frac{h}{\ell}}\right)}{h} \]

              if 1.2500000000000001e-194 < l

              1. Initial program 66.4%

                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              2. Taylor expanded in h around 0

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                5. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                6. lower-/.f6423.9%

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              4. Applied rewrites23.9%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{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.6%

                  \[\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.6%

                  \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
              6. Applied rewrites21.6%

                \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{\color{blue}{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-/.f6437.1%

                  \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
              9. Applied rewrites37.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.f6422.3%

                  \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]
              11. Applied rewrites22.3%

                \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]
            3. Recombined 3 regimes into one program.
            4. Add Preprocessing

            Alternative 16: 43.3% accurate, 4.9× speedup?

            \[\begin{array}{l} \mathbf{if}\;\ell \leq 1.8 \cdot 10^{-258}:\\ \;\;\;\;-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h}\\ \end{array} \]
            (FPCore (d h l M D)
             :precision binary64
             (if (<= l 1.8e-258)
               (* -1.0 (* d (sqrt (/ 1.0 (* h l)))))
               (/ (* d (/ (sqrt h) (sqrt l))) h)))
            double code(double d, double h, double l, double M, double D) {
            	double tmp;
            	if (l <= 1.8e-258) {
            		tmp = -1.0 * (d * sqrt((1.0 / (h * l))));
            	} else {
            		tmp = (d * (sqrt(h) / sqrt(l))) / h;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(d, h, l, m, d_1)
            use fmin_fmax_functions
                real(8), intent (in) :: d
                real(8), intent (in) :: h
                real(8), intent (in) :: l
                real(8), intent (in) :: m
                real(8), intent (in) :: d_1
                real(8) :: tmp
                if (l <= 1.8d-258) then
                    tmp = (-1.0d0) * (d * sqrt((1.0d0 / (h * l))))
                else
                    tmp = (d * (sqrt(h) / sqrt(l))) / h
                end if
                code = tmp
            end function
            
            public static double code(double d, double h, double l, double M, double D) {
            	double tmp;
            	if (l <= 1.8e-258) {
            		tmp = -1.0 * (d * Math.sqrt((1.0 / (h * l))));
            	} else {
            		tmp = (d * (Math.sqrt(h) / Math.sqrt(l))) / h;
            	}
            	return tmp;
            }
            
            def code(d, h, l, M, D):
            	tmp = 0
            	if l <= 1.8e-258:
            		tmp = -1.0 * (d * math.sqrt((1.0 / (h * l))))
            	else:
            		tmp = (d * (math.sqrt(h) / math.sqrt(l))) / h
            	return tmp
            
            function code(d, h, l, M, D)
            	tmp = 0.0
            	if (l <= 1.8e-258)
            		tmp = Float64(-1.0 * Float64(d * sqrt(Float64(1.0 / Float64(h * l)))));
            	else
            		tmp = Float64(Float64(d * Float64(sqrt(h) / sqrt(l))) / h);
            	end
            	return tmp
            end
            
            function tmp_2 = code(d, h, l, M, D)
            	tmp = 0.0;
            	if (l <= 1.8e-258)
            		tmp = -1.0 * (d * sqrt((1.0 / (h * l))));
            	else
            		tmp = (d * (sqrt(h) / sqrt(l))) / h;
            	end
            	tmp_2 = tmp;
            end
            
            code[d_, h_, l_, M_, D_] := If[LessEqual[l, 1.8e-258], N[(-1.0 * N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d * N[(N[Sqrt[h], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]]
            
            \begin{array}{l}
            \mathbf{if}\;\ell \leq 1.8 \cdot 10^{-258}:\\
            \;\;\;\;-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if l < 1.7999999999999999e-258

              1. Initial program 66.4%

                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              2. Applied rewrites29.2%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{h}{\ell}, \left(M \cdot \left(\frac{D \cdot \left(D \cdot M\right)}{4 \cdot \left(d \cdot d\right)} \cdot -0.5\right)\right) \cdot \sqrt{d \cdot \frac{d}{h \cdot \ell}}, \sqrt{d \cdot \frac{d}{h \cdot \ell}}\right)} \]
              3. Taylor expanded in d around -inf

                \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
              4. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto -1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto -1 \cdot \left(d \cdot \color{blue}{\sqrt{\frac{1}{h \cdot \ell}}}\right) \]
                3. lower-sqrt.f64N/A

                  \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
                4. lower-/.f64N/A

                  \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
                5. lower-*.f6425.9%

                  \[\leadsto -1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \]
              5. Applied rewrites25.9%

                \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)} \]

              if 1.7999999999999999e-258 < l

              1. Initial program 66.4%

                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              2. Taylor expanded in h around 0

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                5. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                6. lower-/.f6423.9%

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              4. Applied rewrites23.9%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{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.6%

                  \[\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.6%

                  \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
              6. Applied rewrites21.6%

                \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{\color{blue}{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-/.f6437.1%

                  \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
              9. Applied rewrites37.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.f6422.3%

                  \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]
              11. Applied rewrites22.3%

                \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 17: 41.0% accurate, 5.1× speedup?

            \[\begin{array}{l} \mathbf{if}\;d \leq 1.4 \cdot 10^{-302}:\\ \;\;\;\;\frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h}\\ \end{array} \]
            (FPCore (d h l M D)
             :precision binary64
             (if (<= d 1.4e-302)
               (/ (* d (sqrt (/ h l))) h)
               (/ (* d (/ (sqrt h) (sqrt l))) h)))
            double code(double d, double h, double l, double M, double D) {
            	double tmp;
            	if (d <= 1.4e-302) {
            		tmp = (d * sqrt((h / l))) / h;
            	} else {
            		tmp = (d * (sqrt(h) / sqrt(l))) / h;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(d, h, l, m, d_1)
            use fmin_fmax_functions
                real(8), intent (in) :: d
                real(8), intent (in) :: h
                real(8), intent (in) :: l
                real(8), intent (in) :: m
                real(8), intent (in) :: d_1
                real(8) :: tmp
                if (d <= 1.4d-302) then
                    tmp = (d * sqrt((h / l))) / h
                else
                    tmp = (d * (sqrt(h) / sqrt(l))) / h
                end if
                code = tmp
            end function
            
            public static double code(double d, double h, double l, double M, double D) {
            	double tmp;
            	if (d <= 1.4e-302) {
            		tmp = (d * Math.sqrt((h / l))) / h;
            	} else {
            		tmp = (d * (Math.sqrt(h) / Math.sqrt(l))) / h;
            	}
            	return tmp;
            }
            
            def code(d, h, l, M, D):
            	tmp = 0
            	if d <= 1.4e-302:
            		tmp = (d * math.sqrt((h / l))) / h
            	else:
            		tmp = (d * (math.sqrt(h) / math.sqrt(l))) / h
            	return tmp
            
            function code(d, h, l, M, D)
            	tmp = 0.0
            	if (d <= 1.4e-302)
            		tmp = Float64(Float64(d * sqrt(Float64(h / l))) / h);
            	else
            		tmp = Float64(Float64(d * Float64(sqrt(h) / sqrt(l))) / h);
            	end
            	return tmp
            end
            
            function tmp_2 = code(d, h, l, M, D)
            	tmp = 0.0;
            	if (d <= 1.4e-302)
            		tmp = (d * sqrt((h / l))) / h;
            	else
            		tmp = (d * (sqrt(h) / sqrt(l))) / h;
            	end
            	tmp_2 = tmp;
            end
            
            code[d_, h_, l_, M_, D_] := If[LessEqual[d, 1.4e-302], N[(N[(d * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], N[(N[(d * N[(N[Sqrt[h], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]]
            
            \begin{array}{l}
            \mathbf{if}\;d \leq 1.4 \cdot 10^{-302}:\\
            \;\;\;\;\frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if d < 1.4e-302

              1. Initial program 66.4%

                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              2. Taylor expanded in h around 0

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                5. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                6. lower-/.f6423.9%

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              4. Applied rewrites23.9%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{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.6%

                  \[\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.6%

                  \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
              6. Applied rewrites21.6%

                \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{\color{blue}{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-/.f6437.1%

                  \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
              9. Applied rewrites37.1%

                \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]

              if 1.4e-302 < d

              1. Initial program 66.4%

                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              2. Taylor expanded in h around 0

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                5. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                6. lower-/.f6423.9%

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              4. Applied rewrites23.9%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{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.6%

                  \[\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.6%

                  \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
              6. Applied rewrites21.6%

                \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{\color{blue}{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-/.f6437.1%

                  \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
              9. Applied rewrites37.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.f6422.3%

                  \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]
              11. Applied rewrites22.3%

                \[\leadsto \frac{d \cdot \frac{\sqrt{h}}{\sqrt{\ell}}}{h} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 18: 38.1% accurate, 5.2× speedup?

            \[\begin{array}{l} \mathbf{if}\;\ell \leq 1.9 \cdot 10^{-150}:\\ \;\;\;\;\frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}}\\ \end{array} \]
            (FPCore (d h l M D)
             :precision binary64
             (if (<= l 1.9e-150)
               (/ (* d (sqrt (/ h l))) h)
               (* (sqrt d) (sqrt (/ d (* h l))))))
            double code(double d, double h, double l, double M, double D) {
            	double tmp;
            	if (l <= 1.9e-150) {
            		tmp = (d * sqrt((h / l))) / h;
            	} else {
            		tmp = sqrt(d) * sqrt((d / (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 (l <= 1.9d-150) then
                    tmp = (d * sqrt((h / l))) / h
                else
                    tmp = sqrt(d) * sqrt((d / (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 (l <= 1.9e-150) {
            		tmp = (d * Math.sqrt((h / l))) / h;
            	} else {
            		tmp = Math.sqrt(d) * Math.sqrt((d / (h * l)));
            	}
            	return tmp;
            }
            
            def code(d, h, l, M, D):
            	tmp = 0
            	if l <= 1.9e-150:
            		tmp = (d * math.sqrt((h / l))) / h
            	else:
            		tmp = math.sqrt(d) * math.sqrt((d / (h * l)))
            	return tmp
            
            function code(d, h, l, M, D)
            	tmp = 0.0
            	if (l <= 1.9e-150)
            		tmp = Float64(Float64(d * sqrt(Float64(h / l))) / h);
            	else
            		tmp = Float64(sqrt(d) * sqrt(Float64(d / Float64(h * l))));
            	end
            	return tmp
            end
            
            function tmp_2 = code(d, h, l, M, D)
            	tmp = 0.0;
            	if (l <= 1.9e-150)
            		tmp = (d * sqrt((h / l))) / h;
            	else
            		tmp = sqrt(d) * sqrt((d / (h * l)));
            	end
            	tmp_2 = tmp;
            end
            
            code[d_, h_, l_, M_, D_] := If[LessEqual[l, 1.9e-150], N[(N[(d * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision], N[(N[Sqrt[d], $MachinePrecision] * N[Sqrt[N[(d / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            \mathbf{if}\;\ell \leq 1.9 \cdot 10^{-150}:\\
            \;\;\;\;\frac{d \cdot \sqrt{\frac{h}{\ell}}}{h}\\
            
            \mathbf{else}:\\
            \;\;\;\;\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if l < 1.8999999999999999e-150

              1. Initial program 66.4%

                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              2. Taylor expanded in h around 0

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                5. lower-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
                6. lower-/.f6423.9%

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              4. Applied rewrites23.9%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{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.6%

                  \[\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.6%

                  \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
              6. Applied rewrites21.6%

                \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{\color{blue}{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-/.f6437.1%

                  \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
              9. Applied rewrites37.1%

                \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]

              if 1.8999999999999999e-150 < l

              1. Initial program 66.4%

                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              2. 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. lift-pow.f64N/A

                  \[\leadsto \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                3. lift-pow.f64N/A

                  \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}}\right) \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. pow-prod-downN/A

                  \[\leadsto \color{blue}{{\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                5. lift-/.f64N/A

                  \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                6. metadata-evalN/A

                  \[\leadsto {\left(\frac{d}{h} \cdot \frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                7. unpow1/2N/A

                  \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                8. lift-/.f64N/A

                  \[\leadsto \sqrt{\color{blue}{\frac{d}{h}} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                9. mult-flipN/A

                  \[\leadsto \sqrt{\color{blue}{\left(d \cdot \frac{1}{h}\right)} \cdot \frac{d}{\ell}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                10. associate-*l*N/A

                  \[\leadsto \sqrt{\color{blue}{d \cdot \left(\frac{1}{h} \cdot \frac{d}{\ell}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                11. sqrt-prodN/A

                  \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                12. lower-unsound-*.f64N/A

                  \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                13. lower-unsound-sqrt.f64N/A

                  \[\leadsto \left(\color{blue}{\sqrt{d}} \cdot \sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                14. lower-unsound-sqrt.f64N/A

                  \[\leadsto \left(\sqrt{d} \cdot \color{blue}{\sqrt{\frac{1}{h} \cdot \frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                15. lift-/.f64N/A

                  \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{d}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                16. frac-2negN/A

                  \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                17. frac-2negN/A

                  \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1}{h} \cdot \color{blue}{\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                18. frac-timesN/A

                  \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{1 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(d\right)\right)\right)\right)}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                19. remove-double-negN/A

                  \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{1 \cdot \color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                20. *-lft-identityN/A

                  \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{\color{blue}{d}}{h \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                21. remove-double-negN/A

                  \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(h\right)\right)\right)\right)} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                22. remove-double-negN/A

                  \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{\color{blue}{h} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\ell\right)\right)\right)\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                23. remove-double-negN/A

                  \[\leadsto \left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \color{blue}{\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                24. lower-/.f64N/A

                  \[\leadsto \left(\sqrt{d} \cdot \sqrt{\color{blue}{\frac{d}{h \cdot \ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              3. Applied rewrites32.2%

                \[\leadsto \color{blue}{\left(\sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
              4. Taylor expanded in d around inf

                \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto {d}^{2} \cdot \color{blue}{\left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
                2. lower-pow.f64N/A

                  \[\leadsto {d}^{2} \cdot \left(\color{blue}{\sqrt{\frac{1}{d}}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
                3. lower-*.f64N/A

                  \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \color{blue}{\sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
                4. lower-sqrt.f64N/A

                  \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\color{blue}{\frac{1}{d \cdot \left(h \cdot \ell\right)}}}\right) \]
                5. lower-/.f64N/A

                  \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{\color{blue}{1}}{d \cdot \left(h \cdot \ell\right)}}\right) \]
                6. lower-sqrt.f64N/A

                  \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
                7. lower-/.f64N/A

                  \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
                8. lower-*.f64N/A

                  \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
                9. lower-*.f6413.9%

                  \[\leadsto {d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right) \]
              6. Applied rewrites13.9%

                \[\leadsto \color{blue}{{d}^{2} \cdot \left(\sqrt{\frac{1}{d}} \cdot \sqrt{\frac{1}{d \cdot \left(h \cdot \ell\right)}}\right)} \]
              7. Taylor expanded in d around 0

                \[\leadsto \sqrt{d} \cdot \color{blue}{\sqrt{\frac{d}{h \cdot \ell}}} \]
              8. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}} \]
                2. lower-sqrt.f64N/A

                  \[\leadsto \sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}} \]
                4. lower-/.f64N/A

                  \[\leadsto \sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}} \]
                5. lower-*.f6419.4%

                  \[\leadsto \sqrt{d} \cdot \sqrt{\frac{d}{h \cdot \ell}} \]
              9. Applied rewrites19.4%

                \[\leadsto \sqrt{d} \cdot \color{blue}{\sqrt{\frac{d}{h \cdot \ell}}} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 19: 37.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.4%

              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
            2. Taylor expanded in h around 0

              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
            3. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{\color{blue}{h}} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              3. lower-sqrt.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              4. lower-*.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              5. lower-sqrt.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
              6. lower-/.f6423.9%

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
            4. Applied rewrites23.9%

              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h}} \]
            5. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{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.6%

                \[\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.6%

                \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{h} \]
            6. Applied rewrites21.6%

              \[\leadsto \frac{\sqrt{\left(h \cdot d\right) \cdot \frac{d}{\ell}}}{\color{blue}{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-/.f6437.1%

                \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
            9. Applied rewrites37.1%

              \[\leadsto \frac{d \cdot \sqrt{\frac{h}{\ell}}}{h} \]
            10. Add Preprocessing

            Reproduce

            ?
            herbie shell --seed 2025191 
            (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)))))