Henrywood and Agarwal, Equation (12)

Percentage Accurate: 67.1% → 87.8%
Time: 10.1s
Alternatives: 12
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 12 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: 67.1% accurate, 1.0× speedup?

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

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

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

Alternative 1: 87.8% 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 := \frac{D}{d + d}\\ t_2 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot t\_0\\ t_3 := \frac{\mathsf{fma}\left(\frac{M \cdot D}{\left(d + d\right) \cdot \ell}, -0.25 \cdot \left(h \cdot \frac{M \cdot D}{d}\right), 1\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}\\ t_4 := \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{if}\;t\_2 \leq -4 \cdot 10^{-241}:\\ \;\;\;\;t\_4 \cdot \left(1 - \left(t\_1 \cdot M\right) \cdot \left(\left(t\_1 \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right)\\ \mathbf{elif}\;t\_2 \leq 10^{-196}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;t\_4 \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 (/ D (+ d d)))
        (t_2 (* (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))) t_0))
        (t_3
         (/
          (*
           (fma (/ (* M D) (* (+ d d) l)) (* -0.25 (* h (/ (* M D) d))) 1.0)
           (fabs d))
          (sqrt (* h l))))
        (t_4 (* (sqrt (/ d l)) (sqrt (/ d h)))))
   (if (<= t_2 -4e-241)
     (* t_4 (- 1.0 (* (* t_1 M) (* (* t_1 (* M 0.5)) (/ h l)))))
     (if (<= t_2 1e-196) t_3 (if (<= t_2 5e+262) (* t_4 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 = D / (d + d);
	double t_2 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * t_0;
	double t_3 = (fma(((M * D) / ((d + d) * l)), (-0.25 * (h * ((M * D) / d))), 1.0) * fabs(d)) / sqrt((h * l));
	double t_4 = sqrt((d / l)) * sqrt((d / h));
	double tmp;
	if (t_2 <= -4e-241) {
		tmp = t_4 * (1.0 - ((t_1 * M) * ((t_1 * (M * 0.5)) * (h / l))));
	} else if (t_2 <= 1e-196) {
		tmp = t_3;
	} else if (t_2 <= 5e+262) {
		tmp = t_4 * 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 / Float64(d + d))
	t_2 = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * t_0)
	t_3 = Float64(Float64(fma(Float64(Float64(M * D) / Float64(Float64(d + d) * l)), Float64(-0.25 * Float64(h * Float64(Float64(M * D) / d))), 1.0) * abs(d)) / sqrt(Float64(h * l)))
	t_4 = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)))
	tmp = 0.0
	if (t_2 <= -4e-241)
		tmp = Float64(t_4 * Float64(1.0 - Float64(Float64(t_1 * M) * Float64(Float64(t_1 * Float64(M * 0.5)) * Float64(h / l)))));
	elseif (t_2 <= 1e-196)
		tmp = t_3;
	elseif (t_2 <= 5e+262)
		tmp = Float64(t_4 * 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[(D / N[(d + d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(M * D), $MachinePrecision] / N[(N[(d + d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * N[(-0.25 * N[(h * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Abs[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e-241], N[(t$95$4 * N[(1.0 - N[(N[(t$95$1 * M), $MachinePrecision] * N[(N[(t$95$1 * N[(M * 0.5), $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-196], t$95$3, If[LessEqual[t$95$2, 5e+262], N[(t$95$4 * 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 := \frac{D}{d + d}\\
t_2 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot t\_0\\
t_3 := \frac{\mathsf{fma}\left(\frac{M \cdot D}{\left(d + d\right) \cdot \ell}, -0.25 \cdot \left(h \cdot \frac{M \cdot D}{d}\right), 1\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}\\
t_4 := \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{-241}:\\
\;\;\;\;t\_4 \cdot \left(1 - \left(t\_1 \cdot M\right) \cdot \left(\left(t\_1 \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)\right)\\

\mathbf{elif}\;t\_2 \leq 10^{-196}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;t\_4 \cdot t\_0\\

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


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

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. *-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{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. lower-*.f6468.5%

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

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

        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. pow1/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{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. lift-sqrt.f6468.5%

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

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

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

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

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

    if -3.9999999999999999e-241 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 1e-196 or 5.0000000000000001e262 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e-196 < (*.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)))) < 5.0000000000000001e262

    1. Initial program 67.1%

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

        \[\leadsto \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-*.f6467.1%

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

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

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

      \[\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 3 regimes into one program.
  4. Add Preprocessing

Alternative 2: 87.6% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_3 \leq 10^{-196}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;t\_1 \cdot t\_0\\

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


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

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      2. *-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{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      3. lower-*.f6468.5%

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

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

        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      7. pow1/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{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot \frac{1}{2}\right)\right) \cdot \frac{h}{\ell}\right)\right) \]
      8. lift-sqrt.f6468.5%

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

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

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

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

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

    if -3.9999999999999999e-241 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 1e-196 or 5.0000000000000001e262 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e-196 < (*.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)))) < 5.0000000000000001e262

    1. Initial program 67.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\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.9%

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

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

Alternative 3: 84.3% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{t\_2}{\left(d + d\right) \cdot \ell}, -0.25 \cdot \left(h \cdot \frac{t\_2}{d}\right), 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)))) < 1e-196

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e-196 < (*.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)))) < 5.0000000000000001e262

    1. Initial program 67.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\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.9%

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

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

    if 5.0000000000000001e262 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 84.3% 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{\mathsf{fma}\left(\frac{M \cdot D}{\left(d + d\right) \cdot \ell}, -0.25 \cdot \left(h \cdot \frac{M \cdot D}{d}\right), 1\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq 10^{-196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\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 (/ (* M D) (* (+ d d) l)) (* -0.25 (* h (/ (* M D) d))) 1.0)
           (fabs d))
          (sqrt (* h l)))))
   (if (<= t_0 1e-196)
     t_1
     (if (<= t_0 5e+262) (* (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(((M * D) / ((d + d) * l)), (-0.25 * (h * ((M * D) / d))), 1.0) * fabs(d)) / sqrt((h * l));
	double tmp;
	if (t_0 <= 1e-196) {
		tmp = t_1;
	} else if (t_0 <= 5e+262) {
		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(M * D) / Float64(Float64(d + d) * l)), Float64(-0.25 * Float64(h * Float64(Float64(M * D) / d))), 1.0) * abs(d)) / sqrt(Float64(h * l)))
	tmp = 0.0
	if (t_0 <= 1e-196)
		tmp = t_1;
	elseif (t_0 <= 5e+262)
		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[(M * D), $MachinePrecision] / N[(N[(d + d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * N[(-0.25 * N[(h * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[Abs[d], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e-196], t$95$1, If[LessEqual[t$95$0, 5e+262], 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{M \cdot D}{\left(d + d\right) \cdot \ell}, -0.25 \cdot \left(h \cdot \frac{M \cdot D}{d}\right), 1\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq 10^{-196}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\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)))) < 1e-196 or 5.0000000000000001e262 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e-196 < (*.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)))) < 5.0000000000000001e262

    1. Initial program 67.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\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.9%

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

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

Alternative 5: 79.4% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t\_5 \leq 10^{-196}:\\
\;\;\;\;\frac{\left|d\right|}{t\_0}\\

\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(1 - t\_3 \cdot \frac{t\_1 \cdot \left(h \cdot t\_6\right)}{t\_2}\right) \cdot \left|d\right|}{t\_0}\\


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

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.6%

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.6%

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

    if 1e-196 < (*.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)))) < 5.0000000000000001e262

    1. Initial program 67.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\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.9%

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

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

    if 5.0000000000000001e262 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 79.2% accurate, 0.3× speedup?

\[\begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ t_1 := 1 - \frac{\left(h \cdot \left(M \cdot D\right)\right) \cdot \left(\left(M \cdot D\right) \cdot 0.25\right)}{\left(\left(d + d\right) \cdot \ell\right) \cdot d}\\ t_2 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-243}:\\ \;\;\;\;\frac{\left|d\right|}{t\_0} \cdot t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{-196}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left|d\right| \cdot \frac{t\_1}{t\_0}\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (* l h)))
        (t_1
         (- 1.0 (/ (* (* h (* M D)) (* (* M D) 0.25)) (* (* (+ d d) l) d))))
        (t_2
         (*
          (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
          (-
           1.0
           (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))))
   (if (<= t_2 -1e-243)
     (* (/ (fabs d) t_0) t_1)
     (if (<= t_2 1e-196)
       (/ (fabs d) (sqrt (* h l)))
       (if (<= t_2 5e+262)
         (* (sqrt (/ d h)) (sqrt (/ d l)))
         (* (fabs d) (/ t_1 t_0)))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((l * h));
	double t_1 = 1.0 - (((h * (M * D)) * ((M * D) * 0.25)) / (((d + d) * l) * d));
	double t_2 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
	double tmp;
	if (t_2 <= -1e-243) {
		tmp = (fabs(d) / t_0) * t_1;
	} else if (t_2 <= 1e-196) {
		tmp = fabs(d) / sqrt((h * l));
	} else if (t_2 <= 5e+262) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else {
		tmp = fabs(d) * (t_1 / t_0);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\mathbf{elif}\;t\_2 \leq 10^{-196}:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

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


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

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.6%

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.6%

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

    if 1e-196 < (*.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)))) < 5.0000000000000001e262

    1. Initial program 67.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\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.9%

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

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

    if 5.0000000000000001e262 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 79.0% accurate, 0.3× speedup?

\[\begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \left|d\right| \cdot \frac{1 - \frac{\left(h \cdot \left(M \cdot D\right)\right) \cdot \left(\left(M \cdot D\right) \cdot 0.25\right)}{\left(\left(d + d\right) \cdot \ell\right) \cdot d}}{\sqrt{\ell \cdot h}}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-243}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 10^{-196}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\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)
          (/
           (- 1.0 (/ (* (* h (* M D)) (* (* M D) 0.25)) (* (* (+ d d) l) d)))
           (sqrt (* l h))))))
   (if (<= t_0 -1e-243)
     t_1
     (if (<= t_0 1e-196)
       (/ (fabs d) (sqrt (* h l)))
       (if (<= t_0 5e+262) (* (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) * ((1.0 - (((h * (M * D)) * ((M * D) * 0.25)) / (((d + d) * l) * d))) / sqrt((l * h)));
	double tmp;
	if (t_0 <= -1e-243) {
		tmp = t_1;
	} else if (t_0 <= 1e-196) {
		tmp = fabs(d) / sqrt((h * l));
	} else if (t_0 <= 5e+262) {
		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) * ((1.0d0 - (((h * (m * d_1)) * ((m * d_1) * 0.25d0)) / (((d + d) * l) * d))) / sqrt((l * h)))
    if (t_0 <= (-1d-243)) then
        tmp = t_1
    else if (t_0 <= 1d-196) then
        tmp = abs(d) / sqrt((h * l))
    else if (t_0 <= 5d+262) 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) * ((1.0 - (((h * (M * D)) * ((M * D) * 0.25)) / (((d + d) * l) * d))) / Math.sqrt((l * h)));
	double tmp;
	if (t_0 <= -1e-243) {
		tmp = t_1;
	} else if (t_0 <= 1e-196) {
		tmp = Math.abs(d) / Math.sqrt((h * l));
	} else if (t_0 <= 5e+262) {
		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) * ((1.0 - (((h * (M * D)) * ((M * D) * 0.25)) / (((d + d) * l) * d))) / math.sqrt((l * h)))
	tmp = 0
	if t_0 <= -1e-243:
		tmp = t_1
	elif t_0 <= 1e-196:
		tmp = math.fabs(d) / math.sqrt((h * l))
	elif t_0 <= 5e+262:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	else:
		tmp = t_1
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
	t_1 = Float64(abs(d) * Float64(Float64(1.0 - Float64(Float64(Float64(h * Float64(M * D)) * Float64(Float64(M * D) * 0.25)) / Float64(Float64(Float64(d + d) * l) * d))) / sqrt(Float64(l * h))))
	tmp = 0.0
	if (t_0 <= -1e-243)
		tmp = t_1;
	elseif (t_0 <= 1e-196)
		tmp = Float64(abs(d) / sqrt(Float64(h * l)));
	elseif (t_0 <= 5e+262)
		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) * ((1.0 - (((h * (M * D)) * ((M * D) * 0.25)) / (((d + d) * l) * d))) / sqrt((l * h)));
	tmp = 0.0;
	if (t_0 <= -1e-243)
		tmp = t_1;
	elseif (t_0 <= 1e-196)
		tmp = abs(d) / sqrt((h * l));
	elseif (t_0 <= 5e+262)
		tmp = sqrt((d / h)) * sqrt((d / l));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[d], $MachinePrecision] * N[(N[(1.0 - N[(N[(N[(h * N[(M * D), $MachinePrecision]), $MachinePrecision] * N[(N[(M * D), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(d + d), $MachinePrecision] * l), $MachinePrecision] * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-243], t$95$1, If[LessEqual[t$95$0, 1e-196], N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+262], 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 := \left|d\right| \cdot \frac{1 - \frac{\left(h \cdot \left(M \cdot D\right)\right) \cdot \left(\left(M \cdot D\right) \cdot 0.25\right)}{\left(\left(d + d\right) \cdot \ell\right) \cdot d}}{\sqrt{\ell \cdot h}}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 10^{-196}:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -1e-243 or 5.0000000000000001e262 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.6%

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.6%

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

    if 1e-196 < (*.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)))) < 5.0000000000000001e262

    1. Initial program 67.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\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.9%

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

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

Alternative 8: 69.8% accurate, 0.3× speedup?

\[\begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-72}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \left(1 - \left(\frac{\left(\left(M \cdot D\right) \cdot D\right) \cdot \frac{h}{\ell}}{d \cdot d} \cdot 0.125\right) \cdot M\right)\\ \mathbf{elif}\;t\_0 \leq 10^{-196}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0
         (*
          (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
          (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
        (t_1 (/ (fabs d) (sqrt (* h l)))))
   (if (<= t_0 -5e-72)
     (*
      (/ (fabs d) (sqrt (* l h)))
      (- 1.0 (* (* (/ (* (* (* M D) D) (/ h l)) (* d d)) 0.125) M)))
     (if (<= t_0 1e-196)
       t_1
       (if (<= t_0 5e+262) (* (sqrt (/ d h)) (sqrt (/ d l))) t_1)))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
	double t_1 = fabs(d) / sqrt((h * l));
	double tmp;
	if (t_0 <= -5e-72) {
		tmp = (fabs(d) / sqrt((l * h))) * (1.0 - ((((((M * D) * D) * (h / l)) / (d * d)) * 0.125) * M));
	} else if (t_0 <= 1e-196) {
		tmp = t_1;
	} else if (t_0 <= 5e+262) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
    t_1 = abs(d) / sqrt((h * l))
    if (t_0 <= (-5d-72)) then
        tmp = (abs(d) / sqrt((l * h))) * (1.0d0 - ((((((m * d_1) * d_1) * (h / l)) / (d * d)) * 0.125d0) * m))
    else if (t_0 <= 1d-196) then
        tmp = t_1
    else if (t_0 <= 5d+262) then
        tmp = sqrt((d / h)) * sqrt((d / l))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
	double t_1 = Math.abs(d) / Math.sqrt((h * l));
	double tmp;
	if (t_0 <= -5e-72) {
		tmp = (Math.abs(d) / Math.sqrt((l * h))) * (1.0 - ((((((M * D) * D) * (h / l)) / (d * d)) * 0.125) * M));
	} else if (t_0 <= 1e-196) {
		tmp = t_1;
	} else if (t_0 <= 5e+262) {
		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
	t_1 = math.fabs(d) / math.sqrt((h * l))
	tmp = 0
	if t_0 <= -5e-72:
		tmp = (math.fabs(d) / math.sqrt((l * h))) * (1.0 - ((((((M * D) * D) * (h / l)) / (d * d)) * 0.125) * M))
	elif t_0 <= 1e-196:
		tmp = t_1
	elif t_0 <= 5e+262:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	else:
		tmp = t_1
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
	t_1 = Float64(abs(d) / sqrt(Float64(h * l)))
	tmp = 0.0
	if (t_0 <= -5e-72)
		tmp = Float64(Float64(abs(d) / sqrt(Float64(l * h))) * Float64(1.0 - Float64(Float64(Float64(Float64(Float64(Float64(M * D) * D) * Float64(h / l)) / Float64(d * d)) * 0.125) * M)));
	elseif (t_0 <= 1e-196)
		tmp = t_1;
	elseif (t_0 <= 5e+262)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
	t_1 = abs(d) / sqrt((h * l));
	tmp = 0.0;
	if (t_0 <= -5e-72)
		tmp = (abs(d) / sqrt((l * h))) * (1.0 - ((((((M * D) * D) * (h / l)) / (d * d)) * 0.125) * M));
	elseif (t_0 <= 1e-196)
		tmp = t_1;
	elseif (t_0 <= 5e+262)
		tmp = sqrt((d / h)) * sqrt((d / l));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-72], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(N[(N[(M * D), $MachinePrecision] * D), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision] * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-196], t$95$1, If[LessEqual[t$95$0, 5e+262], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
t_1 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{-72}:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \left(1 - \left(\frac{\left(\left(M \cdot D\right) \cdot D\right) \cdot \frac{h}{\ell}}{d \cdot d} \cdot 0.125\right) \cdot M\right)\\

\mathbf{elif}\;t\_0 \leq 10^{-196}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\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)))) < -4.9999999999999996e-72

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999996e-72 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 1e-196 or 5.0000000000000001e262 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.6%

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.6%

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

    if 1e-196 < (*.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)))) < 5.0000000000000001e262

    1. Initial program 67.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\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.9%

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

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

Alternative 9: 67.6% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_0 \leq 10^{-196}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\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)))) < -4.9999999999999996e-72

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

    if -4.9999999999999996e-72 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 1e-196 or 5.0000000000000001e262 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.6%

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.6%

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

    if 1e-196 < (*.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)))) < 5.0000000000000001e262

    1. Initial program 67.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\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.9%

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

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

Alternative 10: 52.8% accurate, 0.3× speedup?

\[\begin{array}{l} t_0 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ t_1 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-72}:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;t\_1 \leq 10^{-196}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ (fabs d) (sqrt (* h l))))
        (t_1
         (*
          (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
          (-
           1.0
           (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))))
   (if (<= t_1 -5e-72)
     (* d (sqrt (/ 1.0 (* h l))))
     (if (<= t_1 1e-196)
       t_0
       (if (<= t_1 5e+262) (* (sqrt (/ d h)) (sqrt (/ d l))) t_0)))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = fabs(d) / sqrt((h * l));
	double t_1 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
	double tmp;
	if (t_1 <= -5e-72) {
		tmp = d * sqrt((1.0 / (h * l)));
	} else if (t_1 <= 1e-196) {
		tmp = t_0;
	} else if (t_1 <= 5e+262) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else {
		tmp = t_0;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(d, h, l, m, d_1)
use fmin_fmax_functions
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = abs(d) / sqrt((h * l))
    t_1 = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
    if (t_1 <= (-5d-72)) then
        tmp = d * sqrt((1.0d0 / (h * l)))
    else if (t_1 <= 1d-196) then
        tmp = t_0
    else if (t_1 <= 5d+262) then
        tmp = sqrt((d / h)) * sqrt((d / l))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.abs(d) / Math.sqrt((h * l));
	double t_1 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
	double tmp;
	if (t_1 <= -5e-72) {
		tmp = d * Math.sqrt((1.0 / (h * l)));
	} else if (t_1 <= 1e-196) {
		tmp = t_0;
	} else if (t_1 <= 5e+262) {
		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = math.fabs(d) / math.sqrt((h * l))
	t_1 = (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
	tmp = 0
	if t_1 <= -5e-72:
		tmp = d * math.sqrt((1.0 / (h * l)))
	elif t_1 <= 1e-196:
		tmp = t_0
	elif t_1 <= 5e+262:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	else:
		tmp = t_0
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(abs(d) / sqrt(Float64(h * l)))
	t_1 = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
	tmp = 0.0
	if (t_1 <= -5e-72)
		tmp = Float64(d * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (t_1 <= 1e-196)
		tmp = t_0;
	elseif (t_1 <= 5e+262)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = abs(d) / sqrt((h * l));
	t_1 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
	tmp = 0.0;
	if (t_1 <= -5e-72)
		tmp = d * sqrt((1.0 / (h * l)));
	elseif (t_1 <= 1e-196)
		tmp = t_0;
	elseif (t_1 <= 5e+262)
		tmp = sqrt((d / h)) * sqrt((d / l));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-72], N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-196], t$95$0, If[LessEqual[t$95$1, 5e+262], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
t_0 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\
t_1 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-72}:\\
\;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;t\_1 \leq 10^{-196}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

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


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

    1. Initial program 67.1%

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

        \[\leadsto \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. lower-sqrt.f64N/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) \]
      9. 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) \]
      10. mult-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{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) \]
      23. lower-*.f6451.5%

        \[\leadsto \sqrt{d \cdot \frac{d}{\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 rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \]
      5. distribute-rgt-neg-inN/A

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

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \]
      7. lower-neg.f6426.4%

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

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

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

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

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

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

        \[\leadsto d \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
    11. Applied rewrites27.1%

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

    if -4.9999999999999996e-72 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 1e-196 or 5.0000000000000001e262 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.6%

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.6%

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

    if 1e-196 < (*.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)))) < 5.0000000000000001e262

    1. Initial program 67.1%

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

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

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

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

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

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

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

      \[\leadsto \frac{\left(d \cdot \sqrt{\frac{h}{d}}\right) \cdot \sqrt{\frac{d}{\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.9%

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

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

Alternative 11: 46.8% accurate, 0.9× speedup?

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

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

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

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


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

    1. Initial program 67.1%

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

        \[\leadsto \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. lower-sqrt.f64N/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) \]
      9. 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) \]
      10. mult-flipN/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{d \cdot \color{blue}{\frac{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) \]
      23. lower-*.f6451.5%

        \[\leadsto \sqrt{d \cdot \frac{d}{\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 rewrites51.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\sqrt{\frac{1}{h \cdot \ell}} \cdot d\right) \]
      5. distribute-rgt-neg-inN/A

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

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(\mathsf{neg}\left(d\right)\right)} \]
      7. lower-neg.f6426.4%

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

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

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

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

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

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

        \[\leadsto d \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
    11. Applied rewrites27.1%

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

    if -4.9999999999999996e-72 < (*.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
      4. lower-*.f6443.6%

        \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    9. Applied rewrites43.6%

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

Alternative 12: 43.6% accurate, 9.2× speedup?

\[\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
(FPCore (d h l M D) :precision binary64 (/ (fabs d) (sqrt (* h l))))
double code(double d, double h, double l, double M, double D) {
	return fabs(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 = abs(d) / sqrt((h * l))
end function
public static double code(double d, double h, double l, double M, double D) {
	return Math.abs(d) / Math.sqrt((h * l));
}
def code(d, h, l, M, D):
	return math.fabs(d) / math.sqrt((h * l))
function code(d, h, l, M, D)
	return Float64(abs(d) / sqrt(Float64(h * l)))
end
function tmp = code(d, h, l, M, D)
	tmp = abs(d) / sqrt((h * l));
end
code[d_, h_, l_, M_, D_] := N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\frac{\left|d\right|}{\sqrt{h \cdot \ell}}
Derivation
  1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{d + d} \cdot M\right) \cdot \left(\left(\frac{D}{d + d} \cdot \left(M \cdot 0.5\right)\right) \cdot \frac{h}{\ell}\right)}\right) \]
  4. Applied rewrites75.5%

    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \left(1 - \frac{\left(M \cdot D\right) \cdot \left(\left(\frac{M \cdot D}{d} \cdot 0.25\right) \cdot h\right)}{\left(d + d\right) \cdot \ell}\right)} \]
  5. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot \left(1 - \frac{\left(M \cdot D\right) \cdot \left(\left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right) \cdot h\right)}{\left(d + d\right) \cdot \ell}\right)} \]
    2. lift-/.f64N/A

      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \cdot \left(1 - \frac{\left(M \cdot D\right) \cdot \left(\left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right) \cdot h\right)}{\left(d + d\right) \cdot \ell}\right) \]
    3. associate-*l/N/A

      \[\leadsto \color{blue}{\frac{\left|d\right| \cdot \left(1 - \frac{\left(M \cdot D\right) \cdot \left(\left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right) \cdot h\right)}{\left(d + d\right) \cdot \ell}\right)}{\sqrt{\ell \cdot h}}} \]
    4. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{\left|d\right| \cdot \left(1 - \frac{\left(M \cdot D\right) \cdot \left(\left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right) \cdot h\right)}{\left(d + d\right) \cdot \ell}\right)}{\sqrt{\ell \cdot h}}} \]
  6. Applied rewrites78.0%

    \[\leadsto \color{blue}{\frac{\left(1 - \left(\left(0.25 \cdot \frac{D \cdot M}{d}\right) \cdot h\right) \cdot \frac{D \cdot M}{\left(d + d\right) \cdot \ell}\right) \cdot \left|d\right|}{\sqrt{h \cdot \ell}}} \]
  7. Taylor expanded in d around inf

    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
  8. Step-by-step derivation
    1. lower-/.f64N/A

      \[\leadsto \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell}}} \]
    2. lower-fabs.f64N/A

      \[\leadsto \frac{\left|d\right|}{\sqrt{\color{blue}{h \cdot \ell}}} \]
    3. lower-sqrt.f64N/A

      \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
    4. lower-*.f6443.6%

      \[\leadsto \frac{\left|d\right|}{\sqrt{h \cdot \ell}} \]
  9. Applied rewrites43.6%

    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}} \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2025204 
(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)))))