Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.4% → 84.2%
Time: 10.5s
Alternatives: 14
Speedup: 0.4×

Specification

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 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: 84.2% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+238}:\\
\;\;\;\;\left(t\_1 \cdot {\left(\frac{1}{\ell} \cdot d\right)}^{\left(\frac{1}{2}\right)}\right) \cdot t\_0\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 2.0000000000000001e238 < (*.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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 {\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) \]
      2. mult-flipN/A

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

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

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\color{blue}{\left(\frac{1}{\ell} \cdot d\right)}}^{\left(\frac{1}{2}\right)}\right) \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. lower-/.f6466.4%

        \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\color{blue}{\frac{1}{\ell}} \cdot d\right)}^{\left(\frac{1}{2}\right)}\right) \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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\color{blue}{\left(\frac{1}{\ell} \cdot d\right)}}^{\left(\frac{1}{2}\right)}\right) \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. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 84.2% accurate, 0.4× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 2.0000000000000001e238 < (*.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \mathsf{fma}\left(\frac{\left(\frac{1}{4} \cdot \frac{M \cdot D}{d}\right) \cdot h}{-2 \cdot d}, \frac{M \cdot D}{\ell}, 1\right) \]
      17. pow-prod-downN/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 \mathsf{fma}\left(\frac{\left(\frac{1}{4} \cdot \frac{M \cdot D}{d}\right) \cdot h}{-2 \cdot d}, \frac{M \cdot D}{\ell}, 1\right) \]
      18. 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 \mathsf{fma}\left(\frac{\left(\frac{1}{4} \cdot \frac{M \cdot D}{d}\right) \cdot h}{-2 \cdot d}, \frac{M \cdot D}{\ell}, 1\right) \]
      19. pow1/2N/A

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

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

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

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

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

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

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

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

Alternative 3: 84.2% accurate, 0.4× speedup?

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+238}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot t\_0\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 2.0000000000000001e238 < (*.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 84.0% accurate, 0.4× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 0.0 or 2.0000000000000001e238 < (*.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 82.1% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_0 \leq 0:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -2e-107 or 2.0000000000000001e238 < (*.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 \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}}\right) \]
      2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 81.8% accurate, 0.4× speedup?

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

      1. Initial program 66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 57.4% accurate, 0.3× speedup?

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

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

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

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

          \[\leadsto \frac{\sqrt{d \cdot h} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
        2. pow1/2N/A

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

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

          \[\leadsto \frac{{\left(d \cdot h\right)}^{\left(\frac{1}{2}\right)} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
        5. pow-to-expN/A

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

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

          \[\leadsto \frac{e^{\log \left(d \cdot h\right) \cdot \frac{1}{2}} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
        8. lower-unsound-log.f6422.4%

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

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

          \[\leadsto \frac{e^{\log \left(h \cdot d\right) \cdot \frac{1}{2}} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
        11. lower-*.f6422.4%

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

          \[\leadsto \frac{e^{\log \left(h \cdot d\right) \cdot \frac{1}{2}} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
        13. metadata-eval22.4%

          \[\leadsto \frac{e^{\log \left(h \cdot d\right) \cdot 0.5} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      6. Applied rewrites22.4%

        \[\leadsto \frac{e^{\log \left(h \cdot d\right) \cdot 0.5} \cdot \sqrt{\frac{d}{\ell}}}{h} \]
      7. Taylor expanded in d around -inf

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

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

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

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

          \[\leadsto \frac{e^{\log \left(h \cdot d\right) \cdot \frac{1}{2}} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]
        5. lower-*.f6414.4%

          \[\leadsto \frac{e^{\log \left(h \cdot d\right) \cdot 0.5} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]
      9. Applied rewrites14.4%

        \[\leadsto \frac{e^{\log \left(h \cdot d\right) \cdot 0.5} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot \ell}}\right)\right)}{h} \]
      10. Applied rewrites14.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 55.4% accurate, 0.3× speedup?

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

        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. lift-/.f64N/A

            \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

            \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
          11. sqrt-divN/A

            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
          12. lower-unsound-/.f64N/A

            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
          13. lower-unsound-sqrt.f64N/A

            \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
          14. lower-*.f64N/A

            \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
          15. lower-unsound-sqrt.f64N/A

            \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
          16. lower-*.f6448.6%

            \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
        3. Applied rewrites48.6%

          \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
        4. Taylor expanded in d around -inf

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

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

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

            \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
          4. lower-*.f6426.3%

            \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
        6. Applied rewrites26.3%

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

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

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

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

            \[\leadsto -1 \cdot \frac{d}{h \cdot \sqrt{\frac{\ell}{h}}} \]
          4. lower-/.f6412.3%

            \[\leadsto -1 \cdot \frac{d}{h \cdot \sqrt{\frac{\ell}{h}}} \]
        9. Applied rewrites12.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 51.2% accurate, 0.5× speedup?

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

          1. Initial program 66.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. lift-/.f64N/A

              \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

              \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
            11. sqrt-divN/A

              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
            12. lower-unsound-/.f64N/A

              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
            13. lower-unsound-sqrt.f64N/A

              \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
            14. lower-*.f64N/A

              \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
            15. lower-unsound-sqrt.f64N/A

              \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
            16. lower-*.f6448.6%

              \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
          3. Applied rewrites48.6%

            \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
          4. Taylor expanded in d around -inf

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

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

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

              \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
            4. lower-*.f6426.3%

              \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
          6. Applied rewrites26.3%

            \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
          7. Applied rewrites26.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \color{blue}{1} \]
          8. Recombined 3 regimes into one program.
          9. Add Preprocessing

          Alternative 10: 48.3% accurate, 0.5× speedup?

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

            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. lift-/.f64N/A

                \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

                \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
              11. sqrt-divN/A

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              12. lower-unsound-/.f64N/A

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              13. lower-unsound-sqrt.f64N/A

                \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
              14. lower-*.f64N/A

                \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
              15. lower-unsound-sqrt.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
              16. lower-*.f6448.6%

                \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
            3. Applied rewrites48.6%

              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
            4. Taylor expanded in d around -inf

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

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

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

                \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
              4. lower-*.f6426.3%

                \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
            6. Applied rewrites26.3%

              \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
            7. Applied rewrites26.3%

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

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

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

                \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]
              3. lower-*.f6426.4%

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

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

            if -2e-107 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 2.0000000000000001e238

            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. lift-/.f64N/A

                \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

                \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
              11. sqrt-divN/A

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              12. lower-unsound-/.f64N/A

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              13. lower-unsound-sqrt.f64N/A

                \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
              14. lower-*.f64N/A

                \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
              15. lower-unsound-sqrt.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
              16. lower-*.f6448.6%

                \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
            3. Applied rewrites48.6%

              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
            4. Taylor expanded in d around -inf

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

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

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

                \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
              4. lower-*.f6426.3%

                \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
            6. Applied rewrites26.3%

              \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
            7. Applied rewrites26.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \color{blue}{1} \]
            8. Recombined 3 regimes into one program.
            9. Add Preprocessing

            Alternative 11: 44.7% accurate, 0.5× speedup?

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

              1. Initial program 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. lift-/.f64N/A

                  \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

                  \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
                11. sqrt-divN/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                12. lower-unsound-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                13. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
                14. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
                15. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
                16. lower-*.f6448.6%

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
              3. Applied rewrites48.6%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              4. Taylor expanded in d around -inf

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto -1 \cdot \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
                2. lower-/.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
                4. lower-*.f6426.3%

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
              6. Applied rewrites26.3%

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              7. Applied rewrites26.3%

                \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]
              8. Taylor expanded in d around inf

                \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
              9. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                2. lower-sqrt.f64N/A

                  \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]
                3. lower-*.f6426.4%

                  \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]
              10. Applied rewrites26.4%

                \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]

              if -1.9999999999999998e-96 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

              1. Initial program 66.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. lift-/.f64N/A

                  \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

                  \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
                11. sqrt-divN/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                12. lower-unsound-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                13. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
                14. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
                15. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
                16. lower-*.f6448.6%

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
              3. Applied rewrites48.6%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              4. Taylor expanded in d around -inf

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto -1 \cdot \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
                2. lower-/.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
                4. lower-*.f6426.3%

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
              6. Applied rewrites26.3%

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              7. Applied rewrites26.3%

                \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]
              8. Taylor expanded in l around -inf

                \[\leadsto \frac{d}{\color{blue}{\ell \cdot \sqrt{\frac{h}{\ell}}}} \]
              9. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{d}{\ell \cdot \color{blue}{\sqrt{\frac{h}{\ell}}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{d}{\ell \cdot \sqrt{\frac{h}{\ell}}} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \frac{d}{\ell \cdot \sqrt{\frac{h}{\ell}}} \]
                4. lower-/.f6439.6%

                  \[\leadsto \frac{d}{\ell \cdot \sqrt{\frac{h}{\ell}}} \]
              10. Applied rewrites39.6%

                \[\leadsto \frac{d}{\color{blue}{\ell \cdot \sqrt{\frac{h}{\ell}}}} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 12: 43.9% accurate, 0.5× speedup?

            \[\begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \frac{d}{\sqrt{h \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-107}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{d}{h \cdot \sqrt{\frac{\ell}{h}}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
            (FPCore (d h l M D)
             :precision binary64
             (let* ((t_0
                     (*
                      (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
                      (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
                    (t_1 (/ d (sqrt (* h l)))))
               (if (<= t_0 -2e-107)
                 t_1
                 (if (<= t_0 INFINITY) (/ d (* h (sqrt (/ l h)))) t_1))))
            double code(double d, double h, double l, double M, double D) {
            	double t_0 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
            	double t_1 = d / sqrt((h * l));
            	double tmp;
            	if (t_0 <= -2e-107) {
            		tmp = t_1;
            	} else if (t_0 <= ((double) INFINITY)) {
            		tmp = d / (h * sqrt((l / h)));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            public static double code(double d, double h, double l, double M, double D) {
            	double t_0 = (Math.pow((d / h), (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 = d / Math.sqrt((h * l));
            	double tmp;
            	if (t_0 <= -2e-107) {
            		tmp = t_1;
            	} else if (t_0 <= Double.POSITIVE_INFINITY) {
            		tmp = d / (h * Math.sqrt((l / h)));
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(d, h, l, M, D):
            	t_0 = (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
            	t_1 = d / math.sqrt((h * l))
            	tmp = 0
            	if t_0 <= -2e-107:
            		tmp = t_1
            	elif t_0 <= math.inf:
            		tmp = d / (h * math.sqrt((l / h)))
            	else:
            		tmp = t_1
            	return tmp
            
            function code(d, h, l, M, D)
            	t_0 = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
            	t_1 = Float64(d / sqrt(Float64(h * l)))
            	tmp = 0.0
            	if (t_0 <= -2e-107)
            		tmp = t_1;
            	elseif (t_0 <= Inf)
            		tmp = Float64(d / Float64(h * sqrt(Float64(l / h))));
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(d, h, l, M, D)
            	t_0 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
            	t_1 = d / sqrt((h * l));
            	tmp = 0.0;
            	if (t_0 <= -2e-107)
            		tmp = t_1;
            	elseif (t_0 <= Inf)
            		tmp = d / (h * sqrt((l / h)));
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-107], t$95$1, If[LessEqual[t$95$0, Infinity], N[(d / N[(h * N[Sqrt[N[(l / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
            t_1 := \frac{d}{\sqrt{h \cdot \ell}}\\
            \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-107}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t\_0 \leq \infty:\\
            \;\;\;\;\frac{d}{h \cdot \sqrt{\frac{\ell}{h}}}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -2e-107 or +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

              1. Initial program 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. lift-/.f64N/A

                  \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

                  \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
                11. sqrt-divN/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                12. lower-unsound-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                13. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
                14. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
                15. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
                16. lower-*.f6448.6%

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
              3. Applied rewrites48.6%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              4. Taylor expanded in d around -inf

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto -1 \cdot \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
                2. lower-/.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
                4. lower-*.f6426.3%

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
              6. Applied rewrites26.3%

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              7. Applied rewrites26.3%

                \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]
              8. Taylor expanded in d around inf

                \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
              9. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                2. lower-sqrt.f64N/A

                  \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]
                3. lower-*.f6426.4%

                  \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]
              10. Applied rewrites26.4%

                \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]

              if -2e-107 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

              1. Initial program 66.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. lift-/.f64N/A

                  \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

                  \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
                11. sqrt-divN/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                12. lower-unsound-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                13. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
                14. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
                15. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
                16. lower-*.f6448.6%

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
              3. Applied rewrites48.6%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              4. Taylor expanded in d around -inf

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto -1 \cdot \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
                2. lower-/.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
                4. lower-*.f6426.3%

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
              6. Applied rewrites26.3%

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              7. Applied rewrites26.3%

                \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]
              8. Taylor expanded in h around -inf

                \[\leadsto \frac{d}{\color{blue}{h \cdot \sqrt{\frac{\ell}{h}}}} \]
              9. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{d}{h \cdot \color{blue}{\sqrt{\frac{\ell}{h}}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{d}{h \cdot \sqrt{\frac{\ell}{h}}} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto \frac{d}{h \cdot \sqrt{\frac{\ell}{h}}} \]
                4. lower-/.f6439.3%

                  \[\leadsto \frac{d}{h \cdot \sqrt{\frac{\ell}{h}}} \]
              10. Applied rewrites39.3%

                \[\leadsto \frac{d}{\color{blue}{h \cdot \sqrt{\frac{\ell}{h}}}} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 13: 42.5% accurate, 6.7× speedup?

            \[\begin{array}{l} t_0 := \sqrt{h \cdot \ell}\\ \mathbf{if}\;\ell \leq -5.05 \cdot 10^{-231}:\\ \;\;\;\;\frac{-d}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{t\_0}\\ \end{array} \]
            (FPCore (d h l M D)
             :precision binary64
             (let* ((t_0 (sqrt (* h l)))) (if (<= l -5.05e-231) (/ (- d) t_0) (/ d t_0))))
            double code(double d, double h, double l, double M, double D) {
            	double t_0 = sqrt((h * l));
            	double tmp;
            	if (l <= -5.05e-231) {
            		tmp = -d / t_0;
            	} else {
            		tmp = d / t_0;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(d, h, l, m, d_1)
            use fmin_fmax_functions
                real(8), intent (in) :: d
                real(8), intent (in) :: h
                real(8), intent (in) :: l
                real(8), intent (in) :: m
                real(8), intent (in) :: d_1
                real(8) :: t_0
                real(8) :: tmp
                t_0 = sqrt((h * l))
                if (l <= (-5.05d-231)) then
                    tmp = -d / t_0
                else
                    tmp = d / t_0
                end if
                code = tmp
            end function
            
            public static double code(double d, double h, double l, double M, double D) {
            	double t_0 = Math.sqrt((h * l));
            	double tmp;
            	if (l <= -5.05e-231) {
            		tmp = -d / t_0;
            	} else {
            		tmp = d / t_0;
            	}
            	return tmp;
            }
            
            def code(d, h, l, M, D):
            	t_0 = math.sqrt((h * l))
            	tmp = 0
            	if l <= -5.05e-231:
            		tmp = -d / t_0
            	else:
            		tmp = d / t_0
            	return tmp
            
            function code(d, h, l, M, D)
            	t_0 = sqrt(Float64(h * l))
            	tmp = 0.0
            	if (l <= -5.05e-231)
            		tmp = Float64(Float64(-d) / t_0);
            	else
            		tmp = Float64(d / t_0);
            	end
            	return tmp
            end
            
            function tmp_2 = code(d, h, l, M, D)
            	t_0 = sqrt((h * l));
            	tmp = 0.0;
            	if (l <= -5.05e-231)
            		tmp = -d / t_0;
            	else
            		tmp = d / t_0;
            	end
            	tmp_2 = tmp;
            end
            
            code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -5.05e-231], N[((-d) / t$95$0), $MachinePrecision], N[(d / t$95$0), $MachinePrecision]]]
            
            \begin{array}{l}
            t_0 := \sqrt{h \cdot \ell}\\
            \mathbf{if}\;\ell \leq -5.05 \cdot 10^{-231}:\\
            \;\;\;\;\frac{-d}{t\_0}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{d}{t\_0}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if l < -5.0499999999999998e-231

              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. lift-/.f64N/A

                  \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

                  \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
                11. sqrt-divN/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                12. lower-unsound-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                13. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
                14. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
                15. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
                16. lower-*.f6448.6%

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
              3. Applied rewrites48.6%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              4. Taylor expanded in d around -inf

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto -1 \cdot \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
                2. lower-/.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
                4. lower-*.f6426.3%

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
              6. Applied rewrites26.3%

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              7. Applied rewrites26.3%

                \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]

              if -5.0499999999999998e-231 < 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. lift-/.f64N/A

                  \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

                  \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
                11. sqrt-divN/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                12. lower-unsound-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
                13. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
                14. lower-*.f64N/A

                  \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
                15. lower-unsound-sqrt.f64N/A

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
                16. lower-*.f6448.6%

                  \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
              3. Applied rewrites48.6%

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              4. Taylor expanded in d around -inf

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto -1 \cdot \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
                2. lower-/.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                3. lower-sqrt.f64N/A

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
                4. lower-*.f6426.3%

                  \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
              6. Applied rewrites26.3%

                \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
              7. Applied rewrites26.3%

                \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]
              8. Taylor expanded in d around inf

                \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
              9. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                2. lower-sqrt.f64N/A

                  \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]
                3. lower-*.f6426.4%

                  \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]
              10. Applied rewrites26.4%

                \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 14: 26.4% accurate, 10.2× speedup?

            \[\frac{d}{\sqrt{h \cdot \ell}} \]
            (FPCore (d h l M D) :precision binary64 (/ d (sqrt (* h l))))
            double code(double d, double h, double l, double M, double D) {
            	return d / sqrt((h * l));
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(d, h, l, m, d_1)
            use fmin_fmax_functions
                real(8), intent (in) :: d
                real(8), intent (in) :: h
                real(8), intent (in) :: l
                real(8), intent (in) :: m
                real(8), intent (in) :: d_1
                code = d / sqrt((h * l))
            end function
            
            public static double code(double d, double h, double l, double M, double D) {
            	return d / Math.sqrt((h * l));
            }
            
            def code(d, h, l, M, D):
            	return d / math.sqrt((h * l))
            
            function code(d, h, l, M, D)
            	return Float64(d / sqrt(Float64(h * l)))
            end
            
            function tmp = code(d, h, l, M, D)
            	tmp = d / sqrt((h * l));
            end
            
            code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
            
            \frac{d}{\sqrt{h \cdot \ell}}
            
            Derivation
            1. Initial program 66.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. lift-/.f64N/A

                \[\leadsto \sqrt{\frac{d}{h} \cdot \color{blue}{\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. frac-timesN/A

                \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \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) \]
              11. sqrt-divN/A

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              12. lower-unsound-/.f64N/A

                \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
              13. lower-unsound-sqrt.f64N/A

                \[\leadsto \frac{\color{blue}{\sqrt{d \cdot d}}}{\sqrt{h \cdot \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) \]
              14. lower-*.f64N/A

                \[\leadsto \frac{\sqrt{\color{blue}{d \cdot d}}}{\sqrt{h \cdot \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) \]
              15. lower-unsound-sqrt.f64N/A

                \[\leadsto \frac{\sqrt{d \cdot d}}{\color{blue}{\sqrt{h \cdot \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) \]
              16. lower-*.f6448.6%

                \[\leadsto \frac{\sqrt{d \cdot d}}{\sqrt{\color{blue}{h \cdot \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) \]
            3. Applied rewrites48.6%

              \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \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) \]
            4. Taylor expanded in d around -inf

              \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
            5. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto -1 \cdot \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
              2. lower-/.f64N/A

                \[\leadsto -1 \cdot \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
              3. lower-sqrt.f64N/A

                \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
              4. lower-*.f6426.3%

                \[\leadsto -1 \cdot \frac{d}{\sqrt{h \cdot \ell}} \]
            6. Applied rewrites26.3%

              \[\leadsto \color{blue}{-1 \cdot \frac{d}{\sqrt{h \cdot \ell}}} \]
            7. Applied rewrites26.3%

              \[\leadsto \color{blue}{\frac{-d}{\sqrt{h \cdot \ell}}} \]
            8. Taylor expanded in d around inf

              \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
            9. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
              2. lower-sqrt.f64N/A

                \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]
              3. lower-*.f6426.4%

                \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \]
            10. Applied rewrites26.4%

              \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
            11. Add Preprocessing

            Reproduce

            ?
            herbie shell --seed 2025189 
            (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)))))