Henrywood and Agarwal, Equation (12)

Percentage Accurate: 65.7% → 84.1%
Time: 11.9s
Alternatives: 27
Speedup: 1.9×

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 27 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: 65.7% accurate, 1.0× speedup?

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

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

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

Alternative 1: 84.1% accurate, 1.4× speedup?

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if h < -1.6200000000000001e156

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}}\right) \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. mult-flipN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\left(\mathsf{neg}\left(d\right)\right) \cdot \frac{1}{\mathsf{neg}\left(h\right)}}}\right) \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. sqrt-prodN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(h\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) \]
      6. lower-unsound-*.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(h\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) \]
      7. lower-unsound-sqrt.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(h\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) \]
      8. lower-neg.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\color{blue}{-d}} \cdot \sqrt{\frac{1}{\mathsf{neg}\left(h\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) \]
      9. lower-unsound-sqrt.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{-d} \cdot \color{blue}{\sqrt{\frac{1}{\mathsf{neg}\left(h\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) \]
      10. metadata-evalN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\mathsf{neg}\left(h\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) \]
      11. metadata-evalN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)}{\mathsf{neg}\left(h\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) \]
      12. frac-2neg-revN/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(1\right)}{h}}}\right)\right) \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-/.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{-d} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(1\right)}{h}}}\right)\right) \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. metadata-eval37.2%

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{-d} \cdot \sqrt{\frac{\color{blue}{-1}}{h}}\right)\right) \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. Applied rewrites37.2%

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

    if -1.6200000000000001e156 < h < 1.2e-304

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2e-304 < h

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.1% accurate, 1.4× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if h < -1.6200000000000001e156

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}}\right) \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. sqrt-divN/A

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

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(h\right)}}}\right) \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. lower-unsound-sqrt.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \frac{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}{\sqrt{\mathsf{neg}\left(h\right)}}\right) \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. lower-neg.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \frac{\sqrt{\color{blue}{-d}}}{\sqrt{\mathsf{neg}\left(h\right)}}\right) \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-unsound-sqrt.f64N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \frac{\sqrt{-d}}{\color{blue}{\sqrt{\mathsf{neg}\left(h\right)}}}\right) \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. lower-neg.f6437.2%

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \frac{\sqrt{-d}}{\sqrt{\color{blue}{-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) \]
    5. Applied rewrites37.2%

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

    if -1.6200000000000001e156 < h < 1.2e-304

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2e-304 < h

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 82.8% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(t\_5, \frac{\left(0.25 \cdot \frac{t\_3}{d}\right) \cdot h}{\ell}, 1\right)\\


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

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
        5. lower-/.f6439.0%

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

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

      if 9.9999999999999993e158 < (*.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 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 82.4% accurate, 0.4× speedup?

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

      1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
          5. lower-/.f6439.0%

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

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

        if 9.9999999999999993e158 < (*.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 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 82.1% accurate, 1.9× speedup?

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

        1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.2e-304 < h

        1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 81.0% accurate, 0.4× speedup?

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

        1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
            5. lower-/.f6439.0%

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

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

          if 9.9999999999999993e158 < (*.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 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 80.9% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
              5. lower-/.f6439.0%

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

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

          Alternative 8: 80.7% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                5. lower-/.f6439.0%

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

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

            Alternative 9: 80.5% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                  5. lower-/.f6439.0%

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

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

              Alternative 10: 79.2% accurate, 0.4× speedup?

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

                1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                    5. lower-/.f6439.0%

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

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

                  if 9.9999999999999993e158 < (*.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 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                      5. lower-/.f6439.0%

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

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

                    if 9.9999999999999993e158 < (*.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 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 12: 77.6% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                        5. lower-/.f6439.0%

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

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

                    Alternative 13: 72.8% accurate, 0.3× speedup?

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

                      1. Initial program 65.7%

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

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

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

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

                        \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                      5. Applied rewrites29.8%

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

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

                      1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                          2. mult-flipN/A

                            \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                          3. *-commutativeN/A

                            \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                          4. lower-*.f64N/A

                            \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                          5. lower-/.f6439.0%

                            \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                        3. Applied rewrites39.0%

                          \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                        if 9.9999999999999993e158 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                        1. Initial program 65.7%

                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        2. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          2. *-commutativeN/A

                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          3. lower-*.f6465.7%

                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          4. lift-pow.f64N/A

                            \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          5. lift-/.f64N/A

                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          6. metadata-evalN/A

                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          7. unpow1/2N/A

                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          8. lower-sqrt.f6465.7%

                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          9. lift-pow.f64N/A

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          10. lift-/.f64N/A

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          11. metadata-evalN/A

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          12. unpow1/2N/A

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                          13. lower-sqrt.f6465.7%

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        3. Applied rewrites65.7%

                          \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                        4. Taylor expanded in d around inf

                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                        5. Step-by-step derivation
                          1. Applied rewrites39.0%

                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                          2. Step-by-step derivation
                            1. Applied rewrites43.2%

                              \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]

                            if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                            1. Initial program 65.7%

                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            2. Taylor expanded in d around 0

                              \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                            3. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                              2. lower-/.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                            4. Applied rewrites18.1%

                              \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                            5. Step-by-step derivation
                              1. lift-/.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                              2. lift-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2}} \cdot \ell} \]
                              3. lift-pow.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                              4. pow2N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                              5. lift-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                              6. lift-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \color{blue}{\ell}} \]
                              7. lift-pow.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell} \]
                              8. pow2N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(d \cdot d\right) \cdot \ell} \]
                              9. associate-*l*N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}} \]
                              10. *-commutativeN/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \left(\ell \cdot \color{blue}{d}\right)} \]
                              11. *-commutativeN/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(\ell \cdot d\right) \cdot \color{blue}{d}} \]
                              12. times-fracN/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                              13. lower-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                              14. lower-/.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\color{blue}{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                              15. lower-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \color{blue}{\left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                              16. lower-/.f6424.2%

                                \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{\color{blue}{d}}\right) \]
                            6. Applied rewrites27.7%

                              \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right) \]
                            7. Step-by-step derivation
                              1. lift-/.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{\color{blue}{d}}\right) \]
                              2. lift-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \]
                              3. associate-/l*N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right) \]
                              4. lift-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                              5. lift-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}}}{d}\right)\right) \]
                              6. associate-*l*N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot \left(M \cdot h\right)\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                              7. associate-*l*N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                              8. lower-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                              9. lower-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right)\right) \]
                              10. lower-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right)\right) \]
                              11. lift-/.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)\right)\right) \]
                              12. associate-/l/N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                              13. lower-/.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                              14. lower-*.f6431.8%

                                \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot \color{blue}{d}}\right)\right)\right) \]
                              15. lift-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot d}\right)\right)\right) \]
                              16. *-commutativeN/A

                                \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                              17. lower-*.f6431.8%

                                \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                            8. Applied rewrites31.8%

                              \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)}\right)\right) \]
                          3. Recombined 4 regimes into one program.
                          4. Add Preprocessing

                          Alternative 14: 72.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 := \sqrt{\ell \cdot h}\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-80}:\\ \;\;\;\;\frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot M\right) \cdot D\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d}\\ \mathbf{elif}\;t\_0 \leq 10^{+159}:\\ \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{\left|d\right|}{t\_1} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;-0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{t\_1 \cdot d}\right)\right)\right)\\ \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 (sqrt (* l h))))
                            (if (<= t_0 -1e-80)
                              (/
                               (/
                                (*
                                 (* -0.125 (* (* (* D M) D) M))
                                 (* (/ (fabs d) (sqrt (* h l))) h))
                                (* l d))
                               d)
                              (if (<= t_0 1e+159)
                                (* (* (sqrt (* (/ 1.0 l) d)) (sqrt (/ d h))) 1.0)
                                (if (<= t_0 INFINITY)
                                  (* (/ (fabs d) t_1) 1.0)
                                  (*
                                   -0.125
                                   (*
                                    (/ (* D D) (* l d))
                                    (* M (* (* M h) (/ (fabs d) (* t_1 d)))))))))))
                          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 = sqrt((l * h));
                          	double tmp;
                          	if (t_0 <= -1e-80) {
                          		tmp = (((-0.125 * (((D * M) * D) * M)) * ((fabs(d) / sqrt((h * l))) * h)) / (l * d)) / d;
                          	} else if (t_0 <= 1e+159) {
                          		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                          	} else if (t_0 <= ((double) INFINITY)) {
                          		tmp = (fabs(d) / t_1) * 1.0;
                          	} else {
                          		tmp = -0.125 * (((D * D) / (l * d)) * (M * ((M * h) * (fabs(d) / (t_1 * d)))));
                          	}
                          	return tmp;
                          }
                          
                          public static double code(double d, double h, double l, double M, double D) {
                          	double t_0 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                          	double t_1 = Math.sqrt((l * h));
                          	double tmp;
                          	if (t_0 <= -1e-80) {
                          		tmp = (((-0.125 * (((D * M) * D) * M)) * ((Math.abs(d) / Math.sqrt((h * l))) * h)) / (l * d)) / d;
                          	} else if (t_0 <= 1e+159) {
                          		tmp = (Math.sqrt(((1.0 / l) * d)) * Math.sqrt((d / h))) * 1.0;
                          	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                          		tmp = (Math.abs(d) / t_1) * 1.0;
                          	} else {
                          		tmp = -0.125 * (((D * D) / (l * d)) * (M * ((M * h) * (Math.abs(d) / (t_1 * d)))));
                          	}
                          	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.sqrt((l * h))
                          	tmp = 0
                          	if t_0 <= -1e-80:
                          		tmp = (((-0.125 * (((D * M) * D) * M)) * ((math.fabs(d) / math.sqrt((h * l))) * h)) / (l * d)) / d
                          	elif t_0 <= 1e+159:
                          		tmp = (math.sqrt(((1.0 / l) * d)) * math.sqrt((d / h))) * 1.0
                          	elif t_0 <= math.inf:
                          		tmp = (math.fabs(d) / t_1) * 1.0
                          	else:
                          		tmp = -0.125 * (((D * D) / (l * d)) * (M * ((M * h) * (math.fabs(d) / (t_1 * d)))))
                          	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 = sqrt(Float64(l * h))
                          	tmp = 0.0
                          	if (t_0 <= -1e-80)
                          		tmp = Float64(Float64(Float64(Float64(-0.125 * Float64(Float64(Float64(D * M) * D) * M)) * Float64(Float64(abs(d) / sqrt(Float64(h * l))) * h)) / Float64(l * d)) / d);
                          	elseif (t_0 <= 1e+159)
                          		tmp = Float64(Float64(sqrt(Float64(Float64(1.0 / l) * d)) * sqrt(Float64(d / h))) * 1.0);
                          	elseif (t_0 <= Inf)
                          		tmp = Float64(Float64(abs(d) / t_1) * 1.0);
                          	else
                          		tmp = Float64(-0.125 * Float64(Float64(Float64(D * D) / Float64(l * d)) * Float64(M * Float64(Float64(M * h) * Float64(abs(d) / Float64(t_1 * d))))));
                          	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 = sqrt((l * h));
                          	tmp = 0.0;
                          	if (t_0 <= -1e-80)
                          		tmp = (((-0.125 * (((D * M) * D) * M)) * ((abs(d) / sqrt((h * l))) * h)) / (l * d)) / d;
                          	elseif (t_0 <= 1e+159)
                          		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                          	elseif (t_0 <= Inf)
                          		tmp = (abs(d) / t_1) * 1.0;
                          	else
                          		tmp = -0.125 * (((D * D) / (l * d)) * (M * ((M * h) * (abs(d) / (t_1 * d)))));
                          	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[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$0, -1e-80], N[(N[(N[(N[(-0.125 * N[(N[(N[(D * M), $MachinePrecision] * D), $MachinePrecision] * M), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[t$95$0, 1e+159], N[(N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(N[Abs[d], $MachinePrecision] / t$95$1), $MachinePrecision] * 1.0), $MachinePrecision], N[(-0.125 * N[(N[(N[(D * D), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(M * N[(N[(M * h), $MachinePrecision] * N[(N[Abs[d], $MachinePrecision] / N[(t$95$1 * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
                          
                          \begin{array}{l}
                          t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                          t_1 := \sqrt{\ell \cdot h}\\
                          \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-80}:\\
                          \;\;\;\;\frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot M\right) \cdot D\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d}\\
                          
                          \mathbf{elif}\;t\_0 \leq 10^{+159}:\\
                          \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                          
                          \mathbf{elif}\;t\_0 \leq \infty:\\
                          \;\;\;\;\frac{\left|d\right|}{t\_1} \cdot 1\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;-0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{t\_1 \cdot d}\right)\right)\right)\\
                          
                          
                          \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)))) < -9.9999999999999996e-81

                            1. Initial program 65.7%

                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            2. Taylor expanded in d around 0

                              \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                            3. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                              2. lower-/.f64N/A

                                \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                            4. Applied rewrites18.1%

                              \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                            5. Applied rewrites29.2%

                              \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{\color{blue}{d}} \]
                            6. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto \frac{\frac{\left(\frac{-1}{8} \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d} \]
                              2. *-commutativeN/A

                                \[\leadsto \frac{\frac{\left(\frac{-1}{8} \cdot \left(\left(M \cdot \left(D \cdot D\right)\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d} \]
                              3. lift-*.f64N/A

                                \[\leadsto \frac{\frac{\left(\frac{-1}{8} \cdot \left(\left(M \cdot \left(D \cdot D\right)\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d} \]
                              4. associate-*r*N/A

                                \[\leadsto \frac{\frac{\left(\frac{-1}{8} \cdot \left(\left(\left(M \cdot D\right) \cdot D\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d} \]
                              5. lift-*.f64N/A

                                \[\leadsto \frac{\frac{\left(\frac{-1}{8} \cdot \left(\left(\left(M \cdot D\right) \cdot D\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d} \]
                              6. lower-*.f6431.6%

                                \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(M \cdot D\right) \cdot D\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d} \]
                              7. lift-*.f64N/A

                                \[\leadsto \frac{\frac{\left(\frac{-1}{8} \cdot \left(\left(\left(M \cdot D\right) \cdot D\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d} \]
                              8. *-commutativeN/A

                                \[\leadsto \frac{\frac{\left(\frac{-1}{8} \cdot \left(\left(\left(D \cdot M\right) \cdot D\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d} \]
                              9. lower-*.f6431.6%

                                \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot M\right) \cdot D\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d} \]
                            7. Applied rewrites31.6%

                              \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot M\right) \cdot D\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d} \]

                            if -9.9999999999999996e-81 < (*.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)))) < 9.9999999999999993e158

                            1. Initial program 65.7%

                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            2. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              2. *-commutativeN/A

                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              3. lower-*.f6465.7%

                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              4. lift-pow.f64N/A

                                \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              5. lift-/.f64N/A

                                \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              6. metadata-evalN/A

                                \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              7. unpow1/2N/A

                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              8. lower-sqrt.f6465.7%

                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              9. lift-pow.f64N/A

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              10. lift-/.f64N/A

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              11. metadata-evalN/A

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              12. unpow1/2N/A

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              13. lower-sqrt.f6465.7%

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            3. Applied rewrites65.7%

                              \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                            4. Taylor expanded in d around inf

                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                            5. Step-by-step derivation
                              1. Applied rewrites39.0%

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                              2. Step-by-step derivation
                                1. lift-/.f64N/A

                                  \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                2. mult-flipN/A

                                  \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                3. *-commutativeN/A

                                  \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                4. lower-*.f64N/A

                                  \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                5. lower-/.f6439.0%

                                  \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                              3. Applied rewrites39.0%

                                \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                              if 9.9999999999999993e158 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                              1. Initial program 65.7%

                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              2. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                2. *-commutativeN/A

                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                3. lower-*.f6465.7%

                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                4. lift-pow.f64N/A

                                  \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                5. lift-/.f64N/A

                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                6. metadata-evalN/A

                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                7. unpow1/2N/A

                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                8. lower-sqrt.f6465.7%

                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                9. lift-pow.f64N/A

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                10. lift-/.f64N/A

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                11. metadata-evalN/A

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                12. unpow1/2N/A

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                13. lower-sqrt.f6465.7%

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              3. Applied rewrites65.7%

                                \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                              4. Taylor expanded in d around inf

                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                              5. Step-by-step derivation
                                1. Applied rewrites39.0%

                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                2. Step-by-step derivation
                                  1. Applied rewrites43.2%

                                    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]

                                  if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                  1. Initial program 65.7%

                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  2. Taylor expanded in d around 0

                                    \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                  3. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                    2. lower-/.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                  4. Applied rewrites18.1%

                                    \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                  5. Step-by-step derivation
                                    1. lift-/.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                    2. lift-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2}} \cdot \ell} \]
                                    3. lift-pow.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                    4. pow2N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                    5. lift-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                    6. lift-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \color{blue}{\ell}} \]
                                    7. lift-pow.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell} \]
                                    8. pow2N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(d \cdot d\right) \cdot \ell} \]
                                    9. associate-*l*N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}} \]
                                    10. *-commutativeN/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \left(\ell \cdot \color{blue}{d}\right)} \]
                                    11. *-commutativeN/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(\ell \cdot d\right) \cdot \color{blue}{d}} \]
                                    12. times-fracN/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                    13. lower-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                    14. lower-/.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\color{blue}{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                    15. lower-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \color{blue}{\left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                    16. lower-/.f6424.2%

                                      \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{\color{blue}{d}}\right) \]
                                  6. Applied rewrites27.7%

                                    \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right) \]
                                  7. Step-by-step derivation
                                    1. lift-/.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{\color{blue}{d}}\right) \]
                                    2. lift-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \]
                                    3. associate-/l*N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right) \]
                                    4. lift-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                                    5. lift-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}}}{d}\right)\right) \]
                                    6. associate-*l*N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot \left(M \cdot h\right)\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                                    7. associate-*l*N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                                    8. lower-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                                    9. lower-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right)\right) \]
                                    10. lower-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right)\right) \]
                                    11. lift-/.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)\right)\right) \]
                                    12. associate-/l/N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                                    13. lower-/.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                                    14. lower-*.f6431.8%

                                      \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot \color{blue}{d}}\right)\right)\right) \]
                                    15. lift-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot d}\right)\right)\right) \]
                                    16. *-commutativeN/A

                                      \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                                    17. lower-*.f6431.8%

                                      \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                                  8. Applied rewrites31.8%

                                    \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)}\right)\right) \]
                                3. Recombined 4 regimes into one program.
                                4. Add Preprocessing

                                Alternative 15: 71.1% accurate, 0.3× speedup?

                                \[\begin{array}{l} t_0 := \mathsf{min}\left(M, \left|D\right|\right)\\ t_1 := \mathsf{max}\left(M, \left|D\right|\right)\\ t_2 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{t\_0 \cdot t\_1}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_3 := t\_1 \cdot t\_1\\ t_4 := \sqrt{\ell \cdot h}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+28}:\\ \;\;\;\;\frac{\frac{\left(-0.125 \cdot \left(\left(t\_3 \cdot t\_0\right) \cdot t\_0\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d}\\ \mathbf{elif}\;t\_2 \leq 10^{+159}:\\ \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\frac{\left|d\right|}{t\_4} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;-0.125 \cdot \left(\frac{t\_3}{\ell \cdot d} \cdot \left(t\_0 \cdot \left(\left(t\_0 \cdot h\right) \cdot \frac{\left|d\right|}{t\_4 \cdot d}\right)\right)\right)\\ \end{array} \]
                                (FPCore (d h l M D)
                                  :precision binary64
                                  (let* ((t_0 (fmin M (fabs D)))
                                       (t_1 (fmax M (fabs D)))
                                       (t_2
                                        (*
                                         (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
                                         (-
                                          1.0
                                          (*
                                           (* (/ 1.0 2.0) (pow (/ (* t_0 t_1) (* 2.0 d)) 2.0))
                                           (/ h l)))))
                                       (t_3 (* t_1 t_1))
                                       (t_4 (sqrt (* l h))))
                                  (if (<= t_2 -5e+28)
                                    (/
                                     (/
                                      (*
                                       (* -0.125 (* (* t_3 t_0) t_0))
                                       (* (/ (fabs d) (sqrt (* h l))) h))
                                      (* l d))
                                     d)
                                    (if (<= t_2 1e+159)
                                      (* (* (sqrt (* (/ 1.0 l) d)) (sqrt (/ d h))) 1.0)
                                      (if (<= t_2 INFINITY)
                                        (* (/ (fabs d) t_4) 1.0)
                                        (*
                                         -0.125
                                         (*
                                          (/ t_3 (* l d))
                                          (* t_0 (* (* t_0 h) (/ (fabs d) (* t_4 d)))))))))))
                                double code(double d, double h, double l, double M, double D) {
                                	double t_0 = fmin(M, fabs(D));
                                	double t_1 = fmax(M, fabs(D));
                                	double t_2 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)));
                                	double t_3 = t_1 * t_1;
                                	double t_4 = sqrt((l * h));
                                	double tmp;
                                	if (t_2 <= -5e+28) {
                                		tmp = (((-0.125 * ((t_3 * t_0) * t_0)) * ((fabs(d) / sqrt((h * l))) * h)) / (l * d)) / d;
                                	} else if (t_2 <= 1e+159) {
                                		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                	} else if (t_2 <= ((double) INFINITY)) {
                                		tmp = (fabs(d) / t_4) * 1.0;
                                	} else {
                                		tmp = -0.125 * ((t_3 / (l * d)) * (t_0 * ((t_0 * h) * (fabs(d) / (t_4 * d)))));
                                	}
                                	return tmp;
                                }
                                
                                public static double code(double d, double h, double l, double M, double D) {
                                	double t_0 = fmin(M, Math.abs(D));
                                	double t_1 = fmax(M, Math.abs(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(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)));
                                	double t_3 = t_1 * t_1;
                                	double t_4 = Math.sqrt((l * h));
                                	double tmp;
                                	if (t_2 <= -5e+28) {
                                		tmp = (((-0.125 * ((t_3 * t_0) * t_0)) * ((Math.abs(d) / Math.sqrt((h * l))) * h)) / (l * d)) / d;
                                	} else if (t_2 <= 1e+159) {
                                		tmp = (Math.sqrt(((1.0 / l) * d)) * Math.sqrt((d / h))) * 1.0;
                                	} else if (t_2 <= Double.POSITIVE_INFINITY) {
                                		tmp = (Math.abs(d) / t_4) * 1.0;
                                	} else {
                                		tmp = -0.125 * ((t_3 / (l * d)) * (t_0 * ((t_0 * h) * (Math.abs(d) / (t_4 * d)))));
                                	}
                                	return tmp;
                                }
                                
                                def code(d, h, l, M, D):
                                	t_0 = fmin(M, math.fabs(D))
                                	t_1 = fmax(M, math.fabs(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(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)))
                                	t_3 = t_1 * t_1
                                	t_4 = math.sqrt((l * h))
                                	tmp = 0
                                	if t_2 <= -5e+28:
                                		tmp = (((-0.125 * ((t_3 * t_0) * t_0)) * ((math.fabs(d) / math.sqrt((h * l))) * h)) / (l * d)) / d
                                	elif t_2 <= 1e+159:
                                		tmp = (math.sqrt(((1.0 / l) * d)) * math.sqrt((d / h))) * 1.0
                                	elif t_2 <= math.inf:
                                		tmp = (math.fabs(d) / t_4) * 1.0
                                	else:
                                		tmp = -0.125 * ((t_3 / (l * d)) * (t_0 * ((t_0 * h) * (math.fabs(d) / (t_4 * d)))))
                                	return tmp
                                
                                function code(d, h, l, M, D)
                                	t_0 = fmin(M, abs(D))
                                	t_1 = fmax(M, abs(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(t_0 * t_1) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                	t_3 = Float64(t_1 * t_1)
                                	t_4 = sqrt(Float64(l * h))
                                	tmp = 0.0
                                	if (t_2 <= -5e+28)
                                		tmp = Float64(Float64(Float64(Float64(-0.125 * Float64(Float64(t_3 * t_0) * t_0)) * Float64(Float64(abs(d) / sqrt(Float64(h * l))) * h)) / Float64(l * d)) / d);
                                	elseif (t_2 <= 1e+159)
                                		tmp = Float64(Float64(sqrt(Float64(Float64(1.0 / l) * d)) * sqrt(Float64(d / h))) * 1.0);
                                	elseif (t_2 <= Inf)
                                		tmp = Float64(Float64(abs(d) / t_4) * 1.0);
                                	else
                                		tmp = Float64(-0.125 * Float64(Float64(t_3 / Float64(l * d)) * Float64(t_0 * Float64(Float64(t_0 * h) * Float64(abs(d) / Float64(t_4 * d))))));
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(d, h, l, M, D)
                                	t_0 = min(M, abs(D));
                                	t_1 = max(M, abs(D));
                                	t_2 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((t_0 * t_1) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                	t_3 = t_1 * t_1;
                                	t_4 = sqrt((l * h));
                                	tmp = 0.0;
                                	if (t_2 <= -5e+28)
                                		tmp = (((-0.125 * ((t_3 * t_0) * t_0)) * ((abs(d) / sqrt((h * l))) * h)) / (l * d)) / d;
                                	elseif (t_2 <= 1e+159)
                                		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                	elseif (t_2 <= Inf)
                                		tmp = (abs(d) / t_4) * 1.0;
                                	else
                                		tmp = -0.125 * ((t_3 / (l * d)) * (t_0 * ((t_0 * h) * (abs(d) / (t_4 * d)))));
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Min[M, N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Max[M, N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(t$95$0 * t$95$1), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, -5e+28], N[(N[(N[(N[(-0.125 * N[(N[(t$95$3 * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[t$95$2, 1e+159], N[(N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[Abs[d], $MachinePrecision] / t$95$4), $MachinePrecision] * 1.0), $MachinePrecision], N[(-0.125 * N[(N[(t$95$3 / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(N[(t$95$0 * h), $MachinePrecision] * N[(N[Abs[d], $MachinePrecision] / N[(t$95$4 * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
                                
                                \begin{array}{l}
                                t_0 := \mathsf{min}\left(M, \left|D\right|\right)\\
                                t_1 := \mathsf{max}\left(M, \left|D\right|\right)\\
                                t_2 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{t\_0 \cdot t\_1}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                t_3 := t\_1 \cdot t\_1\\
                                t_4 := \sqrt{\ell \cdot h}\\
                                \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+28}:\\
                                \;\;\;\;\frac{\frac{\left(-0.125 \cdot \left(\left(t\_3 \cdot t\_0\right) \cdot t\_0\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{d}\\
                                
                                \mathbf{elif}\;t\_2 \leq 10^{+159}:\\
                                \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                                
                                \mathbf{elif}\;t\_2 \leq \infty:\\
                                \;\;\;\;\frac{\left|d\right|}{t\_4} \cdot 1\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;-0.125 \cdot \left(\frac{t\_3}{\ell \cdot d} \cdot \left(t\_0 \cdot \left(\left(t\_0 \cdot h\right) \cdot \frac{\left|d\right|}{t\_4 \cdot d}\right)\right)\right)\\
                                
                                
                                \end{array}
                                
                                Derivation
                                1. Split input into 4 regimes
                                2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.9999999999999996e28

                                  1. Initial program 65.7%

                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  2. Taylor expanded in d around 0

                                    \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                  3. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                    2. lower-/.f64N/A

                                      \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                  4. Applied rewrites18.1%

                                    \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                  5. Applied rewrites29.2%

                                    \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{\color{blue}{d}} \]

                                  if -4.9999999999999996e28 < (*.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)))) < 9.9999999999999993e158

                                  1. Initial program 65.7%

                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  2. Step-by-step derivation
                                    1. lift-*.f64N/A

                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    2. *-commutativeN/A

                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    3. lower-*.f6465.7%

                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    4. lift-pow.f64N/A

                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    5. lift-/.f64N/A

                                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    6. metadata-evalN/A

                                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    7. unpow1/2N/A

                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    8. lower-sqrt.f6465.7%

                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    9. lift-pow.f64N/A

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    10. lift-/.f64N/A

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    11. metadata-evalN/A

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    12. unpow1/2N/A

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    13. lower-sqrt.f6465.7%

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  3. Applied rewrites65.7%

                                    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                  4. Taylor expanded in d around inf

                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                  5. Step-by-step derivation
                                    1. Applied rewrites39.0%

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                    2. Step-by-step derivation
                                      1. lift-/.f64N/A

                                        \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                      2. mult-flipN/A

                                        \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                      3. *-commutativeN/A

                                        \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                      4. lower-*.f64N/A

                                        \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                      5. lower-/.f6439.0%

                                        \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                    3. Applied rewrites39.0%

                                      \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                                    if 9.9999999999999993e158 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                    1. Initial program 65.7%

                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    2. Step-by-step derivation
                                      1. lift-*.f64N/A

                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      2. *-commutativeN/A

                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      3. lower-*.f6465.7%

                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      4. lift-pow.f64N/A

                                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      5. lift-/.f64N/A

                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      6. metadata-evalN/A

                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      7. unpow1/2N/A

                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      8. lower-sqrt.f6465.7%

                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      9. lift-pow.f64N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      10. lift-/.f64N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      11. metadata-evalN/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      12. unpow1/2N/A

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                      13. lower-sqrt.f6465.7%

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    3. Applied rewrites65.7%

                                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                    4. Taylor expanded in d around inf

                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                    5. Step-by-step derivation
                                      1. Applied rewrites39.0%

                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites43.2%

                                          \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]

                                        if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                        1. Initial program 65.7%

                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        2. Taylor expanded in d around 0

                                          \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                        3. Step-by-step derivation
                                          1. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                          2. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                        4. Applied rewrites18.1%

                                          \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                        5. Step-by-step derivation
                                          1. lift-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                          2. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2}} \cdot \ell} \]
                                          3. lift-pow.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                          4. pow2N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                          5. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                          6. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \color{blue}{\ell}} \]
                                          7. lift-pow.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell} \]
                                          8. pow2N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(d \cdot d\right) \cdot \ell} \]
                                          9. associate-*l*N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}} \]
                                          10. *-commutativeN/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \left(\ell \cdot \color{blue}{d}\right)} \]
                                          11. *-commutativeN/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(\ell \cdot d\right) \cdot \color{blue}{d}} \]
                                          12. times-fracN/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                          13. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                          14. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\color{blue}{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                          15. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \color{blue}{\left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                          16. lower-/.f6424.2%

                                            \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{\color{blue}{d}}\right) \]
                                        6. Applied rewrites27.7%

                                          \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right) \]
                                        7. Step-by-step derivation
                                          1. lift-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{\color{blue}{d}}\right) \]
                                          2. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \]
                                          3. associate-/l*N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right) \]
                                          4. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                                          5. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}}}{d}\right)\right) \]
                                          6. associate-*l*N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot \left(M \cdot h\right)\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                                          7. associate-*l*N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                                          8. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                                          9. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right)\right) \]
                                          10. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right)\right) \]
                                          11. lift-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)\right)\right) \]
                                          12. associate-/l/N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                                          13. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                                          14. lower-*.f6431.8%

                                            \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot \color{blue}{d}}\right)\right)\right) \]
                                          15. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot d}\right)\right)\right) \]
                                          16. *-commutativeN/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                                          17. lower-*.f6431.8%

                                            \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                                        8. Applied rewrites31.8%

                                          \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)}\right)\right) \]
                                      3. Recombined 4 regimes into one program.
                                      4. Add Preprocessing

                                      Alternative 16: 70.6% accurate, 0.3× speedup?

                                      \[\begin{array}{l} t_0 := \frac{D \cdot D}{\ell \cdot d}\\ t_1 := \sqrt{\ell \cdot h}\\ 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)\\ t_3 := \frac{\left|d\right|}{t\_1 \cdot d}\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;-0.125 \cdot \left(t\_0 \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot t\_3\right)\right)\right)\\ \mathbf{elif}\;t\_2 \leq 10^{+159}:\\ \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\frac{\left|d\right|}{t\_1} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;-0.125 \cdot \left(t\_0 \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot t\_3\right)\right)\right)\\ \end{array} \]
                                      (FPCore (d h l M D)
                                        :precision binary64
                                        (let* ((t_0 (/ (* D D) (* l d)))
                                             (t_1 (sqrt (* l h)))
                                             (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)))))
                                             (t_3 (/ (fabs d) (* t_1 d))))
                                        (if (<= t_2 0.0)
                                          (* -0.125 (* t_0 (* (* M M) (* h t_3))))
                                          (if (<= t_2 1e+159)
                                            (* (* (sqrt (* (/ 1.0 l) d)) (sqrt (/ d h))) 1.0)
                                            (if (<= t_2 INFINITY)
                                              (* (/ (fabs d) t_1) 1.0)
                                              (* -0.125 (* t_0 (* M (* (* M h) t_3)))))))))
                                      double code(double d, double h, double l, double M, double D) {
                                      	double t_0 = (D * D) / (l * d);
                                      	double t_1 = sqrt((l * h));
                                      	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 t_3 = fabs(d) / (t_1 * d);
                                      	double tmp;
                                      	if (t_2 <= 0.0) {
                                      		tmp = -0.125 * (t_0 * ((M * M) * (h * t_3)));
                                      	} else if (t_2 <= 1e+159) {
                                      		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                      	} else if (t_2 <= ((double) INFINITY)) {
                                      		tmp = (fabs(d) / t_1) * 1.0;
                                      	} else {
                                      		tmp = -0.125 * (t_0 * (M * ((M * h) * t_3)));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      public static double code(double d, double h, double l, double M, double D) {
                                      	double t_0 = (D * D) / (l * d);
                                      	double t_1 = Math.sqrt((l * h));
                                      	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 t_3 = Math.abs(d) / (t_1 * d);
                                      	double tmp;
                                      	if (t_2 <= 0.0) {
                                      		tmp = -0.125 * (t_0 * ((M * M) * (h * t_3)));
                                      	} else if (t_2 <= 1e+159) {
                                      		tmp = (Math.sqrt(((1.0 / l) * d)) * Math.sqrt((d / h))) * 1.0;
                                      	} else if (t_2 <= Double.POSITIVE_INFINITY) {
                                      		tmp = (Math.abs(d) / t_1) * 1.0;
                                      	} else {
                                      		tmp = -0.125 * (t_0 * (M * ((M * h) * t_3)));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(d, h, l, M, D):
                                      	t_0 = (D * D) / (l * d)
                                      	t_1 = math.sqrt((l * h))
                                      	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)))
                                      	t_3 = math.fabs(d) / (t_1 * d)
                                      	tmp = 0
                                      	if t_2 <= 0.0:
                                      		tmp = -0.125 * (t_0 * ((M * M) * (h * t_3)))
                                      	elif t_2 <= 1e+159:
                                      		tmp = (math.sqrt(((1.0 / l) * d)) * math.sqrt((d / h))) * 1.0
                                      	elif t_2 <= math.inf:
                                      		tmp = (math.fabs(d) / t_1) * 1.0
                                      	else:
                                      		tmp = -0.125 * (t_0 * (M * ((M * h) * t_3)))
                                      	return tmp
                                      
                                      function code(d, h, l, M, D)
                                      	t_0 = Float64(Float64(D * D) / Float64(l * d))
                                      	t_1 = sqrt(Float64(l * h))
                                      	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))))
                                      	t_3 = Float64(abs(d) / Float64(t_1 * d))
                                      	tmp = 0.0
                                      	if (t_2 <= 0.0)
                                      		tmp = Float64(-0.125 * Float64(t_0 * Float64(Float64(M * M) * Float64(h * t_3))));
                                      	elseif (t_2 <= 1e+159)
                                      		tmp = Float64(Float64(sqrt(Float64(Float64(1.0 / l) * d)) * sqrt(Float64(d / h))) * 1.0);
                                      	elseif (t_2 <= Inf)
                                      		tmp = Float64(Float64(abs(d) / t_1) * 1.0);
                                      	else
                                      		tmp = Float64(-0.125 * Float64(t_0 * Float64(M * Float64(Float64(M * h) * t_3))));
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(d, h, l, M, D)
                                      	t_0 = (D * D) / (l * d);
                                      	t_1 = sqrt((l * h));
                                      	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)));
                                      	t_3 = abs(d) / (t_1 * d);
                                      	tmp = 0.0;
                                      	if (t_2 <= 0.0)
                                      		tmp = -0.125 * (t_0 * ((M * M) * (h * t_3)));
                                      	elseif (t_2 <= 1e+159)
                                      		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                      	elseif (t_2 <= Inf)
                                      		tmp = (abs(d) / t_1) * 1.0;
                                      	else
                                      		tmp = -0.125 * (t_0 * (M * ((M * h) * t_3)));
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * D), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(l * h), $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]}, Block[{t$95$3 = N[(N[Abs[d], $MachinePrecision] / N[(t$95$1 * d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(-0.125 * N[(t$95$0 * N[(N[(M * M), $MachinePrecision] * N[(h * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+159], N[(N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(N[Abs[d], $MachinePrecision] / t$95$1), $MachinePrecision] * 1.0), $MachinePrecision], N[(-0.125 * N[(t$95$0 * N[(M * N[(N[(M * h), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
                                      
                                      \begin{array}{l}
                                      t_0 := \frac{D \cdot D}{\ell \cdot d}\\
                                      t_1 := \sqrt{\ell \cdot h}\\
                                      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)\\
                                      t_3 := \frac{\left|d\right|}{t\_1 \cdot d}\\
                                      \mathbf{if}\;t\_2 \leq 0:\\
                                      \;\;\;\;-0.125 \cdot \left(t\_0 \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot t\_3\right)\right)\right)\\
                                      
                                      \mathbf{elif}\;t\_2 \leq 10^{+159}:\\
                                      \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                                      
                                      \mathbf{elif}\;t\_2 \leq \infty:\\
                                      \;\;\;\;\frac{\left|d\right|}{t\_1} \cdot 1\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;-0.125 \cdot \left(t\_0 \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot t\_3\right)\right)\right)\\
                                      
                                      
                                      \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)))) < -0.0

                                        1. Initial program 65.7%

                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        2. Taylor expanded in d around 0

                                          \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                        3. Step-by-step derivation
                                          1. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                          2. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                        4. Applied rewrites18.1%

                                          \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                        5. Step-by-step derivation
                                          1. lift-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                          2. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2}} \cdot \ell} \]
                                          3. lift-pow.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                          4. pow2N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                          5. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                          6. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \color{blue}{\ell}} \]
                                          7. lift-pow.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell} \]
                                          8. pow2N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(d \cdot d\right) \cdot \ell} \]
                                          9. associate-*l*N/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}} \]
                                          10. *-commutativeN/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \left(\ell \cdot \color{blue}{d}\right)} \]
                                          11. *-commutativeN/A

                                            \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(\ell \cdot d\right) \cdot \color{blue}{d}} \]
                                          12. times-fracN/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                          13. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                          14. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\color{blue}{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                          15. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \color{blue}{\left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                          16. lower-/.f6424.2%

                                            \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{\color{blue}{d}}\right) \]
                                        6. Applied rewrites27.7%

                                          \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right) \]
                                        7. Step-by-step derivation
                                          1. lift-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{\color{blue}{d}}\right) \]
                                          2. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \]
                                          3. associate-/l*N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right) \]
                                          4. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                                          5. associate-*l*N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \color{blue}{\left(h \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                                          6. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \color{blue}{\left(h \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                                          7. lower-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right)\right) \]
                                          8. lift-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)\right)\right) \]
                                          9. associate-/l/N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                                          10. lower-/.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                                          11. lower-*.f6430.7%

                                            \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot \color{blue}{d}}\right)\right)\right) \]
                                          12. lift-*.f64N/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot d}\right)\right)\right) \]
                                          13. *-commutativeN/A

                                            \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                                          14. lower-*.f6430.7%

                                            \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                                        8. Applied rewrites30.7%

                                          \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot M\right) \cdot \color{blue}{\left(h \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)}\right)\right) \]

                                        if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 9.9999999999999993e158

                                        1. Initial program 65.7%

                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        2. Step-by-step derivation
                                          1. lift-*.f64N/A

                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          2. *-commutativeN/A

                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          3. lower-*.f6465.7%

                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          4. lift-pow.f64N/A

                                            \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          5. lift-/.f64N/A

                                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          6. metadata-evalN/A

                                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          7. unpow1/2N/A

                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          8. lower-sqrt.f6465.7%

                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          9. lift-pow.f64N/A

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          10. lift-/.f64N/A

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          11. metadata-evalN/A

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          12. unpow1/2N/A

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          13. lower-sqrt.f6465.7%

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        3. Applied rewrites65.7%

                                          \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                        4. Taylor expanded in d around inf

                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                        5. Step-by-step derivation
                                          1. Applied rewrites39.0%

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                          2. Step-by-step derivation
                                            1. lift-/.f64N/A

                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                            2. mult-flipN/A

                                              \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                            3. *-commutativeN/A

                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                            4. lower-*.f64N/A

                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                            5. lower-/.f6439.0%

                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                          3. Applied rewrites39.0%

                                            \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                                          if 9.9999999999999993e158 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                          1. Initial program 65.7%

                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          2. Step-by-step derivation
                                            1. lift-*.f64N/A

                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            2. *-commutativeN/A

                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            3. lower-*.f6465.7%

                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            4. lift-pow.f64N/A

                                              \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            5. lift-/.f64N/A

                                              \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            6. metadata-evalN/A

                                              \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            7. unpow1/2N/A

                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            8. lower-sqrt.f6465.7%

                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            9. lift-pow.f64N/A

                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            10. lift-/.f64N/A

                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            11. metadata-evalN/A

                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            12. unpow1/2N/A

                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                            13. lower-sqrt.f6465.7%

                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          3. Applied rewrites65.7%

                                            \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                          4. Taylor expanded in d around inf

                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                          5. Step-by-step derivation
                                            1. Applied rewrites39.0%

                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites43.2%

                                                \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]

                                              if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                              1. Initial program 65.7%

                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              2. Taylor expanded in d around 0

                                                \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                              3. Step-by-step derivation
                                                1. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                2. lower-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                              4. Applied rewrites18.1%

                                                \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                              5. Step-by-step derivation
                                                1. lift-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                2. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2}} \cdot \ell} \]
                                                3. lift-pow.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                4. pow2N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                5. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                6. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \color{blue}{\ell}} \]
                                                7. lift-pow.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell} \]
                                                8. pow2N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(d \cdot d\right) \cdot \ell} \]
                                                9. associate-*l*N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}} \]
                                                10. *-commutativeN/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \left(\ell \cdot \color{blue}{d}\right)} \]
                                                11. *-commutativeN/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(\ell \cdot d\right) \cdot \color{blue}{d}} \]
                                                12. times-fracN/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                                13. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                                14. lower-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\color{blue}{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                                15. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \color{blue}{\left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                                16. lower-/.f6424.2%

                                                  \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{\color{blue}{d}}\right) \]
                                              6. Applied rewrites27.7%

                                                \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right) \]
                                              7. Step-by-step derivation
                                                1. lift-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{\color{blue}{d}}\right) \]
                                                2. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \]
                                                3. associate-/l*N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right) \]
                                                4. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                                                5. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}}}{d}\right)\right) \]
                                                6. associate-*l*N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot \left(M \cdot h\right)\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                                                7. associate-*l*N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                                                8. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                                                9. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right)\right) \]
                                                10. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right)\right) \]
                                                11. lift-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)\right)\right) \]
                                                12. associate-/l/N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                                                13. lower-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                                                14. lower-*.f6431.8%

                                                  \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot \color{blue}{d}}\right)\right)\right) \]
                                                15. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot d}\right)\right)\right) \]
                                                16. *-commutativeN/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                                                17. lower-*.f6431.8%

                                                  \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                                              8. Applied rewrites31.8%

                                                \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)}\right)\right) \]
                                            3. Recombined 4 regimes into one program.
                                            4. Add Preprocessing

                                            Alternative 17: 70.2% 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 := \sqrt{\ell \cdot h}\\ t_2 := -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{t\_1 \cdot d}\right)\right)\right)\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 10^{+159}:\\ \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{\left|d\right|}{t\_1} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \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 (sqrt (* l h)))
                                                   (t_2
                                                    (*
                                                     -0.125
                                                     (*
                                                      (/ (* D D) (* l d))
                                                      (* M (* (* M h) (/ (fabs d) (* t_1 d))))))))
                                              (if (<= t_0 0.0)
                                                t_2
                                                (if (<= t_0 1e+159)
                                                  (* (* (sqrt (* (/ 1.0 l) d)) (sqrt (/ d h))) 1.0)
                                                  (if (<= t_0 INFINITY) (* (/ (fabs d) t_1) 1.0) t_2)))))
                                            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 = sqrt((l * h));
                                            	double t_2 = -0.125 * (((D * D) / (l * d)) * (M * ((M * h) * (fabs(d) / (t_1 * d)))));
                                            	double tmp;
                                            	if (t_0 <= 0.0) {
                                            		tmp = t_2;
                                            	} else if (t_0 <= 1e+159) {
                                            		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                            	} else if (t_0 <= ((double) INFINITY)) {
                                            		tmp = (fabs(d) / t_1) * 1.0;
                                            	} else {
                                            		tmp = t_2;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            public static double code(double d, double h, double l, double M, double D) {
                                            	double t_0 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                            	double t_1 = Math.sqrt((l * h));
                                            	double t_2 = -0.125 * (((D * D) / (l * d)) * (M * ((M * h) * (Math.abs(d) / (t_1 * d)))));
                                            	double tmp;
                                            	if (t_0 <= 0.0) {
                                            		tmp = t_2;
                                            	} else if (t_0 <= 1e+159) {
                                            		tmp = (Math.sqrt(((1.0 / l) * d)) * Math.sqrt((d / h))) * 1.0;
                                            	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                                            		tmp = (Math.abs(d) / t_1) * 1.0;
                                            	} else {
                                            		tmp = t_2;
                                            	}
                                            	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.sqrt((l * h))
                                            	t_2 = -0.125 * (((D * D) / (l * d)) * (M * ((M * h) * (math.fabs(d) / (t_1 * d)))))
                                            	tmp = 0
                                            	if t_0 <= 0.0:
                                            		tmp = t_2
                                            	elif t_0 <= 1e+159:
                                            		tmp = (math.sqrt(((1.0 / l) * d)) * math.sqrt((d / h))) * 1.0
                                            	elif t_0 <= math.inf:
                                            		tmp = (math.fabs(d) / t_1) * 1.0
                                            	else:
                                            		tmp = t_2
                                            	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 = sqrt(Float64(l * h))
                                            	t_2 = Float64(-0.125 * Float64(Float64(Float64(D * D) / Float64(l * d)) * Float64(M * Float64(Float64(M * h) * Float64(abs(d) / Float64(t_1 * d))))))
                                            	tmp = 0.0
                                            	if (t_0 <= 0.0)
                                            		tmp = t_2;
                                            	elseif (t_0 <= 1e+159)
                                            		tmp = Float64(Float64(sqrt(Float64(Float64(1.0 / l) * d)) * sqrt(Float64(d / h))) * 1.0);
                                            	elseif (t_0 <= Inf)
                                            		tmp = Float64(Float64(abs(d) / t_1) * 1.0);
                                            	else
                                            		tmp = t_2;
                                            	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 = sqrt((l * h));
                                            	t_2 = -0.125 * (((D * D) / (l * d)) * (M * ((M * h) * (abs(d) / (t_1 * d)))));
                                            	tmp = 0.0;
                                            	if (t_0 <= 0.0)
                                            		tmp = t_2;
                                            	elseif (t_0 <= 1e+159)
                                            		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                            	elseif (t_0 <= Inf)
                                            		tmp = (abs(d) / t_1) * 1.0;
                                            	else
                                            		tmp = t_2;
                                            	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[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(-0.125 * N[(N[(N[(D * D), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision] * N[(M * N[(N[(M * h), $MachinePrecision] * N[(N[Abs[d], $MachinePrecision] / N[(t$95$1 * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], t$95$2, If[LessEqual[t$95$0, 1e+159], N[(N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(N[Abs[d], $MachinePrecision] / t$95$1), $MachinePrecision] * 1.0), $MachinePrecision], t$95$2]]]]]]
                                            
                                            \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 := \sqrt{\ell \cdot h}\\
                                            t_2 := -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{t\_1 \cdot d}\right)\right)\right)\\
                                            \mathbf{if}\;t\_0 \leq 0:\\
                                            \;\;\;\;t\_2\\
                                            
                                            \mathbf{elif}\;t\_0 \leq 10^{+159}:\\
                                            \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                                            
                                            \mathbf{elif}\;t\_0 \leq \infty:\\
                                            \;\;\;\;\frac{\left|d\right|}{t\_1} \cdot 1\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_2\\
                                            
                                            
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -0.0 or +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                              1. Initial program 65.7%

                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              2. Taylor expanded in d around 0

                                                \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                              3. Step-by-step derivation
                                                1. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                2. lower-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                              4. Applied rewrites18.1%

                                                \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                              5. Step-by-step derivation
                                                1. lift-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                2. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2}} \cdot \ell} \]
                                                3. lift-pow.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                4. pow2N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                5. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                6. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \color{blue}{\ell}} \]
                                                7. lift-pow.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell} \]
                                                8. pow2N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(d \cdot d\right) \cdot \ell} \]
                                                9. associate-*l*N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}} \]
                                                10. *-commutativeN/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \left(\ell \cdot \color{blue}{d}\right)} \]
                                                11. *-commutativeN/A

                                                  \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(\ell \cdot d\right) \cdot \color{blue}{d}} \]
                                                12. times-fracN/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                                13. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                                14. lower-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\color{blue}{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                                15. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \color{blue}{\left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                                16. lower-/.f6424.2%

                                                  \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{\color{blue}{d}}\right) \]
                                              6. Applied rewrites27.7%

                                                \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right) \]
                                              7. Step-by-step derivation
                                                1. lift-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{\color{blue}{d}}\right) \]
                                                2. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \]
                                                3. associate-/l*N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right) \]
                                                4. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                                                5. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}}}{d}\right)\right) \]
                                                6. associate-*l*N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(\left(M \cdot \left(M \cdot h\right)\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right) \]
                                                7. associate-*l*N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                                                8. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)}\right)\right) \]
                                                9. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \color{blue}{\frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right)\right)\right) \]
                                                10. lower-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\color{blue}{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}}{d}\right)\right)\right) \]
                                                11. lift-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)\right)\right) \]
                                                12. associate-/l/N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                                                13. lower-/.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\color{blue}{\sqrt{h \cdot \ell} \cdot d}}\right)\right)\right) \]
                                                14. lower-*.f6431.8%

                                                  \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot \color{blue}{d}}\right)\right)\right) \]
                                                15. lift-*.f64N/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell} \cdot d}\right)\right)\right) \]
                                                16. *-commutativeN/A

                                                  \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                                                17. lower-*.f6431.8%

                                                  \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)\right)\right) \]
                                              8. Applied rewrites31.8%

                                                \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \left(M \cdot \color{blue}{\left(\left(M \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right)}\right)\right) \]

                                              if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 9.9999999999999993e158

                                              1. Initial program 65.7%

                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              2. Step-by-step derivation
                                                1. lift-*.f64N/A

                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                2. *-commutativeN/A

                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                3. lower-*.f6465.7%

                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                4. lift-pow.f64N/A

                                                  \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                5. lift-/.f64N/A

                                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                6. metadata-evalN/A

                                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                7. unpow1/2N/A

                                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                8. lower-sqrt.f6465.7%

                                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                9. lift-pow.f64N/A

                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                10. lift-/.f64N/A

                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                11. metadata-evalN/A

                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                12. unpow1/2N/A

                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                13. lower-sqrt.f6465.7%

                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              3. Applied rewrites65.7%

                                                \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                              4. Taylor expanded in d around inf

                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                              5. Step-by-step derivation
                                                1. Applied rewrites39.0%

                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                2. Step-by-step derivation
                                                  1. lift-/.f64N/A

                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                  2. mult-flipN/A

                                                    \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                  3. *-commutativeN/A

                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                  4. lower-*.f64N/A

                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                  5. lower-/.f6439.0%

                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                3. Applied rewrites39.0%

                                                  \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                                                if 9.9999999999999993e158 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                                1. Initial program 65.7%

                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                2. Step-by-step derivation
                                                  1. lift-*.f64N/A

                                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  2. *-commutativeN/A

                                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  3. lower-*.f6465.7%

                                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  4. lift-pow.f64N/A

                                                    \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  5. lift-/.f64N/A

                                                    \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  6. metadata-evalN/A

                                                    \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  7. unpow1/2N/A

                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  8. lower-sqrt.f6465.7%

                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  9. lift-pow.f64N/A

                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  10. lift-/.f64N/A

                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  11. metadata-evalN/A

                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  12. unpow1/2N/A

                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                  13. lower-sqrt.f6465.7%

                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                3. Applied rewrites65.7%

                                                  \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                4. Taylor expanded in d around inf

                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                5. Step-by-step derivation
                                                  1. Applied rewrites39.0%

                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                  2. Step-by-step derivation
                                                    1. Applied rewrites43.2%

                                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                  3. Recombined 3 regimes into one program.
                                                  4. Add Preprocessing

                                                  Alternative 18: 69.0% accurate, 0.3× speedup?

                                                  \[\begin{array}{l} t_0 := \left(\mathsf{min}\left(M, D\right) \cdot \mathsf{min}\left(M, D\right)\right) \cdot h\\ t_1 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_2 := \sqrt{\ell \cdot h}\\ t_3 := t\_2 \cdot d\\ \mathbf{if}\;t\_1 \leq 0:\\ \;\;\;\;\frac{\left(\left(\left(\mathsf{max}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)\right) \cdot t\_0\right) \cdot \frac{\left|d\right|}{t\_3}\right) \cdot -0.125}{\ell \cdot d}\\ \mathbf{elif}\;t\_1 \leq 10^{+159}:\\ \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\frac{\left|d\right|}{t\_2} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;-0.125 \cdot \left(\left(\frac{t\_0 \cdot \left|d\right|}{t\_3} \cdot \mathsf{max}\left(M, D\right)\right) \cdot \frac{\mathsf{max}\left(M, D\right)}{\ell \cdot d}\right)\\ \end{array} \]
                                                  (FPCore (d h l M D)
                                                    :precision binary64
                                                    (let* ((t_0 (* (* (fmin M D) (fmin M D)) h))
                                                         (t_1
                                                          (*
                                                           (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
                                                           (-
                                                            1.0
                                                            (*
                                                             (*
                                                              (/ 1.0 2.0)
                                                              (pow (/ (* (fmin M D) (fmax M D)) (* 2.0 d)) 2.0))
                                                             (/ h l)))))
                                                         (t_2 (sqrt (* l h)))
                                                         (t_3 (* t_2 d)))
                                                    (if (<= t_1 0.0)
                                                      (/
                                                       (* (* (* (* (fmax M D) (fmax M D)) t_0) (/ (fabs d) t_3)) -0.125)
                                                       (* l d))
                                                      (if (<= t_1 1e+159)
                                                        (* (* (sqrt (* (/ 1.0 l) d)) (sqrt (/ d h))) 1.0)
                                                        (if (<= t_1 INFINITY)
                                                          (* (/ (fabs d) t_2) 1.0)
                                                          (*
                                                           -0.125
                                                           (*
                                                            (* (/ (* t_0 (fabs d)) t_3) (fmax M D))
                                                            (/ (fmax M D) (* l d)))))))))
                                                  double code(double d, double h, double l, double M, double D) {
                                                  	double t_0 = (fmin(M, D) * fmin(M, D)) * h;
                                                  	double t_1 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)));
                                                  	double t_2 = sqrt((l * h));
                                                  	double t_3 = t_2 * d;
                                                  	double tmp;
                                                  	if (t_1 <= 0.0) {
                                                  		tmp = ((((fmax(M, D) * fmax(M, D)) * t_0) * (fabs(d) / t_3)) * -0.125) / (l * d);
                                                  	} else if (t_1 <= 1e+159) {
                                                  		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                  	} else if (t_1 <= ((double) INFINITY)) {
                                                  		tmp = (fabs(d) / t_2) * 1.0;
                                                  	} else {
                                                  		tmp = -0.125 * ((((t_0 * fabs(d)) / t_3) * fmax(M, D)) * (fmax(M, D) / (l * d)));
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  public static double code(double d, double h, double l, double M, double D) {
                                                  	double t_0 = (fmin(M, D) * fmin(M, D)) * h;
                                                  	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(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)));
                                                  	double t_2 = Math.sqrt((l * h));
                                                  	double t_3 = t_2 * d;
                                                  	double tmp;
                                                  	if (t_1 <= 0.0) {
                                                  		tmp = ((((fmax(M, D) * fmax(M, D)) * t_0) * (Math.abs(d) / t_3)) * -0.125) / (l * d);
                                                  	} else if (t_1 <= 1e+159) {
                                                  		tmp = (Math.sqrt(((1.0 / l) * d)) * Math.sqrt((d / h))) * 1.0;
                                                  	} else if (t_1 <= Double.POSITIVE_INFINITY) {
                                                  		tmp = (Math.abs(d) / t_2) * 1.0;
                                                  	} else {
                                                  		tmp = -0.125 * ((((t_0 * Math.abs(d)) / t_3) * fmax(M, D)) * (fmax(M, D) / (l * d)));
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  def code(d, h, l, M, D):
                                                  	t_0 = (fmin(M, D) * fmin(M, D)) * h
                                                  	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(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)))
                                                  	t_2 = math.sqrt((l * h))
                                                  	t_3 = t_2 * d
                                                  	tmp = 0
                                                  	if t_1 <= 0.0:
                                                  		tmp = ((((fmax(M, D) * fmax(M, D)) * t_0) * (math.fabs(d) / t_3)) * -0.125) / (l * d)
                                                  	elif t_1 <= 1e+159:
                                                  		tmp = (math.sqrt(((1.0 / l) * d)) * math.sqrt((d / h))) * 1.0
                                                  	elif t_1 <= math.inf:
                                                  		tmp = (math.fabs(d) / t_2) * 1.0
                                                  	else:
                                                  		tmp = -0.125 * ((((t_0 * math.fabs(d)) / t_3) * fmax(M, D)) * (fmax(M, D) / (l * d)))
                                                  	return tmp
                                                  
                                                  function code(d, h, l, M, D)
                                                  	t_0 = Float64(Float64(fmin(M, D) * fmin(M, D)) * h)
                                                  	t_1 = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(fmin(M, D) * fmax(M, D)) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                  	t_2 = sqrt(Float64(l * h))
                                                  	t_3 = Float64(t_2 * d)
                                                  	tmp = 0.0
                                                  	if (t_1 <= 0.0)
                                                  		tmp = Float64(Float64(Float64(Float64(Float64(fmax(M, D) * fmax(M, D)) * t_0) * Float64(abs(d) / t_3)) * -0.125) / Float64(l * d));
                                                  	elseif (t_1 <= 1e+159)
                                                  		tmp = Float64(Float64(sqrt(Float64(Float64(1.0 / l) * d)) * sqrt(Float64(d / h))) * 1.0);
                                                  	elseif (t_1 <= Inf)
                                                  		tmp = Float64(Float64(abs(d) / t_2) * 1.0);
                                                  	else
                                                  		tmp = Float64(-0.125 * Float64(Float64(Float64(Float64(t_0 * abs(d)) / t_3) * fmax(M, D)) * Float64(fmax(M, D) / Float64(l * d))));
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  function tmp_2 = code(d, h, l, M, D)
                                                  	t_0 = (min(M, D) * min(M, D)) * h;
                                                  	t_1 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((min(M, D) * max(M, D)) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                                  	t_2 = sqrt((l * h));
                                                  	t_3 = t_2 * d;
                                                  	tmp = 0.0;
                                                  	if (t_1 <= 0.0)
                                                  		tmp = ((((max(M, D) * max(M, D)) * t_0) * (abs(d) / t_3)) * -0.125) / (l * d);
                                                  	elseif (t_1 <= 1e+159)
                                                  		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                  	elseif (t_1 <= Inf)
                                                  		tmp = (abs(d) / t_2) * 1.0;
                                                  	else
                                                  		tmp = -0.125 * ((((t_0 * abs(d)) / t_3) * max(M, D)) * (max(M, D) / (l * d)));
                                                  	end
                                                  	tmp_2 = tmp;
                                                  end
                                                  
                                                  code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Min[M, D], $MachinePrecision] * N[Min[M, D], $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(N[Min[M, D], $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * d), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(N[(N[Max[M, D], $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] * N[(N[Abs[d], $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+159], N[(N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[Abs[d], $MachinePrecision] / t$95$2), $MachinePrecision] * 1.0), $MachinePrecision], N[(-0.125 * N[(N[(N[(N[(t$95$0 * N[Abs[d], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] * N[(N[Max[M, D], $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
                                                  
                                                  \begin{array}{l}
                                                  t_0 := \left(\mathsf{min}\left(M, D\right) \cdot \mathsf{min}\left(M, D\right)\right) \cdot h\\
                                                  t_1 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                  t_2 := \sqrt{\ell \cdot h}\\
                                                  t_3 := t\_2 \cdot d\\
                                                  \mathbf{if}\;t\_1 \leq 0:\\
                                                  \;\;\;\;\frac{\left(\left(\left(\mathsf{max}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)\right) \cdot t\_0\right) \cdot \frac{\left|d\right|}{t\_3}\right) \cdot -0.125}{\ell \cdot d}\\
                                                  
                                                  \mathbf{elif}\;t\_1 \leq 10^{+159}:\\
                                                  \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                                                  
                                                  \mathbf{elif}\;t\_1 \leq \infty:\\
                                                  \;\;\;\;\frac{\left|d\right|}{t\_2} \cdot 1\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;-0.125 \cdot \left(\left(\frac{t\_0 \cdot \left|d\right|}{t\_3} \cdot \mathsf{max}\left(M, D\right)\right) \cdot \frac{\mathsf{max}\left(M, D\right)}{\ell \cdot d}\right)\\
                                                  
                                                  
                                                  \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)))) < -0.0

                                                    1. Initial program 65.7%

                                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    2. Taylor expanded in d around 0

                                                      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                    3. Step-by-step derivation
                                                      1. lower-*.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                      2. lower-/.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                    4. Applied rewrites18.1%

                                                      \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                    5. Step-by-step derivation
                                                      1. lift-/.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                      2. lift-*.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2}} \cdot \ell} \]
                                                      3. lift-pow.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                      4. pow2N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                      5. lift-*.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                      6. lift-*.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \color{blue}{\ell}} \]
                                                      7. lift-pow.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell} \]
                                                      8. pow2N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(d \cdot d\right) \cdot \ell} \]
                                                      9. associate-*l*N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}} \]
                                                      10. *-commutativeN/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \left(\ell \cdot \color{blue}{d}\right)} \]
                                                      11. *-commutativeN/A

                                                        \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(\ell \cdot d\right) \cdot \color{blue}{d}} \]
                                                      12. times-fracN/A

                                                        \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                                      13. lower-*.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                                      14. lower-/.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\color{blue}{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                                      15. lower-*.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \color{blue}{\left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                                      16. lower-/.f6424.2%

                                                        \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{\color{blue}{d}}\right) \]
                                                    6. Applied rewrites27.7%

                                                      \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right) \]
                                                    7. Step-by-step derivation
                                                      1. lift-*.f64N/A

                                                        \[\leadsto \frac{-1}{8} \cdot \color{blue}{\left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)} \]
                                                      2. *-commutativeN/A

                                                        \[\leadsto \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \cdot \color{blue}{\frac{-1}{8}} \]
                                                      3. lift-*.f64N/A

                                                        \[\leadsto \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \cdot \frac{-1}{8} \]
                                                      4. lift-/.f64N/A

                                                        \[\leadsto \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \cdot \frac{-1}{8} \]
                                                      5. associate-*l/N/A

                                                        \[\leadsto \frac{\left(D \cdot D\right) \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}{\ell \cdot d} \cdot \frac{-1}{8} \]
                                                      6. associate-*l/N/A

                                                        \[\leadsto \frac{\left(\left(D \cdot D\right) \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \cdot \frac{-1}{8}}{\color{blue}{\ell \cdot d}} \]
                                                      7. lower-/.f64N/A

                                                        \[\leadsto \frac{\left(\left(D \cdot D\right) \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \cdot \frac{-1}{8}}{\color{blue}{\ell \cdot d}} \]
                                                    8. Applied rewrites29.7%

                                                      \[\leadsto \frac{\left(\left(\left(D \cdot D\right) \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right) \cdot -0.125}{\color{blue}{\ell \cdot d}} \]

                                                    if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 9.9999999999999993e158

                                                    1. Initial program 65.7%

                                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    2. Step-by-step derivation
                                                      1. lift-*.f64N/A

                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      2. *-commutativeN/A

                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      3. lower-*.f6465.7%

                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      4. lift-pow.f64N/A

                                                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      5. lift-/.f64N/A

                                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      6. metadata-evalN/A

                                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      7. unpow1/2N/A

                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      8. lower-sqrt.f6465.7%

                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      9. lift-pow.f64N/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      10. lift-/.f64N/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      11. metadata-evalN/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      12. unpow1/2N/A

                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      13. lower-sqrt.f6465.7%

                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    3. Applied rewrites65.7%

                                                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                    4. Taylor expanded in d around inf

                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                    5. Step-by-step derivation
                                                      1. Applied rewrites39.0%

                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                      2. Step-by-step derivation
                                                        1. lift-/.f64N/A

                                                          \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                        2. mult-flipN/A

                                                          \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                        3. *-commutativeN/A

                                                          \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                        4. lower-*.f64N/A

                                                          \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                        5. lower-/.f6439.0%

                                                          \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                      3. Applied rewrites39.0%

                                                        \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                                                      if 9.9999999999999993e158 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                                      1. Initial program 65.7%

                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      2. Step-by-step derivation
                                                        1. lift-*.f64N/A

                                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        2. *-commutativeN/A

                                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        3. lower-*.f6465.7%

                                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        4. lift-pow.f64N/A

                                                          \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        5. lift-/.f64N/A

                                                          \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        6. metadata-evalN/A

                                                          \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        7. unpow1/2N/A

                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        8. lower-sqrt.f6465.7%

                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        9. lift-pow.f64N/A

                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        10. lift-/.f64N/A

                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        11. metadata-evalN/A

                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        12. unpow1/2N/A

                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                        13. lower-sqrt.f6465.7%

                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      3. Applied rewrites65.7%

                                                        \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                      4. Taylor expanded in d around inf

                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                      5. Step-by-step derivation
                                                        1. Applied rewrites39.0%

                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                        2. Step-by-step derivation
                                                          1. Applied rewrites43.2%

                                                            \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]

                                                          if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                                          1. Initial program 65.7%

                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          2. Taylor expanded in d around 0

                                                            \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                          3. Step-by-step derivation
                                                            1. lower-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                            2. lower-/.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                          4. Applied rewrites18.1%

                                                            \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                          5. Step-by-step derivation
                                                            1. lift-/.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                            2. lift-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2}} \cdot \ell} \]
                                                            3. lift-pow.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                            4. pow2N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                            5. lift-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                            6. lift-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \color{blue}{\ell}} \]
                                                            7. lift-pow.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell} \]
                                                            8. pow2N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(d \cdot d\right) \cdot \ell} \]
                                                            9. associate-*l*N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}} \]
                                                            10. *-commutativeN/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \left(\ell \cdot \color{blue}{d}\right)} \]
                                                            11. *-commutativeN/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(\ell \cdot d\right) \cdot \color{blue}{d}} \]
                                                            12. times-fracN/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                                            13. lower-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                                            14. lower-/.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\color{blue}{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                                            15. lower-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \color{blue}{\left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                                            16. lower-/.f6424.2%

                                                              \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{\color{blue}{d}}\right) \]
                                                          6. Applied rewrites27.7%

                                                            \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right) \]
                                                          7. Step-by-step derivation
                                                            1. lift-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right) \]
                                                            2. *-commutativeN/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d} \cdot \color{blue}{\frac{D \cdot D}{\ell \cdot d}}\right) \]
                                                            3. lift-/.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d} \cdot \frac{D \cdot D}{\color{blue}{\ell \cdot d}}\right) \]
                                                            4. lift-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d} \cdot \frac{D \cdot D}{\color{blue}{\ell} \cdot d}\right) \]
                                                            5. associate-/l*N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d} \cdot \left(D \cdot \color{blue}{\frac{D}{\ell \cdot d}}\right)\right) \]
                                                            6. associate-*r*N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d} \cdot D\right) \cdot \color{blue}{\frac{D}{\ell \cdot d}}\right) \]
                                                            7. lower-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d} \cdot D\right) \cdot \color{blue}{\frac{D}{\ell \cdot d}}\right) \]
                                                          8. Applied rewrites31.3%

                                                            \[\leadsto -0.125 \cdot \left(\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \left|d\right|}{\sqrt{\ell \cdot h} \cdot d} \cdot D\right) \cdot \color{blue}{\frac{D}{\ell \cdot d}}\right) \]
                                                        3. Recombined 4 regimes into one program.
                                                        4. Add Preprocessing

                                                        Alternative 19: 68.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{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_1 := \sqrt{\ell \cdot h}\\ t_2 := \frac{\left(\left(\left(\mathsf{max}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)\right) \cdot \left(\left(\mathsf{min}\left(M, D\right) \cdot \mathsf{min}\left(M, D\right)\right) \cdot h\right)\right) \cdot \frac{\left|d\right|}{t\_1 \cdot d}\right) \cdot -0.125}{\ell \cdot d}\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_0 \leq 10^{+159}:\\ \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\frac{\left|d\right|}{t\_1} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
                                                        (FPCore (d h l M D)
                                                          :precision binary64
                                                          (let* ((t_0
                                                                (*
                                                                 (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
                                                                 (-
                                                                  1.0
                                                                  (*
                                                                   (*
                                                                    (/ 1.0 2.0)
                                                                    (pow (/ (* (fmin M D) (fmax M D)) (* 2.0 d)) 2.0))
                                                                   (/ h l)))))
                                                               (t_1 (sqrt (* l h)))
                                                               (t_2
                                                                (/
                                                                 (*
                                                                  (*
                                                                   (*
                                                                    (* (fmax M D) (fmax M D))
                                                                    (* (* (fmin M D) (fmin M D)) h))
                                                                   (/ (fabs d) (* t_1 d)))
                                                                  -0.125)
                                                                 (* l d))))
                                                          (if (<= t_0 0.0)
                                                            t_2
                                                            (if (<= t_0 1e+159)
                                                              (* (* (sqrt (* (/ 1.0 l) d)) (sqrt (/ d h))) 1.0)
                                                              (if (<= t_0 INFINITY) (* (/ (fabs d) t_1) 1.0) t_2)))))
                                                        double code(double d, double h, double l, double M, double D) {
                                                        	double t_0 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)));
                                                        	double t_1 = sqrt((l * h));
                                                        	double t_2 = ((((fmax(M, D) * fmax(M, D)) * ((fmin(M, D) * fmin(M, D)) * h)) * (fabs(d) / (t_1 * d))) * -0.125) / (l * d);
                                                        	double tmp;
                                                        	if (t_0 <= 0.0) {
                                                        		tmp = t_2;
                                                        	} else if (t_0 <= 1e+159) {
                                                        		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                        	} else if (t_0 <= ((double) INFINITY)) {
                                                        		tmp = (fabs(d) / t_1) * 1.0;
                                                        	} else {
                                                        		tmp = t_2;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        public static double code(double d, double h, double l, double M, double D) {
                                                        	double t_0 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)));
                                                        	double t_1 = Math.sqrt((l * h));
                                                        	double t_2 = ((((fmax(M, D) * fmax(M, D)) * ((fmin(M, D) * fmin(M, D)) * h)) * (Math.abs(d) / (t_1 * d))) * -0.125) / (l * d);
                                                        	double tmp;
                                                        	if (t_0 <= 0.0) {
                                                        		tmp = t_2;
                                                        	} else if (t_0 <= 1e+159) {
                                                        		tmp = (Math.sqrt(((1.0 / l) * d)) * Math.sqrt((d / h))) * 1.0;
                                                        	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                                                        		tmp = (Math.abs(d) / t_1) * 1.0;
                                                        	} else {
                                                        		tmp = t_2;
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(d, h, l, M, D):
                                                        	t_0 = (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)))
                                                        	t_1 = math.sqrt((l * h))
                                                        	t_2 = ((((fmax(M, D) * fmax(M, D)) * ((fmin(M, D) * fmin(M, D)) * h)) * (math.fabs(d) / (t_1 * d))) * -0.125) / (l * d)
                                                        	tmp = 0
                                                        	if t_0 <= 0.0:
                                                        		tmp = t_2
                                                        	elif t_0 <= 1e+159:
                                                        		tmp = (math.sqrt(((1.0 / l) * d)) * math.sqrt((d / h))) * 1.0
                                                        	elif t_0 <= math.inf:
                                                        		tmp = (math.fabs(d) / t_1) * 1.0
                                                        	else:
                                                        		tmp = t_2
                                                        	return tmp
                                                        
                                                        function code(d, h, l, M, D)
                                                        	t_0 = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(fmin(M, D) * fmax(M, D)) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                        	t_1 = sqrt(Float64(l * h))
                                                        	t_2 = Float64(Float64(Float64(Float64(Float64(fmax(M, D) * fmax(M, D)) * Float64(Float64(fmin(M, D) * fmin(M, D)) * h)) * Float64(abs(d) / Float64(t_1 * d))) * -0.125) / Float64(l * d))
                                                        	tmp = 0.0
                                                        	if (t_0 <= 0.0)
                                                        		tmp = t_2;
                                                        	elseif (t_0 <= 1e+159)
                                                        		tmp = Float64(Float64(sqrt(Float64(Float64(1.0 / l) * d)) * sqrt(Float64(d / h))) * 1.0);
                                                        	elseif (t_0 <= Inf)
                                                        		tmp = Float64(Float64(abs(d) / t_1) * 1.0);
                                                        	else
                                                        		tmp = t_2;
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(d, h, l, M, D)
                                                        	t_0 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((min(M, D) * max(M, D)) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                                        	t_1 = sqrt((l * h));
                                                        	t_2 = ((((max(M, D) * max(M, D)) * ((min(M, D) * min(M, D)) * h)) * (abs(d) / (t_1 * d))) * -0.125) / (l * d);
                                                        	tmp = 0.0;
                                                        	if (t_0 <= 0.0)
                                                        		tmp = t_2;
                                                        	elseif (t_0 <= 1e+159)
                                                        		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                        	elseif (t_0 <= Inf)
                                                        		tmp = (abs(d) / t_1) * 1.0;
                                                        	else
                                                        		tmp = t_2;
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(N[Min[M, D], $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[Max[M, D], $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Min[M, D], $MachinePrecision] * N[Min[M, D], $MachinePrecision]), $MachinePrecision] * h), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[d], $MachinePrecision] / N[(t$95$1 * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], t$95$2, If[LessEqual[t$95$0, 1e+159], N[(N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(N[Abs[d], $MachinePrecision] / t$95$1), $MachinePrecision] * 1.0), $MachinePrecision], t$95$2]]]]]]
                                                        
                                                        \begin{array}{l}
                                                        t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                        t_1 := \sqrt{\ell \cdot h}\\
                                                        t_2 := \frac{\left(\left(\left(\mathsf{max}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)\right) \cdot \left(\left(\mathsf{min}\left(M, D\right) \cdot \mathsf{min}\left(M, D\right)\right) \cdot h\right)\right) \cdot \frac{\left|d\right|}{t\_1 \cdot d}\right) \cdot -0.125}{\ell \cdot d}\\
                                                        \mathbf{if}\;t\_0 \leq 0:\\
                                                        \;\;\;\;t\_2\\
                                                        
                                                        \mathbf{elif}\;t\_0 \leq 10^{+159}:\\
                                                        \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                                                        
                                                        \mathbf{elif}\;t\_0 \leq \infty:\\
                                                        \;\;\;\;\frac{\left|d\right|}{t\_1} \cdot 1\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;t\_2\\
                                                        
                                                        
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -0.0 or +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                                          1. Initial program 65.7%

                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          2. Taylor expanded in d around 0

                                                            \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                          3. Step-by-step derivation
                                                            1. lower-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                            2. lower-/.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                          4. Applied rewrites18.1%

                                                            \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                          5. Step-by-step derivation
                                                            1. lift-/.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                            2. lift-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2}} \cdot \ell} \]
                                                            3. lift-pow.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                            4. pow2N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                            5. lift-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{\color{blue}{d}}^{2} \cdot \ell} \]
                                                            6. lift-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \color{blue}{\ell}} \]
                                                            7. lift-pow.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell} \]
                                                            8. pow2N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(d \cdot d\right) \cdot \ell} \]
                                                            9. associate-*l*N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}} \]
                                                            10. *-commutativeN/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{d \cdot \left(\ell \cdot \color{blue}{d}\right)} \]
                                                            11. *-commutativeN/A

                                                              \[\leadsto \frac{-1}{8} \cdot \frac{\left(D \cdot D\right) \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\left(\ell \cdot d\right) \cdot \color{blue}{d}} \]
                                                            12. times-fracN/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                                            13. lower-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{d}}\right) \]
                                                            14. lower-/.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\color{blue}{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                                            15. lower-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \color{blue}{\left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}}{d}\right) \]
                                                            16. lower-/.f6424.2%

                                                              \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{{M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)}{\color{blue}{d}}\right) \]
                                                          6. Applied rewrites27.7%

                                                            \[\leadsto -0.125 \cdot \left(\frac{D \cdot D}{\ell \cdot d} \cdot \color{blue}{\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}\right) \]
                                                          7. Step-by-step derivation
                                                            1. lift-*.f64N/A

                                                              \[\leadsto \frac{-1}{8} \cdot \color{blue}{\left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right)} \]
                                                            2. *-commutativeN/A

                                                              \[\leadsto \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \cdot \color{blue}{\frac{-1}{8}} \]
                                                            3. lift-*.f64N/A

                                                              \[\leadsto \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \cdot \frac{-1}{8} \]
                                                            4. lift-/.f64N/A

                                                              \[\leadsto \left(\frac{D \cdot D}{\ell \cdot d} \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \cdot \frac{-1}{8} \]
                                                            5. associate-*l/N/A

                                                              \[\leadsto \frac{\left(D \cdot D\right) \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}}{\ell \cdot d} \cdot \frac{-1}{8} \]
                                                            6. associate-*l/N/A

                                                              \[\leadsto \frac{\left(\left(D \cdot D\right) \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \cdot \frac{-1}{8}}{\color{blue}{\ell \cdot d}} \]
                                                            7. lower-/.f64N/A

                                                              \[\leadsto \frac{\left(\left(D \cdot D\right) \cdot \frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{d}\right) \cdot \frac{-1}{8}}{\color{blue}{\ell \cdot d}} \]
                                                          8. Applied rewrites29.7%

                                                            \[\leadsto \frac{\left(\left(\left(D \cdot D\right) \cdot \left(\left(M \cdot M\right) \cdot h\right)\right) \cdot \frac{\left|d\right|}{\sqrt{\ell \cdot h} \cdot d}\right) \cdot -0.125}{\color{blue}{\ell \cdot d}} \]

                                                          if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 9.9999999999999993e158

                                                          1. Initial program 65.7%

                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          2. Step-by-step derivation
                                                            1. lift-*.f64N/A

                                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            2. *-commutativeN/A

                                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            3. lower-*.f6465.7%

                                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            4. lift-pow.f64N/A

                                                              \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            5. lift-/.f64N/A

                                                              \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            6. metadata-evalN/A

                                                              \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            7. unpow1/2N/A

                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            8. lower-sqrt.f6465.7%

                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            9. lift-pow.f64N/A

                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            10. lift-/.f64N/A

                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            11. metadata-evalN/A

                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            12. unpow1/2N/A

                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            13. lower-sqrt.f6465.7%

                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          3. Applied rewrites65.7%

                                                            \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                          4. Taylor expanded in d around inf

                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                          5. Step-by-step derivation
                                                            1. Applied rewrites39.0%

                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                            2. Step-by-step derivation
                                                              1. lift-/.f64N/A

                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                              2. mult-flipN/A

                                                                \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                              3. *-commutativeN/A

                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                              4. lower-*.f64N/A

                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                              5. lower-/.f6439.0%

                                                                \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                            3. Applied rewrites39.0%

                                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                                                            if 9.9999999999999993e158 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                                            1. Initial program 65.7%

                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            2. Step-by-step derivation
                                                              1. lift-*.f64N/A

                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              2. *-commutativeN/A

                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              3. lower-*.f6465.7%

                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              4. lift-pow.f64N/A

                                                                \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              5. lift-/.f64N/A

                                                                \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              6. metadata-evalN/A

                                                                \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              7. unpow1/2N/A

                                                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              8. lower-sqrt.f6465.7%

                                                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              9. lift-pow.f64N/A

                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              10. lift-/.f64N/A

                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              11. metadata-evalN/A

                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              12. unpow1/2N/A

                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                              13. lower-sqrt.f6465.7%

                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            3. Applied rewrites65.7%

                                                              \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                            4. Taylor expanded in d around inf

                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                            5. Step-by-step derivation
                                                              1. Applied rewrites39.0%

                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites43.2%

                                                                  \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                              3. Recombined 3 regimes into one program.
                                                              4. Add Preprocessing

                                                              Alternative 20: 65.5% accurate, 0.3× speedup?

                                                              \[\begin{array}{l} t_0 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\ t_1 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\ t_2 := \frac{\left(\left(\left(\left(t\_1 \cdot t\_1\right) \cdot t\_0\right) \cdot t\_0\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{\left(d \cdot d\right) \cdot \ell} \cdot -0.125\\ t_3 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{t\_0 \cdot t\_1}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_3 \leq -5 \cdot 10^{+33}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq 10^{+159}:\\ \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
                                                              (FPCore (d h l M D)
                                                                :precision binary64
                                                                (let* ((t_0 (fmin (fabs M) (fabs D)))
                                                                     (t_1 (fmax (fabs M) (fabs D)))
                                                                     (t_2
                                                                      (*
                                                                       (/
                                                                        (*
                                                                         (* (* (* (* t_1 t_1) t_0) t_0) h)
                                                                         (/ (fabs d) (sqrt (* h l))))
                                                                        (* (* d d) l))
                                                                       -0.125))
                                                                     (t_3
                                                                      (*
                                                                       (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
                                                                       (-
                                                                        1.0
                                                                        (*
                                                                         (* (/ 1.0 2.0) (pow (/ (* t_0 t_1) (* 2.0 d)) 2.0))
                                                                         (/ h l))))))
                                                                (if (<= t_3 -5e+33)
                                                                  t_2
                                                                  (if (<= t_3 1e+159)
                                                                    (* (* (sqrt (* (/ 1.0 l) d)) (sqrt (/ d h))) 1.0)
                                                                    (if (<= t_3 INFINITY)
                                                                      (* (/ (fabs d) (sqrt (* l h))) 1.0)
                                                                      t_2)))))
                                                              double code(double d, double h, double l, double M, double D) {
                                                              	double t_0 = fmin(fabs(M), fabs(D));
                                                              	double t_1 = fmax(fabs(M), fabs(D));
                                                              	double t_2 = ((((((t_1 * t_1) * t_0) * t_0) * h) * (fabs(d) / sqrt((h * l)))) / ((d * d) * l)) * -0.125;
                                                              	double t_3 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)));
                                                              	double tmp;
                                                              	if (t_3 <= -5e+33) {
                                                              		tmp = t_2;
                                                              	} else if (t_3 <= 1e+159) {
                                                              		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                              	} else if (t_3 <= ((double) INFINITY)) {
                                                              		tmp = (fabs(d) / sqrt((l * h))) * 1.0;
                                                              	} else {
                                                              		tmp = t_2;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              public static double code(double d, double h, double l, double M, double D) {
                                                              	double t_0 = fmin(Math.abs(M), Math.abs(D));
                                                              	double t_1 = fmax(Math.abs(M), Math.abs(D));
                                                              	double t_2 = ((((((t_1 * t_1) * t_0) * t_0) * h) * (Math.abs(d) / Math.sqrt((h * l)))) / ((d * d) * l)) * -0.125;
                                                              	double t_3 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)));
                                                              	double tmp;
                                                              	if (t_3 <= -5e+33) {
                                                              		tmp = t_2;
                                                              	} else if (t_3 <= 1e+159) {
                                                              		tmp = (Math.sqrt(((1.0 / l) * d)) * Math.sqrt((d / h))) * 1.0;
                                                              	} else if (t_3 <= Double.POSITIVE_INFINITY) {
                                                              		tmp = (Math.abs(d) / Math.sqrt((l * h))) * 1.0;
                                                              	} else {
                                                              		tmp = t_2;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              def code(d, h, l, M, D):
                                                              	t_0 = fmin(math.fabs(M), math.fabs(D))
                                                              	t_1 = fmax(math.fabs(M), math.fabs(D))
                                                              	t_2 = ((((((t_1 * t_1) * t_0) * t_0) * h) * (math.fabs(d) / math.sqrt((h * l)))) / ((d * d) * l)) * -0.125
                                                              	t_3 = (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((t_0 * t_1) / (2.0 * d)), 2.0)) * (h / l)))
                                                              	tmp = 0
                                                              	if t_3 <= -5e+33:
                                                              		tmp = t_2
                                                              	elif t_3 <= 1e+159:
                                                              		tmp = (math.sqrt(((1.0 / l) * d)) * math.sqrt((d / h))) * 1.0
                                                              	elif t_3 <= math.inf:
                                                              		tmp = (math.fabs(d) / math.sqrt((l * h))) * 1.0
                                                              	else:
                                                              		tmp = t_2
                                                              	return tmp
                                                              
                                                              function code(d, h, l, M, D)
                                                              	t_0 = fmin(abs(M), abs(D))
                                                              	t_1 = fmax(abs(M), abs(D))
                                                              	t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(t_1 * t_1) * t_0) * t_0) * h) * Float64(abs(d) / sqrt(Float64(h * l)))) / Float64(Float64(d * d) * l)) * -0.125)
                                                              	t_3 = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(t_0 * t_1) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                              	tmp = 0.0
                                                              	if (t_3 <= -5e+33)
                                                              		tmp = t_2;
                                                              	elseif (t_3 <= 1e+159)
                                                              		tmp = Float64(Float64(sqrt(Float64(Float64(1.0 / l) * d)) * sqrt(Float64(d / h))) * 1.0);
                                                              	elseif (t_3 <= Inf)
                                                              		tmp = Float64(Float64(abs(d) / sqrt(Float64(l * h))) * 1.0);
                                                              	else
                                                              		tmp = t_2;
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              function tmp_2 = code(d, h, l, M, D)
                                                              	t_0 = min(abs(M), abs(D));
                                                              	t_1 = max(abs(M), abs(D));
                                                              	t_2 = ((((((t_1 * t_1) * t_0) * t_0) * h) * (abs(d) / sqrt((h * l)))) / ((d * d) * l)) * -0.125;
                                                              	t_3 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((t_0 * t_1) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                                              	tmp = 0.0;
                                                              	if (t_3 <= -5e+33)
                                                              		tmp = t_2;
                                                              	elseif (t_3 <= 1e+159)
                                                              		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                              	elseif (t_3 <= Inf)
                                                              		tmp = (abs(d) / sqrt((l * h))) * 1.0;
                                                              	else
                                                              		tmp = t_2;
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Min[N[Abs[M], $MachinePrecision], N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Max[N[Abs[M], $MachinePrecision], N[Abs[D], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision] * h), $MachinePrecision] * N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(d * d), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(t$95$0 * t$95$1), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+33], t$95$2, If[LessEqual[t$95$3, 1e+159], N[(N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], t$95$2]]]]]]]
                                                              
                                                              \begin{array}{l}
                                                              t_0 := \mathsf{min}\left(\left|M\right|, \left|D\right|\right)\\
                                                              t_1 := \mathsf{max}\left(\left|M\right|, \left|D\right|\right)\\
                                                              t_2 := \frac{\left(\left(\left(\left(t\_1 \cdot t\_1\right) \cdot t\_0\right) \cdot t\_0\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{\left(d \cdot d\right) \cdot \ell} \cdot -0.125\\
                                                              t_3 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{t\_0 \cdot t\_1}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                              \mathbf{if}\;t\_3 \leq -5 \cdot 10^{+33}:\\
                                                              \;\;\;\;t\_2\\
                                                              
                                                              \mathbf{elif}\;t\_3 \leq 10^{+159}:\\
                                                              \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                                                              
                                                              \mathbf{elif}\;t\_3 \leq \infty:\\
                                                              \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;t\_2\\
                                                              
                                                              
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 3 regimes
                                                              2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -4.9999999999999997e33 or +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l))))

                                                                1. Initial program 65.7%

                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                2. Taylor expanded in d around 0

                                                                  \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                3. Step-by-step derivation
                                                                  1. lower-*.f64N/A

                                                                    \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                  2. lower-/.f64N/A

                                                                    \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                                4. Applied rewrites18.1%

                                                                  \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                5. Applied rewrites24.2%

                                                                  \[\leadsto \frac{\left(\left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right) \cdot h\right) \cdot \frac{\left|d\right|}{\sqrt{h \cdot \ell}}}{\left(d \cdot d\right) \cdot \ell} \cdot \color{blue}{-0.125} \]

                                                                if -4.9999999999999997e33 < (*.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)))) < 9.9999999999999993e158

                                                                1. Initial program 65.7%

                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                2. Step-by-step derivation
                                                                  1. lift-*.f64N/A

                                                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  2. *-commutativeN/A

                                                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  3. lower-*.f6465.7%

                                                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  4. lift-pow.f64N/A

                                                                    \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  5. lift-/.f64N/A

                                                                    \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  6. metadata-evalN/A

                                                                    \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  7. unpow1/2N/A

                                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  8. lower-sqrt.f6465.7%

                                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  9. lift-pow.f64N/A

                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  10. lift-/.f64N/A

                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  11. metadata-evalN/A

                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  12. unpow1/2N/A

                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  13. lower-sqrt.f6465.7%

                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                3. Applied rewrites65.7%

                                                                  \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                4. Taylor expanded in d around inf

                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                5. Step-by-step derivation
                                                                  1. Applied rewrites39.0%

                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                  2. Step-by-step derivation
                                                                    1. lift-/.f64N/A

                                                                      \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                    2. mult-flipN/A

                                                                      \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                    3. *-commutativeN/A

                                                                      \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                    4. lower-*.f64N/A

                                                                      \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                    5. lower-/.f6439.0%

                                                                      \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                  3. Applied rewrites39.0%

                                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                                                                  if 9.9999999999999993e158 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < +inf.0

                                                                  1. Initial program 65.7%

                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  2. Step-by-step derivation
                                                                    1. lift-*.f64N/A

                                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    2. *-commutativeN/A

                                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    3. lower-*.f6465.7%

                                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    4. lift-pow.f64N/A

                                                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    5. lift-/.f64N/A

                                                                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    6. metadata-evalN/A

                                                                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    7. unpow1/2N/A

                                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    8. lower-sqrt.f6465.7%

                                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    9. lift-pow.f64N/A

                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    10. lift-/.f64N/A

                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    11. metadata-evalN/A

                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    12. unpow1/2N/A

                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                    13. lower-sqrt.f6465.7%

                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  3. Applied rewrites65.7%

                                                                    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                  4. Taylor expanded in d around inf

                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                  5. Step-by-step derivation
                                                                    1. Applied rewrites39.0%

                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                    2. Step-by-step derivation
                                                                      1. Applied rewrites43.2%

                                                                        \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                    3. Recombined 3 regimes into one program.
                                                                    4. Add Preprocessing

                                                                    Alternative 21: 57.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{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-80}:\\ \;\;\;\;\frac{\frac{\left(-0.125 \cdot \left(\left(\left(\mathsf{max}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)\right) \cdot \mathsf{min}\left(M, D\right)\right) \cdot \mathsf{min}\left(M, D\right)\right)\right) \cdot \frac{\left|d\right|}{\sqrt{\frac{\ell}{h}}}}{\ell \cdot d}}{d}\\ \mathbf{elif}\;t\_0 \leq 10^{+159}:\\ \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \end{array} \]
                                                                    (FPCore (d h l M D)
                                                                      :precision binary64
                                                                      (let* ((t_0
                                                                            (*
                                                                             (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
                                                                             (-
                                                                              1.0
                                                                              (*
                                                                               (*
                                                                                (/ 1.0 2.0)
                                                                                (pow (/ (* (fmin M D) (fmax M D)) (* 2.0 d)) 2.0))
                                                                               (/ h l))))))
                                                                      (if (<= t_0 -1e-80)
                                                                        (/
                                                                         (/
                                                                          (*
                                                                           (*
                                                                            -0.125
                                                                            (* (* (* (fmax M D) (fmax M D)) (fmin M D)) (fmin M D)))
                                                                           (/ (fabs d) (sqrt (/ l h))))
                                                                          (* l d))
                                                                         d)
                                                                        (if (<= t_0 1e+159)
                                                                          (* (* (sqrt (* (/ 1.0 l) d)) (sqrt (/ d h))) 1.0)
                                                                          (* (/ (fabs d) (sqrt (* l h))) 1.0)))))
                                                                    double code(double d, double h, double l, double M, double D) {
                                                                    	double t_0 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)));
                                                                    	double tmp;
                                                                    	if (t_0 <= -1e-80) {
                                                                    		tmp = (((-0.125 * (((fmax(M, D) * fmax(M, D)) * fmin(M, D)) * fmin(M, D))) * (fabs(d) / sqrt((l / h)))) / (l * d)) / d;
                                                                    	} else if (t_0 <= 1e+159) {
                                                                    		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                                    	} else {
                                                                    		tmp = (fabs(d) / sqrt((l * h))) * 1.0;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    module fmin_fmax_functions
                                                                        implicit none
                                                                        private
                                                                        public fmax
                                                                        public fmin
                                                                    
                                                                        interface fmax
                                                                            module procedure fmax88
                                                                            module procedure fmax44
                                                                            module procedure fmax84
                                                                            module procedure fmax48
                                                                        end interface
                                                                        interface fmin
                                                                            module procedure fmin88
                                                                            module procedure fmin44
                                                                            module procedure fmin84
                                                                            module procedure fmin48
                                                                        end interface
                                                                    contains
                                                                        real(8) function fmax88(x, y) result (res)
                                                                            real(8), intent (in) :: x
                                                                            real(8), intent (in) :: y
                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                        end function
                                                                        real(4) function fmax44(x, y) result (res)
                                                                            real(4), intent (in) :: x
                                                                            real(4), intent (in) :: y
                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                        end function
                                                                        real(8) function fmax84(x, y) result(res)
                                                                            real(8), intent (in) :: x
                                                                            real(4), intent (in) :: y
                                                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                        end function
                                                                        real(8) function fmax48(x, y) result(res)
                                                                            real(4), intent (in) :: x
                                                                            real(8), intent (in) :: y
                                                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                        end function
                                                                        real(8) function fmin88(x, y) result (res)
                                                                            real(8), intent (in) :: x
                                                                            real(8), intent (in) :: y
                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                        end function
                                                                        real(4) function fmin44(x, y) result (res)
                                                                            real(4), intent (in) :: x
                                                                            real(4), intent (in) :: y
                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                        end function
                                                                        real(8) function fmin84(x, y) result(res)
                                                                            real(8), intent (in) :: x
                                                                            real(4), intent (in) :: y
                                                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                        end function
                                                                        real(8) function fmin48(x, y) result(res)
                                                                            real(4), intent (in) :: x
                                                                            real(8), intent (in) :: y
                                                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                        end function
                                                                    end module
                                                                    
                                                                    real(8) function code(d, h, l, m, d_1)
                                                                    use fmin_fmax_functions
                                                                        real(8), intent (in) :: d
                                                                        real(8), intent (in) :: h
                                                                        real(8), intent (in) :: l
                                                                        real(8), intent (in) :: m
                                                                        real(8), intent (in) :: d_1
                                                                        real(8) :: t_0
                                                                        real(8) :: tmp
                                                                        t_0 = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((fmin(m, d_1) * fmax(m, d_1)) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
                                                                        if (t_0 <= (-1d-80)) then
                                                                            tmp = ((((-0.125d0) * (((fmax(m, d_1) * fmax(m, d_1)) * fmin(m, d_1)) * fmin(m, d_1))) * (abs(d) / sqrt((l / h)))) / (l * d)) / d
                                                                        else if (t_0 <= 1d+159) then
                                                                            tmp = (sqrt(((1.0d0 / l) * d)) * sqrt((d / h))) * 1.0d0
                                                                        else
                                                                            tmp = (abs(d) / sqrt((l * h))) * 1.0d0
                                                                        end if
                                                                        code = tmp
                                                                    end function
                                                                    
                                                                    public static double code(double d, double h, double l, double M, double D) {
                                                                    	double t_0 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)));
                                                                    	double tmp;
                                                                    	if (t_0 <= -1e-80) {
                                                                    		tmp = (((-0.125 * (((fmax(M, D) * fmax(M, D)) * fmin(M, D)) * fmin(M, D))) * (Math.abs(d) / Math.sqrt((l / h)))) / (l * d)) / d;
                                                                    	} else if (t_0 <= 1e+159) {
                                                                    		tmp = (Math.sqrt(((1.0 / l) * d)) * Math.sqrt((d / h))) * 1.0;
                                                                    	} else {
                                                                    		tmp = (Math.abs(d) / Math.sqrt((l * h))) * 1.0;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    def code(d, h, l, M, D):
                                                                    	t_0 = (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((fmin(M, D) * fmax(M, D)) / (2.0 * d)), 2.0)) * (h / l)))
                                                                    	tmp = 0
                                                                    	if t_0 <= -1e-80:
                                                                    		tmp = (((-0.125 * (((fmax(M, D) * fmax(M, D)) * fmin(M, D)) * fmin(M, D))) * (math.fabs(d) / math.sqrt((l / h)))) / (l * d)) / d
                                                                    	elif t_0 <= 1e+159:
                                                                    		tmp = (math.sqrt(((1.0 / l) * d)) * math.sqrt((d / h))) * 1.0
                                                                    	else:
                                                                    		tmp = (math.fabs(d) / math.sqrt((l * h))) * 1.0
                                                                    	return tmp
                                                                    
                                                                    function code(d, h, l, M, D)
                                                                    	t_0 = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(fmin(M, D) * fmax(M, D)) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                                    	tmp = 0.0
                                                                    	if (t_0 <= -1e-80)
                                                                    		tmp = Float64(Float64(Float64(Float64(-0.125 * Float64(Float64(Float64(fmax(M, D) * fmax(M, D)) * fmin(M, D)) * fmin(M, D))) * Float64(abs(d) / sqrt(Float64(l / h)))) / Float64(l * d)) / d);
                                                                    	elseif (t_0 <= 1e+159)
                                                                    		tmp = Float64(Float64(sqrt(Float64(Float64(1.0 / l) * d)) * sqrt(Float64(d / h))) * 1.0);
                                                                    	else
                                                                    		tmp = Float64(Float64(abs(d) / sqrt(Float64(l * h))) * 1.0);
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    function tmp_2 = code(d, h, l, M, D)
                                                                    	t_0 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((min(M, D) * max(M, D)) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                                                    	tmp = 0.0;
                                                                    	if (t_0 <= -1e-80)
                                                                    		tmp = (((-0.125 * (((max(M, D) * max(M, D)) * min(M, D)) * min(M, D))) * (abs(d) / sqrt((l / h)))) / (l * d)) / d;
                                                                    	elseif (t_0 <= 1e+159)
                                                                    		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                                    	else
                                                                    		tmp = (abs(d) / sqrt((l * h))) * 1.0;
                                                                    	end
                                                                    	tmp_2 = tmp;
                                                                    end
                                                                    
                                                                    code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(N[Min[M, D], $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e-80], N[(N[(N[(N[(-0.125 * N[(N[(N[(N[Max[M, D], $MachinePrecision] * N[Max[M, D], $MachinePrecision]), $MachinePrecision] * N[Min[M, D], $MachinePrecision]), $MachinePrecision] * N[Min[M, D], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], If[LessEqual[t$95$0, 1e+159], N[(N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
                                                                    
                                                                    \begin{array}{l}
                                                                    t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{\mathsf{min}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                                    \mathbf{if}\;t\_0 \leq -1 \cdot 10^{-80}:\\
                                                                    \;\;\;\;\frac{\frac{\left(-0.125 \cdot \left(\left(\left(\mathsf{max}\left(M, D\right) \cdot \mathsf{max}\left(M, D\right)\right) \cdot \mathsf{min}\left(M, D\right)\right) \cdot \mathsf{min}\left(M, D\right)\right)\right) \cdot \frac{\left|d\right|}{\sqrt{\frac{\ell}{h}}}}{\ell \cdot d}}{d}\\
                                                                    
                                                                    \mathbf{elif}\;t\_0 \leq 10^{+159}:\\
                                                                    \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 3 regimes
                                                                    2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -9.9999999999999996e-81

                                                                      1. Initial program 65.7%

                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      2. Taylor expanded in d around 0

                                                                        \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                      3. Step-by-step derivation
                                                                        1. lower-*.f64N/A

                                                                          \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                        2. lower-/.f64N/A

                                                                          \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                                      4. Applied rewrites18.1%

                                                                        \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                      5. Applied rewrites29.2%

                                                                        \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{\color{blue}{d}} \]
                                                                      6. Taylor expanded in h around inf

                                                                        \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \frac{\left|d\right|}{\sqrt{\frac{\ell}{h}}}}{\ell \cdot d}}{d} \]
                                                                      7. Step-by-step derivation
                                                                        1. lower-/.f64N/A

                                                                          \[\leadsto \frac{\frac{\left(\frac{-1}{8} \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \frac{\left|d\right|}{\sqrt{\frac{\ell}{h}}}}{\ell \cdot d}}{d} \]
                                                                        2. lower-fabs.f64N/A

                                                                          \[\leadsto \frac{\frac{\left(\frac{-1}{8} \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \frac{\left|d\right|}{\sqrt{\frac{\ell}{h}}}}{\ell \cdot d}}{d} \]
                                                                        3. lower-sqrt.f64N/A

                                                                          \[\leadsto \frac{\frac{\left(\frac{-1}{8} \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \frac{\left|d\right|}{\sqrt{\frac{\ell}{h}}}}{\ell \cdot d}}{d} \]
                                                                        4. lower-/.f6419.0%

                                                                          \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \frac{\left|d\right|}{\sqrt{\frac{\ell}{h}}}}{\ell \cdot d}}{d} \]
                                                                      8. Applied rewrites19.0%

                                                                        \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \frac{\left|d\right|}{\sqrt{\frac{\ell}{h}}}}{\ell \cdot d}}{d} \]

                                                                      if -9.9999999999999996e-81 < (*.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)))) < 9.9999999999999993e158

                                                                      1. Initial program 65.7%

                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      2. Step-by-step derivation
                                                                        1. lift-*.f64N/A

                                                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        2. *-commutativeN/A

                                                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        3. lower-*.f6465.7%

                                                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        4. lift-pow.f64N/A

                                                                          \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        5. lift-/.f64N/A

                                                                          \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        6. metadata-evalN/A

                                                                          \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        7. unpow1/2N/A

                                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        8. lower-sqrt.f6465.7%

                                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        9. lift-pow.f64N/A

                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        10. lift-/.f64N/A

                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        11. metadata-evalN/A

                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        12. unpow1/2N/A

                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        13. lower-sqrt.f6465.7%

                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      3. Applied rewrites65.7%

                                                                        \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                      4. Taylor expanded in d around inf

                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                      5. Step-by-step derivation
                                                                        1. Applied rewrites39.0%

                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                        2. Step-by-step derivation
                                                                          1. lift-/.f64N/A

                                                                            \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                          2. mult-flipN/A

                                                                            \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                          3. *-commutativeN/A

                                                                            \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                          4. lower-*.f64N/A

                                                                            \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                          5. lower-/.f6439.0%

                                                                            \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                        3. Applied rewrites39.0%

                                                                          \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                                                                        if 9.9999999999999993e158 < (*.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 65.7%

                                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        2. Step-by-step derivation
                                                                          1. lift-*.f64N/A

                                                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          2. *-commutativeN/A

                                                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          3. lower-*.f6465.7%

                                                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          4. lift-pow.f64N/A

                                                                            \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          5. lift-/.f64N/A

                                                                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          6. metadata-evalN/A

                                                                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          7. unpow1/2N/A

                                                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          8. lower-sqrt.f6465.7%

                                                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          9. lift-pow.f64N/A

                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          10. lift-/.f64N/A

                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          11. metadata-evalN/A

                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          12. unpow1/2N/A

                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                          13. lower-sqrt.f6465.7%

                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        3. Applied rewrites65.7%

                                                                          \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                        4. Taylor expanded in d around inf

                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                        5. Step-by-step derivation
                                                                          1. Applied rewrites39.0%

                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                          2. Step-by-step derivation
                                                                            1. Applied rewrites43.2%

                                                                              \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                          3. Recombined 3 regimes into one program.
                                                                          4. Add Preprocessing

                                                                          Alternative 22: 50.6% 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)\\ \mathbf{if}\;t\_0 \leq 0:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot h}}\right)\right)\right) \cdot 1\\ \mathbf{elif}\;t\_0 \leq 10^{+159}:\\ \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\ \end{array} \]
                                                                          (FPCore (d h l M D)
                                                                            :precision binary64
                                                                            (let* ((t_0
                                                                                  (*
                                                                                   (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
                                                                                   (-
                                                                                    1.0
                                                                                    (*
                                                                                     (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0))
                                                                                     (/ h l))))))
                                                                            (if (<= t_0 0.0)
                                                                              (* (* (sqrt (/ d l)) (* -1.0 (* d (sqrt (/ 1.0 (* d h)))))) 1.0)
                                                                              (if (<= t_0 1e+159)
                                                                                (* (* (sqrt (* (/ 1.0 l) d)) (sqrt (/ d h))) 1.0)
                                                                                (* (/ (fabs d) (sqrt (* l h))) 1.0)))))
                                                                          double code(double d, double h, double l, double M, double D) {
                                                                          	double t_0 = (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                          	double tmp;
                                                                          	if (t_0 <= 0.0) {
                                                                          		tmp = (sqrt((d / l)) * (-1.0 * (d * sqrt((1.0 / (d * h)))))) * 1.0;
                                                                          	} else if (t_0 <= 1e+159) {
                                                                          		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                                          	} else {
                                                                          		tmp = (fabs(d) / sqrt((l * h))) * 1.0;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          module fmin_fmax_functions
                                                                              implicit none
                                                                              private
                                                                              public fmax
                                                                              public fmin
                                                                          
                                                                              interface fmax
                                                                                  module procedure fmax88
                                                                                  module procedure fmax44
                                                                                  module procedure fmax84
                                                                                  module procedure fmax48
                                                                              end interface
                                                                              interface fmin
                                                                                  module procedure fmin88
                                                                                  module procedure fmin44
                                                                                  module procedure fmin84
                                                                                  module procedure fmin48
                                                                              end interface
                                                                          contains
                                                                              real(8) function fmax88(x, y) result (res)
                                                                                  real(8), intent (in) :: x
                                                                                  real(8), intent (in) :: y
                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                              end function
                                                                              real(4) function fmax44(x, y) result (res)
                                                                                  real(4), intent (in) :: x
                                                                                  real(4), intent (in) :: y
                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                              end function
                                                                              real(8) function fmax84(x, y) result(res)
                                                                                  real(8), intent (in) :: x
                                                                                  real(4), intent (in) :: y
                                                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                              end function
                                                                              real(8) function fmax48(x, y) result(res)
                                                                                  real(4), intent (in) :: x
                                                                                  real(8), intent (in) :: y
                                                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                              end function
                                                                              real(8) function fmin88(x, y) result (res)
                                                                                  real(8), intent (in) :: x
                                                                                  real(8), intent (in) :: y
                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                              end function
                                                                              real(4) function fmin44(x, y) result (res)
                                                                                  real(4), intent (in) :: x
                                                                                  real(4), intent (in) :: y
                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                              end function
                                                                              real(8) function fmin84(x, y) result(res)
                                                                                  real(8), intent (in) :: x
                                                                                  real(4), intent (in) :: y
                                                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                              end function
                                                                              real(8) function fmin48(x, y) result(res)
                                                                                  real(4), intent (in) :: x
                                                                                  real(8), intent (in) :: y
                                                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                              end function
                                                                          end module
                                                                          
                                                                          real(8) function code(d, h, l, m, d_1)
                                                                          use fmin_fmax_functions
                                                                              real(8), intent (in) :: d
                                                                              real(8), intent (in) :: h
                                                                              real(8), intent (in) :: l
                                                                              real(8), intent (in) :: m
                                                                              real(8), intent (in) :: d_1
                                                                              real(8) :: t_0
                                                                              real(8) :: tmp
                                                                              t_0 = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
                                                                              if (t_0 <= 0.0d0) then
                                                                                  tmp = (sqrt((d / l)) * ((-1.0d0) * (d * sqrt((1.0d0 / (d * h)))))) * 1.0d0
                                                                              else if (t_0 <= 1d+159) then
                                                                                  tmp = (sqrt(((1.0d0 / l) * d)) * sqrt((d / h))) * 1.0d0
                                                                              else
                                                                                  tmp = (abs(d) / sqrt((l * h))) * 1.0d0
                                                                              end if
                                                                              code = tmp
                                                                          end function
                                                                          
                                                                          public static double code(double d, double h, double l, double M, double D) {
                                                                          	double t_0 = (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
                                                                          	double tmp;
                                                                          	if (t_0 <= 0.0) {
                                                                          		tmp = (Math.sqrt((d / l)) * (-1.0 * (d * Math.sqrt((1.0 / (d * h)))))) * 1.0;
                                                                          	} else if (t_0 <= 1e+159) {
                                                                          		tmp = (Math.sqrt(((1.0 / l) * d)) * Math.sqrt((d / h))) * 1.0;
                                                                          	} else {
                                                                          		tmp = (Math.abs(d) / Math.sqrt((l * h))) * 1.0;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          def code(d, h, l, M, D):
                                                                          	t_0 = (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
                                                                          	tmp = 0
                                                                          	if t_0 <= 0.0:
                                                                          		tmp = (math.sqrt((d / l)) * (-1.0 * (d * math.sqrt((1.0 / (d * h)))))) * 1.0
                                                                          	elif t_0 <= 1e+159:
                                                                          		tmp = (math.sqrt(((1.0 / l) * d)) * math.sqrt((d / h))) * 1.0
                                                                          	else:
                                                                          		tmp = (math.fabs(d) / math.sqrt((l * h))) * 1.0
                                                                          	return tmp
                                                                          
                                                                          function code(d, h, l, M, D)
                                                                          	t_0 = Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
                                                                          	tmp = 0.0
                                                                          	if (t_0 <= 0.0)
                                                                          		tmp = Float64(Float64(sqrt(Float64(d / l)) * Float64(-1.0 * Float64(d * sqrt(Float64(1.0 / Float64(d * h)))))) * 1.0);
                                                                          	elseif (t_0 <= 1e+159)
                                                                          		tmp = Float64(Float64(sqrt(Float64(Float64(1.0 / l) * d)) * sqrt(Float64(d / h))) * 1.0);
                                                                          	else
                                                                          		tmp = Float64(Float64(abs(d) / sqrt(Float64(l * h))) * 1.0);
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          function tmp_2 = code(d, h, l, M, D)
                                                                          	t_0 = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
                                                                          	tmp = 0.0;
                                                                          	if (t_0 <= 0.0)
                                                                          		tmp = (sqrt((d / l)) * (-1.0 * (d * sqrt((1.0 / (d * h)))))) * 1.0;
                                                                          	elseif (t_0 <= 1e+159)
                                                                          		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                                          	else
                                                                          		tmp = (abs(d) / sqrt((l * h))) * 1.0;
                                                                          	end
                                                                          	tmp_2 = tmp;
                                                                          end
                                                                          
                                                                          code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 0.0], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(-1.0 * N[(d * N[Sqrt[N[(1.0 / N[(d * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$0, 1e+159], N[(N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          t_0 := \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
                                                                          \mathbf{if}\;t\_0 \leq 0:\\
                                                                          \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot h}}\right)\right)\right) \cdot 1\\
                                                                          
                                                                          \mathbf{elif}\;t\_0 \leq 10^{+159}:\\
                                                                          \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 3 regimes
                                                                          2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -0.0

                                                                            1. Initial program 65.7%

                                                                              \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            2. Step-by-step derivation
                                                                              1. lift-*.f64N/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              2. *-commutativeN/A

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. lower-*.f6465.7%

                                                                                \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              4. lift-pow.f64N/A

                                                                                \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              5. lift-/.f64N/A

                                                                                \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              6. metadata-evalN/A

                                                                                \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              7. unpow1/2N/A

                                                                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              8. lower-sqrt.f6465.7%

                                                                                \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              9. lift-pow.f64N/A

                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              10. lift-/.f64N/A

                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              11. metadata-evalN/A

                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              12. unpow1/2N/A

                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              13. lower-sqrt.f6465.7%

                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            3. Applied rewrites65.7%

                                                                              \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                            4. Taylor expanded in d around inf

                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                            5. Step-by-step derivation
                                                                              1. Applied rewrites39.0%

                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                              2. Taylor expanded in d around -inf

                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot h}}\right)\right)}\right) \cdot 1 \]
                                                                              3. Step-by-step derivation
                                                                                1. lower-*.f64N/A

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(-1 \cdot \color{blue}{\left(d \cdot \sqrt{\frac{1}{d \cdot h}}\right)}\right)\right) \cdot 1 \]
                                                                                2. lower-*.f64N/A

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(-1 \cdot \left(d \cdot \color{blue}{\sqrt{\frac{1}{d \cdot h}}}\right)\right)\right) \cdot 1 \]
                                                                                3. lower-sqrt.f64N/A

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot h}}\right)\right)\right) \cdot 1 \]
                                                                                4. lower-/.f64N/A

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot h}}\right)\right)\right) \cdot 1 \]
                                                                                5. lower-*.f6422.8%

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot h}}\right)\right)\right) \cdot 1 \]
                                                                              4. Applied rewrites22.8%

                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\left(-1 \cdot \left(d \cdot \sqrt{\frac{1}{d \cdot h}}\right)\right)}\right) \cdot 1 \]

                                                                              if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 9.9999999999999993e158

                                                                              1. Initial program 65.7%

                                                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              2. Step-by-step derivation
                                                                                1. lift-*.f64N/A

                                                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                2. *-commutativeN/A

                                                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                3. lower-*.f6465.7%

                                                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                4. lift-pow.f64N/A

                                                                                  \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                5. lift-/.f64N/A

                                                                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                6. metadata-evalN/A

                                                                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                7. unpow1/2N/A

                                                                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                8. lower-sqrt.f6465.7%

                                                                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                9. lift-pow.f64N/A

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                10. lift-/.f64N/A

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                11. metadata-evalN/A

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                12. unpow1/2N/A

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                13. lower-sqrt.f6465.7%

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              3. Applied rewrites65.7%

                                                                                \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                              4. Taylor expanded in d around inf

                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                              5. Step-by-step derivation
                                                                                1. Applied rewrites39.0%

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                2. Step-by-step derivation
                                                                                  1. lift-/.f64N/A

                                                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                                  2. mult-flipN/A

                                                                                    \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                                  3. *-commutativeN/A

                                                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                                  4. lower-*.f64N/A

                                                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                                  5. lower-/.f6439.0%

                                                                                    \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                                3. Applied rewrites39.0%

                                                                                  \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                                                                                if 9.9999999999999993e158 < (*.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 65.7%

                                                                                  \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                2. Step-by-step derivation
                                                                                  1. lift-*.f64N/A

                                                                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  2. *-commutativeN/A

                                                                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  3. lower-*.f6465.7%

                                                                                    \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  4. lift-pow.f64N/A

                                                                                    \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  5. lift-/.f64N/A

                                                                                    \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  6. metadata-evalN/A

                                                                                    \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  7. unpow1/2N/A

                                                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  8. lower-sqrt.f6465.7%

                                                                                    \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  9. lift-pow.f64N/A

                                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  10. lift-/.f64N/A

                                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  11. metadata-evalN/A

                                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  12. unpow1/2N/A

                                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                  13. lower-sqrt.f6465.7%

                                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                3. Applied rewrites65.7%

                                                                                  \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                4. Taylor expanded in d around inf

                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                5. Step-by-step derivation
                                                                                  1. Applied rewrites39.0%

                                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                  2. Step-by-step derivation
                                                                                    1. Applied rewrites43.2%

                                                                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                  3. Recombined 3 regimes into one program.
                                                                                  4. Add Preprocessing

                                                                                  Alternative 23: 50.6% accurate, 0.4× speedup?

                                                                                  \[\begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ 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 0:\\ \;\;\;\;\frac{1}{\frac{t\_0}{1 \cdot \left(-d\right)}}\\ \mathbf{elif}\;t\_1 \leq 10^{+159}:\\ \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{t\_0} \cdot 1\\ \end{array} \]
                                                                                  (FPCore (d h l M D)
                                                                                    :precision binary64
                                                                                    (let* ((t_0 (sqrt (* l h)))
                                                                                         (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 0.0)
                                                                                      (/ 1.0 (/ t_0 (* 1.0 (- d))))
                                                                                      (if (<= t_1 1e+159)
                                                                                        (* (* (sqrt (* (/ 1.0 l) d)) (sqrt (/ d h))) 1.0)
                                                                                        (* (/ (fabs d) t_0) 1.0)))))
                                                                                  double code(double d, double h, double l, double M, double D) {
                                                                                  	double t_0 = sqrt((l * h));
                                                                                  	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 <= 0.0) {
                                                                                  		tmp = 1.0 / (t_0 / (1.0 * -d));
                                                                                  	} else if (t_1 <= 1e+159) {
                                                                                  		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                                                  	} else {
                                                                                  		tmp = (fabs(d) / t_0) * 1.0;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  module fmin_fmax_functions
                                                                                      implicit none
                                                                                      private
                                                                                      public fmax
                                                                                      public fmin
                                                                                  
                                                                                      interface fmax
                                                                                          module procedure fmax88
                                                                                          module procedure fmax44
                                                                                          module procedure fmax84
                                                                                          module procedure fmax48
                                                                                      end interface
                                                                                      interface fmin
                                                                                          module procedure fmin88
                                                                                          module procedure fmin44
                                                                                          module procedure fmin84
                                                                                          module procedure fmin48
                                                                                      end interface
                                                                                  contains
                                                                                      real(8) function fmax88(x, y) result (res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(4) function fmax44(x, y) result (res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmax84(x, y) result(res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmax48(x, y) result(res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmin88(x, y) result (res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(4) function fmin44(x, y) result (res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmin84(x, y) result(res)
                                                                                          real(8), intent (in) :: x
                                                                                          real(4), intent (in) :: y
                                                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                      end function
                                                                                      real(8) function fmin48(x, y) result(res)
                                                                                          real(4), intent (in) :: x
                                                                                          real(8), intent (in) :: y
                                                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                      end function
                                                                                  end module
                                                                                  
                                                                                  real(8) function code(d, h, l, m, d_1)
                                                                                  use fmin_fmax_functions
                                                                                      real(8), intent (in) :: d
                                                                                      real(8), intent (in) :: h
                                                                                      real(8), intent (in) :: l
                                                                                      real(8), intent (in) :: m
                                                                                      real(8), intent (in) :: d_1
                                                                                      real(8) :: t_0
                                                                                      real(8) :: t_1
                                                                                      real(8) :: tmp
                                                                                      t_0 = sqrt((l * h))
                                                                                      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 <= 0.0d0) then
                                                                                          tmp = 1.0d0 / (t_0 / (1.0d0 * -d))
                                                                                      else if (t_1 <= 1d+159) then
                                                                                          tmp = (sqrt(((1.0d0 / l) * d)) * sqrt((d / h))) * 1.0d0
                                                                                      else
                                                                                          tmp = (abs(d) / t_0) * 1.0d0
                                                                                      end if
                                                                                      code = tmp
                                                                                  end function
                                                                                  
                                                                                  public static double code(double d, double h, double l, double M, double D) {
                                                                                  	double t_0 = Math.sqrt((l * h));
                                                                                  	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 <= 0.0) {
                                                                                  		tmp = 1.0 / (t_0 / (1.0 * -d));
                                                                                  	} else if (t_1 <= 1e+159) {
                                                                                  		tmp = (Math.sqrt(((1.0 / l) * d)) * Math.sqrt((d / h))) * 1.0;
                                                                                  	} else {
                                                                                  		tmp = (Math.abs(d) / t_0) * 1.0;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  def code(d, h, l, M, D):
                                                                                  	t_0 = math.sqrt((l * h))
                                                                                  	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 <= 0.0:
                                                                                  		tmp = 1.0 / (t_0 / (1.0 * -d))
                                                                                  	elif t_1 <= 1e+159:
                                                                                  		tmp = (math.sqrt(((1.0 / l) * d)) * math.sqrt((d / h))) * 1.0
                                                                                  	else:
                                                                                  		tmp = (math.fabs(d) / t_0) * 1.0
                                                                                  	return tmp
                                                                                  
                                                                                  function code(d, h, l, M, D)
                                                                                  	t_0 = sqrt(Float64(l * h))
                                                                                  	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 <= 0.0)
                                                                                  		tmp = Float64(1.0 / Float64(t_0 / Float64(1.0 * Float64(-d))));
                                                                                  	elseif (t_1 <= 1e+159)
                                                                                  		tmp = Float64(Float64(sqrt(Float64(Float64(1.0 / l) * d)) * sqrt(Float64(d / h))) * 1.0);
                                                                                  	else
                                                                                  		tmp = Float64(Float64(abs(d) / t_0) * 1.0);
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  function tmp_2 = code(d, h, l, M, D)
                                                                                  	t_0 = sqrt((l * h));
                                                                                  	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 <= 0.0)
                                                                                  		tmp = 1.0 / (t_0 / (1.0 * -d));
                                                                                  	elseif (t_1 <= 1e+159)
                                                                                  		tmp = (sqrt(((1.0 / l) * d)) * sqrt((d / h))) * 1.0;
                                                                                  	else
                                                                                  		tmp = (abs(d) / t_0) * 1.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[(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, 0.0], N[(1.0 / N[(t$95$0 / N[(1.0 * (-d)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+159], N[(N[(N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * d), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[Abs[d], $MachinePrecision] / t$95$0), $MachinePrecision] * 1.0), $MachinePrecision]]]]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  t_0 := \sqrt{\ell \cdot h}\\
                                                                                  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 0:\\
                                                                                  \;\;\;\;\frac{1}{\frac{t\_0}{1 \cdot \left(-d\right)}}\\
                                                                                  
                                                                                  \mathbf{elif}\;t\_1 \leq 10^{+159}:\\
                                                                                  \;\;\;\;\left(\sqrt{\frac{1}{\ell} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;\frac{\left|d\right|}{t\_0} \cdot 1\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 3 regimes
                                                                                  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -0.0

                                                                                    1. Initial program 65.7%

                                                                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                    2. Step-by-step derivation
                                                                                      1. lift-*.f64N/A

                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      2. *-commutativeN/A

                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      3. lower-*.f6465.7%

                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      4. lift-pow.f64N/A

                                                                                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      5. lift-/.f64N/A

                                                                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      6. metadata-evalN/A

                                                                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      7. unpow1/2N/A

                                                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      8. lower-sqrt.f6465.7%

                                                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      9. lift-pow.f64N/A

                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      10. lift-/.f64N/A

                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      11. metadata-evalN/A

                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      12. unpow1/2N/A

                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                      13. lower-sqrt.f6465.7%

                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                    3. Applied rewrites65.7%

                                                                                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                    4. Taylor expanded in d around inf

                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                    5. Step-by-step derivation
                                                                                      1. Applied rewrites39.0%

                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                      2. Step-by-step derivation
                                                                                        1. Applied rewrites43.2%

                                                                                          \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                        2. Step-by-step derivation
                                                                                          1. lift-*.f64N/A

                                                                                            \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                          2. lift-/.f64N/A

                                                                                            \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                                                          3. associate-*l/N/A

                                                                                            \[\leadsto \color{blue}{\frac{\left|d\right| \cdot 1}{\sqrt{\ell \cdot h}}} \]
                                                                                          4. lift-sqrt.f64N/A

                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                                          5. pow1/2N/A

                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{{\left(\ell \cdot h\right)}^{\frac{1}{2}}}} \]
                                                                                          6. lift-*.f64N/A

                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(\ell \cdot h\right)}}^{\frac{1}{2}}} \]
                                                                                          7. *-commutativeN/A

                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(h \cdot \ell\right)}}^{\frac{1}{2}}} \]
                                                                                          8. lift-*.f64N/A

                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(h \cdot \ell\right)}}^{\frac{1}{2}}} \]
                                                                                          9. pow1/2N/A

                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                                                                                          10. lift-sqrt.f64N/A

                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                                                                                          11. div-flipN/A

                                                                                            \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{h \cdot \ell}}{\left|d\right| \cdot 1}}} \]
                                                                                          12. lower-unsound-/.f64N/A

                                                                                            \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{h \cdot \ell}}{\left|d\right| \cdot 1}}} \]
                                                                                          13. lower-unsound-/.f64N/A

                                                                                            \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{h \cdot \ell}}{\left|d\right| \cdot 1}}} \]
                                                                                        3. Applied rewrites25.8%

                                                                                          \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{\ell \cdot h}}{1 \cdot \left(-d\right)}}} \]

                                                                                        if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 9.9999999999999993e158

                                                                                        1. Initial program 65.7%

                                                                                          \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                        2. Step-by-step derivation
                                                                                          1. lift-*.f64N/A

                                                                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          2. *-commutativeN/A

                                                                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          3. lower-*.f6465.7%

                                                                                            \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          4. lift-pow.f64N/A

                                                                                            \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          5. lift-/.f64N/A

                                                                                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          6. metadata-evalN/A

                                                                                            \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          7. unpow1/2N/A

                                                                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          8. lower-sqrt.f6465.7%

                                                                                            \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          9. lift-pow.f64N/A

                                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          10. lift-/.f64N/A

                                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          11. metadata-evalN/A

                                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          12. unpow1/2N/A

                                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          13. lower-sqrt.f6465.7%

                                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                        3. Applied rewrites65.7%

                                                                                          \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                        4. Taylor expanded in d around inf

                                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                        5. Step-by-step derivation
                                                                                          1. Applied rewrites39.0%

                                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                          2. Step-by-step derivation
                                                                                            1. lift-/.f64N/A

                                                                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{d}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                                            2. mult-flipN/A

                                                                                              \[\leadsto \left(\sqrt{\color{blue}{d \cdot \frac{1}{\ell}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                                            3. *-commutativeN/A

                                                                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                                            4. lower-*.f64N/A

                                                                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                                            5. lower-/.f6439.0%

                                                                                              \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell}} \cdot d} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]
                                                                                          3. Applied rewrites39.0%

                                                                                            \[\leadsto \left(\sqrt{\color{blue}{\frac{1}{\ell} \cdot d}} \cdot \sqrt{\frac{d}{h}}\right) \cdot 1 \]

                                                                                          if 9.9999999999999993e158 < (*.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 65.7%

                                                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          2. Step-by-step derivation
                                                                                            1. lift-*.f64N/A

                                                                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            2. *-commutativeN/A

                                                                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            3. lower-*.f6465.7%

                                                                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            4. lift-pow.f64N/A

                                                                                              \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            5. lift-/.f64N/A

                                                                                              \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            6. metadata-evalN/A

                                                                                              \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            7. unpow1/2N/A

                                                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            8. lower-sqrt.f6465.7%

                                                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            9. lift-pow.f64N/A

                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            10. lift-/.f64N/A

                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            11. metadata-evalN/A

                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            12. unpow1/2N/A

                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                            13. lower-sqrt.f6465.7%

                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          3. Applied rewrites65.7%

                                                                                            \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                          4. Taylor expanded in d around inf

                                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                          5. Step-by-step derivation
                                                                                            1. Applied rewrites39.0%

                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                            2. Step-by-step derivation
                                                                                              1. Applied rewrites43.2%

                                                                                                \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                            3. Recombined 3 regimes into one program.
                                                                                            4. Add Preprocessing

                                                                                            Alternative 24: 50.6% accurate, 0.5× speedup?

                                                                                            \[\begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ 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 0:\\ \;\;\;\;\frac{1}{\frac{t\_0}{1 \cdot \left(-d\right)}}\\ \mathbf{elif}\;t\_1 \leq 10^{+159}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{t\_0} \cdot 1\\ \end{array} \]
                                                                                            (FPCore (d h l M D)
                                                                                              :precision binary64
                                                                                              (let* ((t_0 (sqrt (* l h)))
                                                                                                   (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 0.0)
                                                                                                (/ 1.0 (/ t_0 (* 1.0 (- d))))
                                                                                                (if (<= t_1 1e+159)
                                                                                                  (* (sqrt (/ d h)) (sqrt (/ d l)))
                                                                                                  (* (/ (fabs d) t_0) 1.0)))))
                                                                                            double code(double d, double h, double l, double M, double D) {
                                                                                            	double t_0 = sqrt((l * h));
                                                                                            	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 <= 0.0) {
                                                                                            		tmp = 1.0 / (t_0 / (1.0 * -d));
                                                                                            	} else if (t_1 <= 1e+159) {
                                                                                            		tmp = sqrt((d / h)) * sqrt((d / l));
                                                                                            	} else {
                                                                                            		tmp = (fabs(d) / t_0) * 1.0;
                                                                                            	}
                                                                                            	return tmp;
                                                                                            }
                                                                                            
                                                                                            module fmin_fmax_functions
                                                                                                implicit none
                                                                                                private
                                                                                                public fmax
                                                                                                public fmin
                                                                                            
                                                                                                interface fmax
                                                                                                    module procedure fmax88
                                                                                                    module procedure fmax44
                                                                                                    module procedure fmax84
                                                                                                    module procedure fmax48
                                                                                                end interface
                                                                                                interface fmin
                                                                                                    module procedure fmin88
                                                                                                    module procedure fmin44
                                                                                                    module procedure fmin84
                                                                                                    module procedure fmin48
                                                                                                end interface
                                                                                            contains
                                                                                                real(8) function fmax88(x, y) result (res)
                                                                                                    real(8), intent (in) :: x
                                                                                                    real(8), intent (in) :: y
                                                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                end function
                                                                                                real(4) function fmax44(x, y) result (res)
                                                                                                    real(4), intent (in) :: x
                                                                                                    real(4), intent (in) :: y
                                                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                end function
                                                                                                real(8) function fmax84(x, y) result(res)
                                                                                                    real(8), intent (in) :: x
                                                                                                    real(4), intent (in) :: y
                                                                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                end function
                                                                                                real(8) function fmax48(x, y) result(res)
                                                                                                    real(4), intent (in) :: x
                                                                                                    real(8), intent (in) :: y
                                                                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                end function
                                                                                                real(8) function fmin88(x, y) result (res)
                                                                                                    real(8), intent (in) :: x
                                                                                                    real(8), intent (in) :: y
                                                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                end function
                                                                                                real(4) function fmin44(x, y) result (res)
                                                                                                    real(4), intent (in) :: x
                                                                                                    real(4), intent (in) :: y
                                                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                end function
                                                                                                real(8) function fmin84(x, y) result(res)
                                                                                                    real(8), intent (in) :: x
                                                                                                    real(4), intent (in) :: y
                                                                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                end function
                                                                                                real(8) function fmin48(x, y) result(res)
                                                                                                    real(4), intent (in) :: x
                                                                                                    real(8), intent (in) :: y
                                                                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                end function
                                                                                            end module
                                                                                            
                                                                                            real(8) function code(d, h, l, m, d_1)
                                                                                            use fmin_fmax_functions
                                                                                                real(8), intent (in) :: d
                                                                                                real(8), intent (in) :: h
                                                                                                real(8), intent (in) :: l
                                                                                                real(8), intent (in) :: m
                                                                                                real(8), intent (in) :: d_1
                                                                                                real(8) :: t_0
                                                                                                real(8) :: t_1
                                                                                                real(8) :: tmp
                                                                                                t_0 = sqrt((l * h))
                                                                                                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 <= 0.0d0) then
                                                                                                    tmp = 1.0d0 / (t_0 / (1.0d0 * -d))
                                                                                                else if (t_1 <= 1d+159) then
                                                                                                    tmp = sqrt((d / h)) * sqrt((d / l))
                                                                                                else
                                                                                                    tmp = (abs(d) / t_0) * 1.0d0
                                                                                                end if
                                                                                                code = tmp
                                                                                            end function
                                                                                            
                                                                                            public static double code(double d, double h, double l, double M, double D) {
                                                                                            	double t_0 = Math.sqrt((l * h));
                                                                                            	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 <= 0.0) {
                                                                                            		tmp = 1.0 / (t_0 / (1.0 * -d));
                                                                                            	} else if (t_1 <= 1e+159) {
                                                                                            		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
                                                                                            	} else {
                                                                                            		tmp = (Math.abs(d) / t_0) * 1.0;
                                                                                            	}
                                                                                            	return tmp;
                                                                                            }
                                                                                            
                                                                                            def code(d, h, l, M, D):
                                                                                            	t_0 = math.sqrt((l * h))
                                                                                            	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 <= 0.0:
                                                                                            		tmp = 1.0 / (t_0 / (1.0 * -d))
                                                                                            	elif t_1 <= 1e+159:
                                                                                            		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
                                                                                            	else:
                                                                                            		tmp = (math.fabs(d) / t_0) * 1.0
                                                                                            	return tmp
                                                                                            
                                                                                            function code(d, h, l, M, D)
                                                                                            	t_0 = sqrt(Float64(l * h))
                                                                                            	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 <= 0.0)
                                                                                            		tmp = Float64(1.0 / Float64(t_0 / Float64(1.0 * Float64(-d))));
                                                                                            	elseif (t_1 <= 1e+159)
                                                                                            		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
                                                                                            	else
                                                                                            		tmp = Float64(Float64(abs(d) / t_0) * 1.0);
                                                                                            	end
                                                                                            	return tmp
                                                                                            end
                                                                                            
                                                                                            function tmp_2 = code(d, h, l, M, D)
                                                                                            	t_0 = sqrt((l * h));
                                                                                            	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 <= 0.0)
                                                                                            		tmp = 1.0 / (t_0 / (1.0 * -d));
                                                                                            	elseif (t_1 <= 1e+159)
                                                                                            		tmp = sqrt((d / h)) * sqrt((d / l));
                                                                                            	else
                                                                                            		tmp = (abs(d) / t_0) * 1.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[(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, 0.0], N[(1.0 / N[(t$95$0 / N[(1.0 * (-d)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+159], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Abs[d], $MachinePrecision] / t$95$0), $MachinePrecision] * 1.0), $MachinePrecision]]]]]
                                                                                            
                                                                                            \begin{array}{l}
                                                                                            t_0 := \sqrt{\ell \cdot h}\\
                                                                                            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 0:\\
                                                                                            \;\;\;\;\frac{1}{\frac{t\_0}{1 \cdot \left(-d\right)}}\\
                                                                                            
                                                                                            \mathbf{elif}\;t\_1 \leq 10^{+159}:\\
                                                                                            \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
                                                                                            
                                                                                            \mathbf{else}:\\
                                                                                            \;\;\;\;\frac{\left|d\right|}{t\_0} \cdot 1\\
                                                                                            
                                                                                            
                                                                                            \end{array}
                                                                                            
                                                                                            Derivation
                                                                                            1. Split input into 3 regimes
                                                                                            2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -0.0

                                                                                              1. Initial program 65.7%

                                                                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              2. Step-by-step derivation
                                                                                                1. lift-*.f64N/A

                                                                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                2. *-commutativeN/A

                                                                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                3. lower-*.f6465.7%

                                                                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                4. lift-pow.f64N/A

                                                                                                  \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                5. lift-/.f64N/A

                                                                                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                6. metadata-evalN/A

                                                                                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                7. unpow1/2N/A

                                                                                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                8. lower-sqrt.f6465.7%

                                                                                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                9. lift-pow.f64N/A

                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                10. lift-/.f64N/A

                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                11. metadata-evalN/A

                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                12. unpow1/2N/A

                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                13. lower-sqrt.f6465.7%

                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              3. Applied rewrites65.7%

                                                                                                \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                              4. Taylor expanded in d around inf

                                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                              5. Step-by-step derivation
                                                                                                1. Applied rewrites39.0%

                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                2. Step-by-step derivation
                                                                                                  1. Applied rewrites43.2%

                                                                                                    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                  2. Step-by-step derivation
                                                                                                    1. lift-*.f64N/A

                                                                                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                    2. lift-/.f64N/A

                                                                                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                                                                    3. associate-*l/N/A

                                                                                                      \[\leadsto \color{blue}{\frac{\left|d\right| \cdot 1}{\sqrt{\ell \cdot h}}} \]
                                                                                                    4. lift-sqrt.f64N/A

                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                                                    5. pow1/2N/A

                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{{\left(\ell \cdot h\right)}^{\frac{1}{2}}}} \]
                                                                                                    6. lift-*.f64N/A

                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(\ell \cdot h\right)}}^{\frac{1}{2}}} \]
                                                                                                    7. *-commutativeN/A

                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(h \cdot \ell\right)}}^{\frac{1}{2}}} \]
                                                                                                    8. lift-*.f64N/A

                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(h \cdot \ell\right)}}^{\frac{1}{2}}} \]
                                                                                                    9. pow1/2N/A

                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                                                                                                    10. lift-sqrt.f64N/A

                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                                                                                                    11. div-flipN/A

                                                                                                      \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{h \cdot \ell}}{\left|d\right| \cdot 1}}} \]
                                                                                                    12. lower-unsound-/.f64N/A

                                                                                                      \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{h \cdot \ell}}{\left|d\right| \cdot 1}}} \]
                                                                                                    13. lower-unsound-/.f64N/A

                                                                                                      \[\leadsto \frac{1}{\color{blue}{\frac{\sqrt{h \cdot \ell}}{\left|d\right| \cdot 1}}} \]
                                                                                                  3. Applied rewrites25.8%

                                                                                                    \[\leadsto \color{blue}{\frac{1}{\frac{\sqrt{\ell \cdot h}}{1 \cdot \left(-d\right)}}} \]

                                                                                                  if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 9.9999999999999993e158

                                                                                                  1. Initial program 65.7%

                                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  2. Taylor expanded in d around 0

                                                                                                    \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                                                  3. Step-by-step derivation
                                                                                                    1. lower-*.f64N/A

                                                                                                      \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                                                    2. lower-/.f64N/A

                                                                                                      \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                                                                  4. Applied rewrites18.1%

                                                                                                    \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                                                  5. Applied rewrites29.2%

                                                                                                    \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{\color{blue}{d}} \]
                                                                                                  6. Taylor expanded in l around inf

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}} \]
                                                                                                  7. Step-by-step derivation
                                                                                                    1. lower-*.f64N/A

                                                                                                      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
                                                                                                    2. lower-sqrt.f64N/A

                                                                                                      \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}} \]
                                                                                                    3. lower-/.f64N/A

                                                                                                      \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{\color{blue}{d}}{\ell}} \]
                                                                                                    4. lower-sqrt.f64N/A

                                                                                                      \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
                                                                                                    5. lower-/.f6439.0%

                                                                                                      \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
                                                                                                  8. Applied rewrites39.0%

                                                                                                    \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}} \]

                                                                                                  if 9.9999999999999993e158 < (*.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 65.7%

                                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  2. Step-by-step derivation
                                                                                                    1. lift-*.f64N/A

                                                                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    2. *-commutativeN/A

                                                                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    3. lower-*.f6465.7%

                                                                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    4. lift-pow.f64N/A

                                                                                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    5. lift-/.f64N/A

                                                                                                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    6. metadata-evalN/A

                                                                                                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    7. unpow1/2N/A

                                                                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    8. lower-sqrt.f6465.7%

                                                                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    9. lift-pow.f64N/A

                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    10. lift-/.f64N/A

                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    11. metadata-evalN/A

                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    12. unpow1/2N/A

                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                    13. lower-sqrt.f6465.7%

                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  3. Applied rewrites65.7%

                                                                                                    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                  4. Taylor expanded in d around inf

                                                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                  5. Step-by-step derivation
                                                                                                    1. Applied rewrites39.0%

                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                    2. Step-by-step derivation
                                                                                                      1. Applied rewrites43.2%

                                                                                                        \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                    3. Recombined 3 regimes into one program.
                                                                                                    4. Add Preprocessing

                                                                                                    Alternative 25: 49.7% accurate, 0.5× speedup?

                                                                                                    \[\begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ 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 0:\\ \;\;\;\;\frac{1 \cdot \left(-d\right)}{t\_0}\\ \mathbf{elif}\;t\_1 \leq 10^{+159}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{t\_0} \cdot 1\\ \end{array} \]
                                                                                                    (FPCore (d h l M D)
                                                                                                      :precision binary64
                                                                                                      (let* ((t_0 (sqrt (* l h)))
                                                                                                           (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 0.0)
                                                                                                        (/ (* 1.0 (- d)) t_0)
                                                                                                        (if (<= t_1 1e+159)
                                                                                                          (* (sqrt (/ d h)) (sqrt (/ d l)))
                                                                                                          (* (/ (fabs d) t_0) 1.0)))))
                                                                                                    double code(double d, double h, double l, double M, double D) {
                                                                                                    	double t_0 = sqrt((l * h));
                                                                                                    	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 <= 0.0) {
                                                                                                    		tmp = (1.0 * -d) / t_0;
                                                                                                    	} else if (t_1 <= 1e+159) {
                                                                                                    		tmp = sqrt((d / h)) * sqrt((d / l));
                                                                                                    	} else {
                                                                                                    		tmp = (fabs(d) / t_0) * 1.0;
                                                                                                    	}
                                                                                                    	return tmp;
                                                                                                    }
                                                                                                    
                                                                                                    module fmin_fmax_functions
                                                                                                        implicit none
                                                                                                        private
                                                                                                        public fmax
                                                                                                        public fmin
                                                                                                    
                                                                                                        interface fmax
                                                                                                            module procedure fmax88
                                                                                                            module procedure fmax44
                                                                                                            module procedure fmax84
                                                                                                            module procedure fmax48
                                                                                                        end interface
                                                                                                        interface fmin
                                                                                                            module procedure fmin88
                                                                                                            module procedure fmin44
                                                                                                            module procedure fmin84
                                                                                                            module procedure fmin48
                                                                                                        end interface
                                                                                                    contains
                                                                                                        real(8) function fmax88(x, y) result (res)
                                                                                                            real(8), intent (in) :: x
                                                                                                            real(8), intent (in) :: y
                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(4) function fmax44(x, y) result (res)
                                                                                                            real(4), intent (in) :: x
                                                                                                            real(4), intent (in) :: y
                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(8) function fmax84(x, y) result(res)
                                                                                                            real(8), intent (in) :: x
                                                                                                            real(4), intent (in) :: y
                                                                                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(8) function fmax48(x, y) result(res)
                                                                                                            real(4), intent (in) :: x
                                                                                                            real(8), intent (in) :: y
                                                                                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(8) function fmin88(x, y) result (res)
                                                                                                            real(8), intent (in) :: x
                                                                                                            real(8), intent (in) :: y
                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(4) function fmin44(x, y) result (res)
                                                                                                            real(4), intent (in) :: x
                                                                                                            real(4), intent (in) :: y
                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(8) function fmin84(x, y) result(res)
                                                                                                            real(8), intent (in) :: x
                                                                                                            real(4), intent (in) :: y
                                                                                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                        end function
                                                                                                        real(8) function fmin48(x, y) result(res)
                                                                                                            real(4), intent (in) :: x
                                                                                                            real(8), intent (in) :: y
                                                                                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                        end function
                                                                                                    end module
                                                                                                    
                                                                                                    real(8) function code(d, h, l, m, d_1)
                                                                                                    use fmin_fmax_functions
                                                                                                        real(8), intent (in) :: d
                                                                                                        real(8), intent (in) :: h
                                                                                                        real(8), intent (in) :: l
                                                                                                        real(8), intent (in) :: m
                                                                                                        real(8), intent (in) :: d_1
                                                                                                        real(8) :: t_0
                                                                                                        real(8) :: t_1
                                                                                                        real(8) :: tmp
                                                                                                        t_0 = sqrt((l * h))
                                                                                                        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 <= 0.0d0) then
                                                                                                            tmp = (1.0d0 * -d) / t_0
                                                                                                        else if (t_1 <= 1d+159) then
                                                                                                            tmp = sqrt((d / h)) * sqrt((d / l))
                                                                                                        else
                                                                                                            tmp = (abs(d) / t_0) * 1.0d0
                                                                                                        end if
                                                                                                        code = tmp
                                                                                                    end function
                                                                                                    
                                                                                                    public static double code(double d, double h, double l, double M, double D) {
                                                                                                    	double t_0 = Math.sqrt((l * h));
                                                                                                    	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 <= 0.0) {
                                                                                                    		tmp = (1.0 * -d) / t_0;
                                                                                                    	} else if (t_1 <= 1e+159) {
                                                                                                    		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
                                                                                                    	} else {
                                                                                                    		tmp = (Math.abs(d) / t_0) * 1.0;
                                                                                                    	}
                                                                                                    	return tmp;
                                                                                                    }
                                                                                                    
                                                                                                    def code(d, h, l, M, D):
                                                                                                    	t_0 = math.sqrt((l * h))
                                                                                                    	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 <= 0.0:
                                                                                                    		tmp = (1.0 * -d) / t_0
                                                                                                    	elif t_1 <= 1e+159:
                                                                                                    		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
                                                                                                    	else:
                                                                                                    		tmp = (math.fabs(d) / t_0) * 1.0
                                                                                                    	return tmp
                                                                                                    
                                                                                                    function code(d, h, l, M, D)
                                                                                                    	t_0 = sqrt(Float64(l * h))
                                                                                                    	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 <= 0.0)
                                                                                                    		tmp = Float64(Float64(1.0 * Float64(-d)) / t_0);
                                                                                                    	elseif (t_1 <= 1e+159)
                                                                                                    		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
                                                                                                    	else
                                                                                                    		tmp = Float64(Float64(abs(d) / t_0) * 1.0);
                                                                                                    	end
                                                                                                    	return tmp
                                                                                                    end
                                                                                                    
                                                                                                    function tmp_2 = code(d, h, l, M, D)
                                                                                                    	t_0 = sqrt((l * h));
                                                                                                    	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 <= 0.0)
                                                                                                    		tmp = (1.0 * -d) / t_0;
                                                                                                    	elseif (t_1 <= 1e+159)
                                                                                                    		tmp = sqrt((d / h)) * sqrt((d / l));
                                                                                                    	else
                                                                                                    		tmp = (abs(d) / t_0) * 1.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[(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, 0.0], N[(N[(1.0 * (-d)), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[t$95$1, 1e+159], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Abs[d], $MachinePrecision] / t$95$0), $MachinePrecision] * 1.0), $MachinePrecision]]]]]
                                                                                                    
                                                                                                    \begin{array}{l}
                                                                                                    t_0 := \sqrt{\ell \cdot h}\\
                                                                                                    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 0:\\
                                                                                                    \;\;\;\;\frac{1 \cdot \left(-d\right)}{t\_0}\\
                                                                                                    
                                                                                                    \mathbf{elif}\;t\_1 \leq 10^{+159}:\\
                                                                                                    \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
                                                                                                    
                                                                                                    \mathbf{else}:\\
                                                                                                    \;\;\;\;\frac{\left|d\right|}{t\_0} \cdot 1\\
                                                                                                    
                                                                                                    
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Split input into 3 regimes
                                                                                                    2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < -0.0

                                                                                                      1. Initial program 65.7%

                                                                                                        \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      2. Step-by-step derivation
                                                                                                        1. lift-*.f64N/A

                                                                                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        2. *-commutativeN/A

                                                                                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        3. lower-*.f6465.7%

                                                                                                          \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        4. lift-pow.f64N/A

                                                                                                          \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        5. lift-/.f64N/A

                                                                                                          \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        6. metadata-evalN/A

                                                                                                          \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        7. unpow1/2N/A

                                                                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        8. lower-sqrt.f6465.7%

                                                                                                          \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        9. lift-pow.f64N/A

                                                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        10. lift-/.f64N/A

                                                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        11. metadata-evalN/A

                                                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        12. unpow1/2N/A

                                                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                        13. lower-sqrt.f6465.7%

                                                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      3. Applied rewrites65.7%

                                                                                                        \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                      4. Taylor expanded in d around inf

                                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                      5. Step-by-step derivation
                                                                                                        1. Applied rewrites39.0%

                                                                                                          \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                        2. Step-by-step derivation
                                                                                                          1. Applied rewrites43.2%

                                                                                                            \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                          2. Step-by-step derivation
                                                                                                            1. lift-*.f64N/A

                                                                                                              \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                            2. lift-/.f64N/A

                                                                                                              \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                                                                            3. associate-*l/N/A

                                                                                                              \[\leadsto \color{blue}{\frac{\left|d\right| \cdot 1}{\sqrt{\ell \cdot h}}} \]
                                                                                                            4. lift-sqrt.f64N/A

                                                                                                              \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                                                            5. pow1/2N/A

                                                                                                              \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{{\left(\ell \cdot h\right)}^{\frac{1}{2}}}} \]
                                                                                                            6. lift-*.f64N/A

                                                                                                              \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(\ell \cdot h\right)}}^{\frac{1}{2}}} \]
                                                                                                            7. *-commutativeN/A

                                                                                                              \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(h \cdot \ell\right)}}^{\frac{1}{2}}} \]
                                                                                                            8. lift-*.f64N/A

                                                                                                              \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(h \cdot \ell\right)}}^{\frac{1}{2}}} \]
                                                                                                            9. pow1/2N/A

                                                                                                              \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                                                                                                            10. lift-sqrt.f64N/A

                                                                                                              \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                                                                                                            11. lower-/.f64N/A

                                                                                                              \[\leadsto \color{blue}{\frac{\left|d\right| \cdot 1}{\sqrt{h \cdot \ell}}} \]
                                                                                                          3. Applied rewrites25.9%

                                                                                                            \[\leadsto \color{blue}{\frac{1 \cdot \left(-d\right)}{\sqrt{\ell \cdot h}}} \]

                                                                                                          if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64))) (pow.f64 (/.f64 d l) (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)))) (-.f64 #s(literal 1 binary64) (*.f64 (*.f64 (/.f64 #s(literal 1 binary64) #s(literal 2 binary64)) (pow.f64 (/.f64 (*.f64 M D) (*.f64 #s(literal 2 binary64) d)) #s(literal 2 binary64))) (/.f64 h l)))) < 9.9999999999999993e158

                                                                                                          1. Initial program 65.7%

                                                                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          2. Taylor expanded in d around 0

                                                                                                            \[\leadsto \color{blue}{\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. lower-*.f64N/A

                                                                                                              \[\leadsto \frac{-1}{8} \cdot \color{blue}{\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                                                            2. lower-/.f64N/A

                                                                                                              \[\leadsto \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}} \]
                                                                                                          4. Applied rewrites18.1%

                                                                                                            \[\leadsto \color{blue}{-0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)\right)}{{d}^{2} \cdot \ell}} \]
                                                                                                          5. Applied rewrites29.2%

                                                                                                            \[\leadsto \frac{\frac{\left(-0.125 \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)\right) \cdot \left(\frac{\left|d\right|}{\sqrt{h \cdot \ell}} \cdot h\right)}{\ell \cdot d}}{\color{blue}{d}} \]
                                                                                                          6. Taylor expanded in l around inf

                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}} \]
                                                                                                          7. Step-by-step derivation
                                                                                                            1. lower-*.f64N/A

                                                                                                              \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
                                                                                                            2. lower-sqrt.f64N/A

                                                                                                              \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}} \]
                                                                                                            3. lower-/.f64N/A

                                                                                                              \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{\color{blue}{d}}{\ell}} \]
                                                                                                            4. lower-sqrt.f64N/A

                                                                                                              \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
                                                                                                            5. lower-/.f6439.0%

                                                                                                              \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}} \]
                                                                                                          8. Applied rewrites39.0%

                                                                                                            \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}} \]

                                                                                                          if 9.9999999999999993e158 < (*.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 65.7%

                                                                                                            \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          2. Step-by-step derivation
                                                                                                            1. lift-*.f64N/A

                                                                                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            2. *-commutativeN/A

                                                                                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            3. lower-*.f6465.7%

                                                                                                              \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            4. lift-pow.f64N/A

                                                                                                              \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            5. lift-/.f64N/A

                                                                                                              \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            6. metadata-evalN/A

                                                                                                              \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            7. unpow1/2N/A

                                                                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            8. lower-sqrt.f6465.7%

                                                                                                              \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            9. lift-pow.f64N/A

                                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            10. lift-/.f64N/A

                                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            11. metadata-evalN/A

                                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            12. unpow1/2N/A

                                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                            13. lower-sqrt.f6465.7%

                                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          3. Applied rewrites65.7%

                                                                                                            \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                          4. Taylor expanded in d around inf

                                                                                                            \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                          5. Step-by-step derivation
                                                                                                            1. Applied rewrites39.0%

                                                                                                              \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                            2. Step-by-step derivation
                                                                                                              1. Applied rewrites43.2%

                                                                                                                \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                            3. Recombined 3 regimes into one program.
                                                                                                            4. Add Preprocessing

                                                                                                            Alternative 26: 46.2% accurate, 0.9× speedup?

                                                                                                            \[\begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -1 \cdot 10^{-80}:\\ \;\;\;\;\left(-d\right) \cdot \frac{1}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left|d\right|}{t\_0} \cdot 1\\ \end{array} \]
                                                                                                            (FPCore (d h l M D)
                                                                                                              :precision binary64
                                                                                                              (let* ((t_0 (sqrt (* l h))))
                                                                                                              (if (<=
                                                                                                                   (*
                                                                                                                    (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
                                                                                                                    (-
                                                                                                                     1.0
                                                                                                                     (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l))))
                                                                                                                   -1e-80)
                                                                                                                (* (- d) (/ 1.0 t_0))
                                                                                                                (* (/ (fabs d) t_0) 1.0))))
                                                                                                            double code(double d, double h, double l, double M, double D) {
                                                                                                            	double t_0 = sqrt((l * h));
                                                                                                            	double tmp;
                                                                                                            	if (((pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))) <= -1e-80) {
                                                                                                            		tmp = -d * (1.0 / t_0);
                                                                                                            	} else {
                                                                                                            		tmp = (fabs(d) / t_0) * 1.0;
                                                                                                            	}
                                                                                                            	return tmp;
                                                                                                            }
                                                                                                            
                                                                                                            module fmin_fmax_functions
                                                                                                                implicit none
                                                                                                                private
                                                                                                                public fmax
                                                                                                                public fmin
                                                                                                            
                                                                                                                interface fmax
                                                                                                                    module procedure fmax88
                                                                                                                    module procedure fmax44
                                                                                                                    module procedure fmax84
                                                                                                                    module procedure fmax48
                                                                                                                end interface
                                                                                                                interface fmin
                                                                                                                    module procedure fmin88
                                                                                                                    module procedure fmin44
                                                                                                                    module procedure fmin84
                                                                                                                    module procedure fmin48
                                                                                                                end interface
                                                                                                            contains
                                                                                                                real(8) function fmax88(x, y) result (res)
                                                                                                                    real(8), intent (in) :: x
                                                                                                                    real(8), intent (in) :: y
                                                                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(4) function fmax44(x, y) result (res)
                                                                                                                    real(4), intent (in) :: x
                                                                                                                    real(4), intent (in) :: y
                                                                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(8) function fmax84(x, y) result(res)
                                                                                                                    real(8), intent (in) :: x
                                                                                                                    real(4), intent (in) :: y
                                                                                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(8) function fmax48(x, y) result(res)
                                                                                                                    real(4), intent (in) :: x
                                                                                                                    real(8), intent (in) :: y
                                                                                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(8) function fmin88(x, y) result (res)
                                                                                                                    real(8), intent (in) :: x
                                                                                                                    real(8), intent (in) :: y
                                                                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(4) function fmin44(x, y) result (res)
                                                                                                                    real(4), intent (in) :: x
                                                                                                                    real(4), intent (in) :: y
                                                                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(8) function fmin84(x, y) result(res)
                                                                                                                    real(8), intent (in) :: x
                                                                                                                    real(4), intent (in) :: y
                                                                                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(8) function fmin48(x, y) result(res)
                                                                                                                    real(4), intent (in) :: x
                                                                                                                    real(8), intent (in) :: y
                                                                                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                end function
                                                                                                            end module
                                                                                                            
                                                                                                            real(8) function code(d, h, l, m, d_1)
                                                                                                            use fmin_fmax_functions
                                                                                                                real(8), intent (in) :: d
                                                                                                                real(8), intent (in) :: h
                                                                                                                real(8), intent (in) :: l
                                                                                                                real(8), intent (in) :: m
                                                                                                                real(8), intent (in) :: d_1
                                                                                                                real(8) :: t_0
                                                                                                                real(8) :: tmp
                                                                                                                t_0 = sqrt((l * h))
                                                                                                                if (((((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))) <= (-1d-80)) then
                                                                                                                    tmp = -d * (1.0d0 / t_0)
                                                                                                                else
                                                                                                                    tmp = (abs(d) / t_0) * 1.0d0
                                                                                                                end if
                                                                                                                code = tmp
                                                                                                            end function
                                                                                                            
                                                                                                            public static double code(double d, double h, double l, double M, double D) {
                                                                                                            	double t_0 = Math.sqrt((l * h));
                                                                                                            	double tmp;
                                                                                                            	if (((Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))) <= -1e-80) {
                                                                                                            		tmp = -d * (1.0 / t_0);
                                                                                                            	} else {
                                                                                                            		tmp = (Math.abs(d) / t_0) * 1.0;
                                                                                                            	}
                                                                                                            	return tmp;
                                                                                                            }
                                                                                                            
                                                                                                            def code(d, h, l, M, D):
                                                                                                            	t_0 = math.sqrt((l * h))
                                                                                                            	tmp = 0
                                                                                                            	if ((math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))) <= -1e-80:
                                                                                                            		tmp = -d * (1.0 / t_0)
                                                                                                            	else:
                                                                                                            		tmp = (math.fabs(d) / t_0) * 1.0
                                                                                                            	return tmp
                                                                                                            
                                                                                                            function code(d, h, l, M, D)
                                                                                                            	t_0 = sqrt(Float64(l * h))
                                                                                                            	tmp = 0.0
                                                                                                            	if (Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) <= -1e-80)
                                                                                                            		tmp = Float64(Float64(-d) * Float64(1.0 / t_0));
                                                                                                            	else
                                                                                                            		tmp = Float64(Float64(abs(d) / t_0) * 1.0);
                                                                                                            	end
                                                                                                            	return tmp
                                                                                                            end
                                                                                                            
                                                                                                            function tmp_2 = code(d, h, l, M, D)
                                                                                                            	t_0 = sqrt((l * h));
                                                                                                            	tmp = 0.0;
                                                                                                            	if (((((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)))) <= -1e-80)
                                                                                                            		tmp = -d * (1.0 / t_0);
                                                                                                            	else
                                                                                                            		tmp = (abs(d) / t_0) * 1.0;
                                                                                                            	end
                                                                                                            	tmp_2 = tmp;
                                                                                                            end
                                                                                                            
                                                                                                            code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-80], N[((-d) * N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[Abs[d], $MachinePrecision] / t$95$0), $MachinePrecision] * 1.0), $MachinePrecision]]]
                                                                                                            
                                                                                                            \begin{array}{l}
                                                                                                            t_0 := \sqrt{\ell \cdot h}\\
                                                                                                            \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \leq -1 \cdot 10^{-80}:\\
                                                                                                            \;\;\;\;\left(-d\right) \cdot \frac{1}{t\_0}\\
                                                                                                            
                                                                                                            \mathbf{else}:\\
                                                                                                            \;\;\;\;\frac{\left|d\right|}{t\_0} \cdot 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)))) < -9.9999999999999996e-81

                                                                                                              1. Initial program 65.7%

                                                                                                                \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                              2. Step-by-step derivation
                                                                                                                1. lift-*.f64N/A

                                                                                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                2. *-commutativeN/A

                                                                                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                3. lower-*.f6465.7%

                                                                                                                  \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                4. lift-pow.f64N/A

                                                                                                                  \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                5. lift-/.f64N/A

                                                                                                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                6. metadata-evalN/A

                                                                                                                  \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                7. unpow1/2N/A

                                                                                                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                8. lower-sqrt.f6465.7%

                                                                                                                  \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                9. lift-pow.f64N/A

                                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                10. lift-/.f64N/A

                                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                11. metadata-evalN/A

                                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                12. unpow1/2N/A

                                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                13. lower-sqrt.f6465.7%

                                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                              3. Applied rewrites65.7%

                                                                                                                \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                              4. Taylor expanded in d around inf

                                                                                                                \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                              5. Step-by-step derivation
                                                                                                                1. Applied rewrites39.0%

                                                                                                                  \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                                2. Step-by-step derivation
                                                                                                                  1. Applied rewrites43.2%

                                                                                                                    \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                                  2. Step-by-step derivation
                                                                                                                    1. lift-*.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                                    2. lift-/.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                                                                                    3. associate-*l/N/A

                                                                                                                      \[\leadsto \color{blue}{\frac{\left|d\right| \cdot 1}{\sqrt{\ell \cdot h}}} \]
                                                                                                                    4. lift-sqrt.f64N/A

                                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                                                                    5. pow1/2N/A

                                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{{\left(\ell \cdot h\right)}^{\frac{1}{2}}}} \]
                                                                                                                    6. lift-*.f64N/A

                                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(\ell \cdot h\right)}}^{\frac{1}{2}}} \]
                                                                                                                    7. *-commutativeN/A

                                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(h \cdot \ell\right)}}^{\frac{1}{2}}} \]
                                                                                                                    8. lift-*.f64N/A

                                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(h \cdot \ell\right)}}^{\frac{1}{2}}} \]
                                                                                                                    9. pow1/2N/A

                                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                                                                                                                    10. lift-sqrt.f64N/A

                                                                                                                      \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                                                                                                                    11. associate-/l*N/A

                                                                                                                      \[\leadsto \color{blue}{\left|d\right| \cdot \frac{1}{\sqrt{h \cdot \ell}}} \]
                                                                                                                    12. lower-*.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\left|d\right| \cdot \frac{1}{\sqrt{h \cdot \ell}}} \]
                                                                                                                  3. Applied rewrites25.9%

                                                                                                                    \[\leadsto \color{blue}{\left(-d\right) \cdot \frac{1}{\sqrt{\ell \cdot h}}} \]

                                                                                                                  if -9.9999999999999996e-81 < (*.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 65.7%

                                                                                                                    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                  2. Step-by-step derivation
                                                                                                                    1. lift-*.f64N/A

                                                                                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    2. *-commutativeN/A

                                                                                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    3. lower-*.f6465.7%

                                                                                                                      \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    4. lift-pow.f64N/A

                                                                                                                      \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    5. lift-/.f64N/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    6. metadata-evalN/A

                                                                                                                      \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    7. unpow1/2N/A

                                                                                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    8. lower-sqrt.f6465.7%

                                                                                                                      \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    9. lift-pow.f64N/A

                                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    10. lift-/.f64N/A

                                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    11. metadata-evalN/A

                                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    12. unpow1/2N/A

                                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    13. lower-sqrt.f6465.7%

                                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                  3. Applied rewrites65.7%

                                                                                                                    \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                  4. Taylor expanded in d around inf

                                                                                                                    \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                                  5. Step-by-step derivation
                                                                                                                    1. Applied rewrites39.0%

                                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                                    2. Step-by-step derivation
                                                                                                                      1. Applied rewrites43.2%

                                                                                                                        \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                                    3. Recombined 2 regimes into one program.
                                                                                                                    4. Add Preprocessing

                                                                                                                    Alternative 27: 25.9% accurate, 7.2× speedup?

                                                                                                                    \[\left(-d\right) \cdot \frac{1}{\sqrt{\ell \cdot h}} \]
                                                                                                                    (FPCore (d h l M D)
                                                                                                                      :precision binary64
                                                                                                                      (* (- d) (/ 1.0 (sqrt (* l h)))))
                                                                                                                    double code(double d, double h, double l, double M, double D) {
                                                                                                                    	return -d * (1.0 / sqrt((l * h)));
                                                                                                                    }
                                                                                                                    
                                                                                                                    module fmin_fmax_functions
                                                                                                                        implicit none
                                                                                                                        private
                                                                                                                        public fmax
                                                                                                                        public fmin
                                                                                                                    
                                                                                                                        interface fmax
                                                                                                                            module procedure fmax88
                                                                                                                            module procedure fmax44
                                                                                                                            module procedure fmax84
                                                                                                                            module procedure fmax48
                                                                                                                        end interface
                                                                                                                        interface fmin
                                                                                                                            module procedure fmin88
                                                                                                                            module procedure fmin44
                                                                                                                            module procedure fmin84
                                                                                                                            module procedure fmin48
                                                                                                                        end interface
                                                                                                                    contains
                                                                                                                        real(8) function fmax88(x, y) result (res)
                                                                                                                            real(8), intent (in) :: x
                                                                                                                            real(8), intent (in) :: y
                                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(4) function fmax44(x, y) result (res)
                                                                                                                            real(4), intent (in) :: x
                                                                                                                            real(4), intent (in) :: y
                                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(8) function fmax84(x, y) result(res)
                                                                                                                            real(8), intent (in) :: x
                                                                                                                            real(4), intent (in) :: y
                                                                                                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(8) function fmax48(x, y) result(res)
                                                                                                                            real(4), intent (in) :: x
                                                                                                                            real(8), intent (in) :: y
                                                                                                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(8) function fmin88(x, y) result (res)
                                                                                                                            real(8), intent (in) :: x
                                                                                                                            real(8), intent (in) :: y
                                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(4) function fmin44(x, y) result (res)
                                                                                                                            real(4), intent (in) :: x
                                                                                                                            real(4), intent (in) :: y
                                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(8) function fmin84(x, y) result(res)
                                                                                                                            real(8), intent (in) :: x
                                                                                                                            real(4), intent (in) :: y
                                                                                                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(8) function fmin48(x, y) result(res)
                                                                                                                            real(4), intent (in) :: x
                                                                                                                            real(8), intent (in) :: y
                                                                                                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                    end module
                                                                                                                    
                                                                                                                    real(8) function code(d, h, l, m, d_1)
                                                                                                                    use fmin_fmax_functions
                                                                                                                        real(8), intent (in) :: d
                                                                                                                        real(8), intent (in) :: h
                                                                                                                        real(8), intent (in) :: l
                                                                                                                        real(8), intent (in) :: m
                                                                                                                        real(8), intent (in) :: d_1
                                                                                                                        code = -d * (1.0d0 / sqrt((l * h)))
                                                                                                                    end function
                                                                                                                    
                                                                                                                    public static double code(double d, double h, double l, double M, double D) {
                                                                                                                    	return -d * (1.0 / Math.sqrt((l * h)));
                                                                                                                    }
                                                                                                                    
                                                                                                                    def code(d, h, l, M, D):
                                                                                                                    	return -d * (1.0 / math.sqrt((l * h)))
                                                                                                                    
                                                                                                                    function code(d, h, l, M, D)
                                                                                                                    	return Float64(Float64(-d) * Float64(1.0 / sqrt(Float64(l * h))))
                                                                                                                    end
                                                                                                                    
                                                                                                                    function tmp = code(d, h, l, M, D)
                                                                                                                    	tmp = -d * (1.0 / sqrt((l * h)));
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[d_, h_, l_, M_, D_] := N[((-d) * N[(1.0 / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                                                                    
                                                                                                                    \left(-d\right) \cdot \frac{1}{\sqrt{\ell \cdot h}}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Initial program 65.7%

                                                                                                                      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    2. Step-by-step derivation
                                                                                                                      1. lift-*.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      2. *-commutativeN/A

                                                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      3. lower-*.f6465.7%

                                                                                                                        \[\leadsto \color{blue}{\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      4. lift-pow.f64N/A

                                                                                                                        \[\leadsto \left(\color{blue}{{\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      5. lift-/.f64N/A

                                                                                                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      6. metadata-evalN/A

                                                                                                                        \[\leadsto \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{\frac{1}{2}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      7. unpow1/2N/A

                                                                                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      8. lower-sqrt.f6465.7%

                                                                                                                        \[\leadsto \left(\color{blue}{\sqrt{\frac{d}{\ell}}} \cdot {\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      9. lift-pow.f64N/A

                                                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      10. lift-/.f64N/A

                                                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      11. metadata-evalN/A

                                                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot {\left(\frac{d}{h}\right)}^{\color{blue}{\frac{1}{2}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      12. unpow1/2N/A

                                                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                      13. lower-sqrt.f6465.7%

                                                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    3. Applied rewrites65.7%

                                                                                                                      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
                                                                                                                    4. Taylor expanded in d around inf

                                                                                                                      \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                                    5. Step-by-step derivation
                                                                                                                      1. Applied rewrites39.0%

                                                                                                                        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{1} \]
                                                                                                                      2. Step-by-step derivation
                                                                                                                        1. Applied rewrites43.2%

                                                                                                                          \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                                        2. Step-by-step derivation
                                                                                                                          1. lift-*.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}} \cdot 1} \]
                                                                                                                          2. lift-/.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\frac{\left|d\right|}{\sqrt{\ell \cdot h}}} \cdot 1 \]
                                                                                                                          3. associate-*l/N/A

                                                                                                                            \[\leadsto \color{blue}{\frac{\left|d\right| \cdot 1}{\sqrt{\ell \cdot h}}} \]
                                                                                                                          4. lift-sqrt.f64N/A

                                                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{\ell \cdot h}}} \]
                                                                                                                          5. pow1/2N/A

                                                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{{\left(\ell \cdot h\right)}^{\frac{1}{2}}}} \]
                                                                                                                          6. lift-*.f64N/A

                                                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(\ell \cdot h\right)}}^{\frac{1}{2}}} \]
                                                                                                                          7. *-commutativeN/A

                                                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(h \cdot \ell\right)}}^{\frac{1}{2}}} \]
                                                                                                                          8. lift-*.f64N/A

                                                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{{\color{blue}{\left(h \cdot \ell\right)}}^{\frac{1}{2}}} \]
                                                                                                                          9. pow1/2N/A

                                                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                                                                                                                          10. lift-sqrt.f64N/A

                                                                                                                            \[\leadsto \frac{\left|d\right| \cdot 1}{\color{blue}{\sqrt{h \cdot \ell}}} \]
                                                                                                                          11. associate-/l*N/A

                                                                                                                            \[\leadsto \color{blue}{\left|d\right| \cdot \frac{1}{\sqrt{h \cdot \ell}}} \]
                                                                                                                          12. lower-*.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\left|d\right| \cdot \frac{1}{\sqrt{h \cdot \ell}}} \]
                                                                                                                        3. Applied rewrites25.9%

                                                                                                                          \[\leadsto \color{blue}{\left(-d\right) \cdot \frac{1}{\sqrt{\ell \cdot h}}} \]
                                                                                                                        4. Add Preprocessing

                                                                                                                        Reproduce

                                                                                                                        ?
                                                                                                                        herbie shell --seed 2025213 
                                                                                                                        (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)))))