Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.5% → 85.9%
Time: 31.3s
Alternatives: 19
Speedup: 2.4×

Specification

?
\[\begin{array}{l} \\ \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \end{array} \]
(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)));
}
real(8) function code(d, h, l, m, d_1)
    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]
\begin{array}{l}

\\
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 66.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \end{array} \]
(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)));
}
real(8) function code(d, h, l, m, d_1)
    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]
\begin{array}{l}

\\
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\end{array}

Alternative 1: 85.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
t_1 := {\left(0 - d\right)}^{0.5}\\
t_2 := \frac{d}{M \cdot D}\\
t_3 := \frac{h}{t\_2}\\
\mathbf{if}\;\ell \leq -2.6 \cdot 10^{-136}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\frac{t\_1}{\sqrt{0 - h}} \cdot \left(1 + \left(h \cdot \left(t\_0 \cdot 0.25\right)\right) \cdot \frac{\frac{t\_0}{-2}}{\ell}\right)\right)\\

\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{t\_1}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(\left(1 + \frac{t\_3}{\ell} \cdot \frac{-0.125}{t\_2}\right) \cdot \sqrt{\frac{d}{h}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -2.59999999999999997e-136

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.3%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(h\right)}}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      2. sqrt-divN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\mathsf{neg}\left(d\right)\right)}^{\left(\frac{1}{2}\right)}\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \left(\frac{1}{2}\right)\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(0 - d\right), \left(\frac{1}{2}\right)\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\frac{1}{2}\right)\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(h\right)}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      10. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(\left(\mathsf{neg}\left(h\right)\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(\left(0 - h\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      12. --lowering--.f6484.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(0, h\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr84.9%

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

    if -2.59999999999999997e-136 < l < -1.000000000000002e-309

    1. Initial program 76.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified77.3%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr77.2%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr79.7%

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

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{{\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      6. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(0 - d\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      8. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left({\left(\mathsf{neg}\left(\ell\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(\ell\right)\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(0 - \ell\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right)}, \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      11. --lowering--.f6496.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, \ell\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right)}, \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
    9. Applied egg-rr96.9%

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

    if -1.000000000000002e-309 < l

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6471.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr71.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr76.4%

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

      \[\leadsto \color{blue}{\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\frac{\frac{d}{M \cdot D}}{-0.125} \cdot \ell}\right)}{\sqrt{h}}}{\sqrt{\ell}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.6 \cdot 10^{-136}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\frac{{\left(0 - d\right)}^{0.5}}{\sqrt{0 - h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{{\left(0 - d\right)}^{0.5}}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(\left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell} \cdot \frac{-0.125}{\frac{d}{M \cdot D}}\right) \cdot \sqrt{\frac{d}{h}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell \cdot \frac{\frac{d}{M \cdot D}}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 85.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ t_1 := \frac{d}{M \cdot D}\\ t_2 := \frac{h}{t\_1}\\ t_3 := {\left(0 - d\right)}^{0.5}\\ \mathbf{if}\;\ell \leq -1.75 \cdot 10^{-137}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \frac{1 + -0.125 \cdot \frac{h \cdot t\_0}{\frac{\ell}{t\_0}}}{\frac{{\left(0 - h\right)}^{0.5}}{t\_3}}\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{t\_3}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(\left(1 + \frac{t\_2}{\ell} \cdot \frac{-0.125}{t\_1}\right) \cdot \sqrt{\frac{d}{h}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{t\_2}{\ell \cdot \frac{t\_1}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ (* M D) d))
        (t_1 (/ d (* M D)))
        (t_2 (/ h t_1))
        (t_3 (pow (- 0.0 d) 0.5)))
   (if (<= l -1.75e-137)
     (*
      (sqrt (/ d l))
      (/
       (+ 1.0 (* -0.125 (/ (* h t_0) (/ l t_0))))
       (/ (pow (- 0.0 h) 0.5) t_3)))
     (if (<= l -1e-309)
       (*
        (/ t_3 (pow (- 0.0 l) 0.5))
        (* (+ 1.0 (* (/ t_2 l) (/ -0.125 t_1))) (sqrt (/ d h))))
       (/ (/ (* d (+ 1.0 (/ t_2 (* l (/ t_1 -0.125))))) (sqrt h)) (sqrt l))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = (M * D) / d;
	double t_1 = d / (M * D);
	double t_2 = h / t_1;
	double t_3 = pow((0.0 - d), 0.5);
	double tmp;
	if (l <= -1.75e-137) {
		tmp = sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (pow((0.0 - h), 0.5) / t_3));
	} else if (l <= -1e-309) {
		tmp = (t_3 / pow((0.0 - l), 0.5)) * ((1.0 + ((t_2 / l) * (-0.125 / t_1))) * sqrt((d / h)));
	} else {
		tmp = ((d * (1.0 + (t_2 / (l * (t_1 / -0.125))))) / sqrt(h)) / sqrt(l);
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = (m * d_1) / d
    t_1 = d / (m * d_1)
    t_2 = h / t_1
    t_3 = (0.0d0 - d) ** 0.5d0
    if (l <= (-1.75d-137)) then
        tmp = sqrt((d / l)) * ((1.0d0 + ((-0.125d0) * ((h * t_0) / (l / t_0)))) / (((0.0d0 - h) ** 0.5d0) / t_3))
    else if (l <= (-1d-309)) then
        tmp = (t_3 / ((0.0d0 - l) ** 0.5d0)) * ((1.0d0 + ((t_2 / l) * ((-0.125d0) / t_1))) * sqrt((d / h)))
    else
        tmp = ((d * (1.0d0 + (t_2 / (l * (t_1 / (-0.125d0)))))) / sqrt(h)) / sqrt(l)
    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) / d;
	double t_1 = d / (M * D);
	double t_2 = h / t_1;
	double t_3 = Math.pow((0.0 - d), 0.5);
	double tmp;
	if (l <= -1.75e-137) {
		tmp = Math.sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (Math.pow((0.0 - h), 0.5) / t_3));
	} else if (l <= -1e-309) {
		tmp = (t_3 / Math.pow((0.0 - l), 0.5)) * ((1.0 + ((t_2 / l) * (-0.125 / t_1))) * Math.sqrt((d / h)));
	} else {
		tmp = ((d * (1.0 + (t_2 / (l * (t_1 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = (M * D) / d
	t_1 = d / (M * D)
	t_2 = h / t_1
	t_3 = math.pow((0.0 - d), 0.5)
	tmp = 0
	if l <= -1.75e-137:
		tmp = math.sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (math.pow((0.0 - h), 0.5) / t_3))
	elif l <= -1e-309:
		tmp = (t_3 / math.pow((0.0 - l), 0.5)) * ((1.0 + ((t_2 / l) * (-0.125 / t_1))) * math.sqrt((d / h)))
	else:
		tmp = ((d * (1.0 + (t_2 / (l * (t_1 / -0.125))))) / math.sqrt(h)) / math.sqrt(l)
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(Float64(M * D) / d)
	t_1 = Float64(d / Float64(M * D))
	t_2 = Float64(h / t_1)
	t_3 = Float64(0.0 - d) ^ 0.5
	tmp = 0.0
	if (l <= -1.75e-137)
		tmp = Float64(sqrt(Float64(d / l)) * Float64(Float64(1.0 + Float64(-0.125 * Float64(Float64(h * t_0) / Float64(l / t_0)))) / Float64((Float64(0.0 - h) ^ 0.5) / t_3)));
	elseif (l <= -1e-309)
		tmp = Float64(Float64(t_3 / (Float64(0.0 - l) ^ 0.5)) * Float64(Float64(1.0 + Float64(Float64(t_2 / l) * Float64(-0.125 / t_1))) * sqrt(Float64(d / h))));
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(t_2 / Float64(l * Float64(t_1 / -0.125))))) / sqrt(h)) / sqrt(l));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = (M * D) / d;
	t_1 = d / (M * D);
	t_2 = h / t_1;
	t_3 = (0.0 - d) ^ 0.5;
	tmp = 0.0;
	if (l <= -1.75e-137)
		tmp = sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (((0.0 - h) ^ 0.5) / t_3));
	elseif (l <= -1e-309)
		tmp = (t_3 / ((0.0 - l) ^ 0.5)) * ((1.0 + ((t_2 / l) * (-0.125 / t_1))) * sqrt((d / h)));
	else
		tmp = ((d * (1.0 + (t_2 / (l * (t_1 / -0.125))))) / sqrt(h)) / sqrt(l);
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(h / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(0.0 - d), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l, -1.75e-137], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[(1.0 + N[(-0.125 * N[(N[(h * t$95$0), $MachinePrecision] / N[(l / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(0.0 - h), $MachinePrecision], 0.5], $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(N[(t$95$3 / N[Power[N[(0.0 - l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(t$95$2 / l), $MachinePrecision] * N[(-0.125 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(t$95$2 / N[(l * N[(t$95$1 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
t_1 := \frac{d}{M \cdot D}\\
t_2 := \frac{h}{t\_1}\\
t_3 := {\left(0 - d\right)}^{0.5}\\
\mathbf{if}\;\ell \leq -1.75 \cdot 10^{-137}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \frac{1 + -0.125 \cdot \frac{h \cdot t\_0}{\frac{\ell}{t\_0}}}{\frac{{\left(0 - h\right)}^{0.5}}{t\_3}}\\

\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{t\_3}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(\left(1 + \frac{t\_2}{\ell} \cdot \frac{-0.125}{t\_1}\right) \cdot \sqrt{\frac{d}{h}}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -1.7500000000000001e-137

    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.3%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr71.2%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left(\sqrt{\frac{\mathsf{neg}\left(h\right)}{\mathsf{neg}\left(d\right)}}\right)\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left(\frac{\sqrt{\mathsf{neg}\left(h\right)}}{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\left(\sqrt{\mathsf{neg}\left(h\right)}\right), \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)}\right)}\right)\right)\right) \]
      4. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\left({\left(\mathsf{neg}\left(h\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{\color{blue}{\mathsf{neg}\left(d\right)}}\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(h\right)\right), \frac{1}{2}\right), \left(\sqrt{\color{blue}{\mathsf{neg}\left(d\right)}}\right)\right)\right)\right) \]
      6. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(0 - h\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\color{blue}{d}\right)}\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\color{blue}{d}\right)}\right)\right)\right)\right) \]
      8. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right), \left({\left(\mathsf{neg}\left(d\right)\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      10. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(0 - d\right), \frac{1}{2}\right)\right)\right)\right) \]
      11. --lowering--.f6484.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right)\right)\right)\right) \]
    8. Applied egg-rr84.9%

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

    if -1.7500000000000001e-137 < l < -1.000000000000002e-309

    1. Initial program 76.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified77.3%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr77.2%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr79.7%

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

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{\mathsf{neg}\left(d\right)}{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\sqrt{\mathsf{neg}\left(d\right)}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{{\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}}}{\sqrt{\mathsf{neg}\left(\ell\right)}}\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\left(\mathsf{neg}\left(d\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(\color{blue}{1}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      6. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(0 - d\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\ell\right)}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      8. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \left({\left(\mathsf{neg}\left(\ell\right)\right)}^{\frac{1}{2}}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(\ell\right)\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(0 - \ell\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right)}, \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      11. --lowering--.f6496.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, \ell\right), \frac{1}{2}\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\color{blue}{\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \ell\right)}, \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
    9. Applied egg-rr96.9%

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

    if -1.000000000000002e-309 < l

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6471.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr71.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr76.4%

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

      \[\leadsto \color{blue}{\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\frac{\frac{d}{M \cdot D}}{-0.125} \cdot \ell}\right)}{\sqrt{h}}}{\sqrt{\ell}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification87.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.75 \cdot 10^{-137}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \frac{1 + -0.125 \cdot \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}}}{\frac{{\left(0 - h\right)}^{0.5}}{{\left(0 - d\right)}^{0.5}}}\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{{\left(0 - d\right)}^{0.5}}{{\left(0 - \ell\right)}^{0.5}} \cdot \left(\left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell} \cdot \frac{-0.125}{\frac{d}{M \cdot D}}\right) \cdot \sqrt{\frac{d}{h}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell \cdot \frac{\frac{d}{M \cdot D}}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ t_1 := \frac{d}{M \cdot D}\\ \mathbf{if}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \frac{1 + -0.125 \cdot \frac{h \cdot t\_0}{\frac{\ell}{t\_0}}}{\frac{{\left(0 - h\right)}^{0.5}}{{\left(0 - d\right)}^{0.5}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{t\_1}}{\ell \cdot \frac{t\_1}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ (* M D) d)) (t_1 (/ d (* M D))))
   (if (<= d -5e-310)
     (*
      (sqrt (/ d l))
      (/
       (+ 1.0 (* -0.125 (/ (* h t_0) (/ l t_0))))
       (/ (pow (- 0.0 h) 0.5) (pow (- 0.0 d) 0.5))))
     (/
      (/ (* d (+ 1.0 (/ (/ h t_1) (* l (/ t_1 -0.125))))) (sqrt h))
      (sqrt l)))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = (M * D) / d;
	double t_1 = d / (M * D);
	double tmp;
	if (d <= -5e-310) {
		tmp = sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (pow((0.0 - h), 0.5) / pow((0.0 - d), 0.5)));
	} else {
		tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / sqrt(h)) / sqrt(l);
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    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 = (m * d_1) / d
    t_1 = d / (m * d_1)
    if (d <= (-5d-310)) then
        tmp = sqrt((d / l)) * ((1.0d0 + ((-0.125d0) * ((h * t_0) / (l / t_0)))) / (((0.0d0 - h) ** 0.5d0) / ((0.0d0 - d) ** 0.5d0)))
    else
        tmp = ((d * (1.0d0 + ((h / t_1) / (l * (t_1 / (-0.125d0)))))) / sqrt(h)) / sqrt(l)
    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) / d;
	double t_1 = d / (M * D);
	double tmp;
	if (d <= -5e-310) {
		tmp = Math.sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (Math.pow((0.0 - h), 0.5) / Math.pow((0.0 - d), 0.5)));
	} else {
		tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = (M * D) / d
	t_1 = d / (M * D)
	tmp = 0
	if d <= -5e-310:
		tmp = math.sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (math.pow((0.0 - h), 0.5) / math.pow((0.0 - d), 0.5)))
	else:
		tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / math.sqrt(h)) / math.sqrt(l)
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(Float64(M * D) / d)
	t_1 = Float64(d / Float64(M * D))
	tmp = 0.0
	if (d <= -5e-310)
		tmp = Float64(sqrt(Float64(d / l)) * Float64(Float64(1.0 + Float64(-0.125 * Float64(Float64(h * t_0) / Float64(l / t_0)))) / Float64((Float64(0.0 - h) ^ 0.5) / (Float64(0.0 - d) ^ 0.5))));
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(Float64(h / t_1) / Float64(l * Float64(t_1 / -0.125))))) / sqrt(h)) / sqrt(l));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = (M * D) / d;
	t_1 = d / (M * D);
	tmp = 0.0;
	if (d <= -5e-310)
		tmp = sqrt((d / l)) * ((1.0 + (-0.125 * ((h * t_0) / (l / t_0)))) / (((0.0 - h) ^ 0.5) / ((0.0 - d) ^ 0.5)));
	else
		tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / sqrt(h)) / sqrt(l);
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -5e-310], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[(1.0 + N[(-0.125 * N[(N[(h * t$95$0), $MachinePrecision] / N[(l / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[(0.0 - h), $MachinePrecision], 0.5], $MachinePrecision] / N[Power[N[(0.0 - d), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(N[(h / t$95$1), $MachinePrecision] / N[(l * N[(t$95$1 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
t_1 := \frac{d}{M \cdot D}\\
\mathbf{if}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \frac{1 + -0.125 \cdot \frac{h \cdot t\_0}{\frac{\ell}{t\_0}}}{\frac{{\left(0 - h\right)}^{0.5}}{{\left(0 - d\right)}^{0.5}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < -4.999999999999985e-310

    1. Initial program 71.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified73.0%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr72.8%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left(\sqrt{\frac{\mathsf{neg}\left(h\right)}{\mathsf{neg}\left(d\right)}}\right)\right)\right) \]
      2. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left(\frac{\sqrt{\mathsf{neg}\left(h\right)}}{\color{blue}{\sqrt{\mathsf{neg}\left(d\right)}}}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\left(\sqrt{\mathsf{neg}\left(h\right)}\right), \color{blue}{\left(\sqrt{\mathsf{neg}\left(d\right)}\right)}\right)\right)\right) \]
      4. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\left({\left(\mathsf{neg}\left(h\right)\right)}^{\frac{1}{2}}\right), \left(\sqrt{\color{blue}{\mathsf{neg}\left(d\right)}}\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(h\right)\right), \frac{1}{2}\right), \left(\sqrt{\color{blue}{\mathsf{neg}\left(d\right)}}\right)\right)\right)\right) \]
      6. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(0 - h\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\color{blue}{d}\right)}\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right), \left(\sqrt{\mathsf{neg}\left(\color{blue}{d}\right)}\right)\right)\right)\right) \]
      8. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right), \left({\left(\mathsf{neg}\left(d\right)\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \color{blue}{\frac{1}{2}}\right)\right)\right)\right) \]
      10. sub0-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\left(0 - d\right), \frac{1}{2}\right)\right)\right)\right) \]
      11. --lowering--.f6483.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, h\right), \frac{1}{2}\right), \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, d\right), \frac{1}{2}\right)\right)\right)\right) \]
    8. Applied egg-rr83.5%

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

    if -4.999999999999985e-310 < d

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6471.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr71.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr76.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \frac{1 + -0.125 \cdot \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}}}{\frac{{\left(0 - h\right)}^{0.5}}{{\left(0 - d\right)}^{0.5}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell \cdot \frac{\frac{d}{M \cdot D}}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.3% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{M \cdot D}\\ t_1 := \frac{h}{t\_0}\\ \mathbf{if}\;d \leq -1.55 \cdot 10^{+174}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -2.8 \cdot 10^{-214}:\\ \;\;\;\;\left(1 + \frac{t\_1}{\ell} \cdot \frac{-0.125}{t\_0}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{t\_1}{\ell \cdot \frac{t\_0}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ d (* M D))) (t_1 (/ h t_0)))
   (if (<= d -1.55e+174)
     (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
     (if (<= d -2.8e-214)
       (* (+ 1.0 (* (/ t_1 l) (/ -0.125 t_0))) (sqrt (* (/ d l) (/ d h))))
       (if (<= d -5e-310)
         (*
          (sqrt (/ (/ h l) (* l l)))
          (* -0.125 (/ (* M (* M (* D D))) (- 0.0 d))))
         (/
          (/ (* d (+ 1.0 (/ t_1 (* l (/ t_0 -0.125))))) (sqrt h))
          (sqrt l)))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = d / (M * D);
	double t_1 = h / t_0;
	double tmp;
	if (d <= -1.55e+174) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (d <= -2.8e-214) {
		tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * sqrt(((d / l) * (d / h)));
	} else if (d <= -5e-310) {
		tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	} else {
		tmp = ((d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / sqrt(h)) / sqrt(l);
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    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 / (m * d_1)
    t_1 = h / t_0
    if (d <= (-1.55d+174)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (d <= (-2.8d-214)) then
        tmp = (1.0d0 + ((t_1 / l) * ((-0.125d0) / t_0))) * sqrt(((d / l) * (d / h)))
    else if (d <= (-5d-310)) then
        tmp = sqrt(((h / l) / (l * l))) * ((-0.125d0) * ((m * (m * (d_1 * d_1))) / (0.0d0 - d)))
    else
        tmp = ((d * (1.0d0 + (t_1 / (l * (t_0 / (-0.125d0)))))) / sqrt(h)) / sqrt(l)
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = d / (M * D);
	double t_1 = h / t_0;
	double tmp;
	if (d <= -1.55e+174) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (d <= -2.8e-214) {
		tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * Math.sqrt(((d / l) * (d / h)));
	} else if (d <= -5e-310) {
		tmp = Math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	} else {
		tmp = ((d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = d / (M * D)
	t_1 = h / t_0
	tmp = 0
	if d <= -1.55e+174:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif d <= -2.8e-214:
		tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * math.sqrt(((d / l) * (d / h)))
	elif d <= -5e-310:
		tmp = math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)))
	else:
		tmp = ((d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / math.sqrt(h)) / math.sqrt(l)
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(d / Float64(M * D))
	t_1 = Float64(h / t_0)
	tmp = 0.0
	if (d <= -1.55e+174)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (d <= -2.8e-214)
		tmp = Float64(Float64(1.0 + Float64(Float64(t_1 / l) * Float64(-0.125 / t_0))) * sqrt(Float64(Float64(d / l) * Float64(d / h))));
	elseif (d <= -5e-310)
		tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(-0.125 * Float64(Float64(M * Float64(M * Float64(D * D))) / Float64(0.0 - d))));
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(t_1 / Float64(l * Float64(t_0 / -0.125))))) / sqrt(h)) / sqrt(l));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = d / (M * D);
	t_1 = h / t_0;
	tmp = 0.0;
	if (d <= -1.55e+174)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (d <= -2.8e-214)
		tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * sqrt(((d / l) * (d / h)));
	elseif (d <= -5e-310)
		tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	else
		tmp = ((d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / sqrt(h)) / sqrt(l);
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(h / t$95$0), $MachinePrecision]}, If[LessEqual[d, -1.55e+174], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.8e-214], N[(N[(1.0 + N[(N[(t$95$1 / l), $MachinePrecision] * N[(-0.125 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -5e-310], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(t$95$1 / N[(l * N[(t$95$0 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{d}{M \cdot D}\\
t_1 := \frac{h}{t\_0}\\
\mathbf{if}\;d \leq -1.55 \cdot 10^{+174}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;d \leq -2.8 \cdot 10^{-214}:\\
\;\;\;\;\left(1 + \frac{t\_1}{\ell} \cdot \frac{-0.125}{t\_0}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\

\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -1.55e174

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified67.8%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f647.3%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified7.3%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(0 - d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      11. /-lowering-/.f6479.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Simplified79.5%

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

    if -1.55e174 < d < -2.8000000000000002e-214

    1. Initial program 77.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified79.5%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr80.5%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr68.5%

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

    if -2.8000000000000002e-214 < d < -4.999999999999985e-310

    1. Initial program 47.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. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified47.8%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr41.0%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr47.8%

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

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

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

    if -4.999999999999985e-310 < d

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6471.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr71.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr76.4%

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

      \[\leadsto \color{blue}{\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\frac{\frac{d}{M \cdot D}}{-0.125} \cdot \ell}\right)}{\sqrt{h}}}{\sqrt{\ell}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification77.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.55 \cdot 10^{+174}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -2.8 \cdot 10^{-214}:\\ \;\;\;\;\left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell} \cdot \frac{-0.125}{\frac{d}{M \cdot D}}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell \cdot \frac{\frac{d}{M \cdot D}}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 79.0% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{M \cdot D}\\ \mathbf{if}\;d \leq -8.6 \cdot 10^{+228}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{-0.125}{t\_0} \cdot \frac{\frac{h}{\ell}}{t\_0}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{t\_0}}{\ell \cdot \frac{t\_0}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ d (* M D))))
   (if (<= d -8.6e+228)
     (* (- 0.0 d) (sqrt (/ 1.0 (* l h))))
     (if (<= d 2.8e-308)
       (*
        (sqrt (/ d l))
        (* (sqrt (/ d h)) (+ 1.0 (* (/ -0.125 t_0) (/ (/ h l) t_0)))))
       (/
        (/ (* d (+ 1.0 (/ (/ h t_0) (* l (/ t_0 -0.125))))) (sqrt h))
        (sqrt l))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = d / (M * D);
	double tmp;
	if (d <= -8.6e+228) {
		tmp = (0.0 - d) * sqrt((1.0 / (l * h)));
	} else if (d <= 2.8e-308) {
		tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((-0.125 / t_0) * ((h / l) / t_0))));
	} else {
		tmp = ((d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / sqrt(h)) / sqrt(l);
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    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 / (m * d_1)
    if (d <= (-8.6d+228)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (l * h)))
    else if (d <= 2.8d-308) then
        tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0d0 + (((-0.125d0) / t_0) * ((h / l) / t_0))))
    else
        tmp = ((d * (1.0d0 + ((h / t_0) / (l * (t_0 / (-0.125d0)))))) / sqrt(h)) / sqrt(l)
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = d / (M * D);
	double tmp;
	if (d <= -8.6e+228) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (l * h)));
	} else if (d <= 2.8e-308) {
		tmp = Math.sqrt((d / l)) * (Math.sqrt((d / h)) * (1.0 + ((-0.125 / t_0) * ((h / l) / t_0))));
	} else {
		tmp = ((d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = d / (M * D)
	tmp = 0
	if d <= -8.6e+228:
		tmp = (0.0 - d) * math.sqrt((1.0 / (l * h)))
	elif d <= 2.8e-308:
		tmp = math.sqrt((d / l)) * (math.sqrt((d / h)) * (1.0 + ((-0.125 / t_0) * ((h / l) / t_0))))
	else:
		tmp = ((d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / math.sqrt(h)) / math.sqrt(l)
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(d / Float64(M * D))
	tmp = 0.0
	if (d <= -8.6e+228)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(l * h))));
	elseif (d <= 2.8e-308)
		tmp = Float64(sqrt(Float64(d / l)) * Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(Float64(-0.125 / t_0) * Float64(Float64(h / l) / t_0)))));
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(Float64(h / t_0) / Float64(l * Float64(t_0 / -0.125))))) / sqrt(h)) / sqrt(l));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = d / (M * D);
	tmp = 0.0;
	if (d <= -8.6e+228)
		tmp = (0.0 - d) * sqrt((1.0 / (l * h)));
	elseif (d <= 2.8e-308)
		tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + ((-0.125 / t_0) * ((h / l) / t_0))));
	else
		tmp = ((d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / sqrt(h)) / sqrt(l);
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -8.6e+228], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.8e-308], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(-0.125 / t$95$0), $MachinePrecision] * N[(N[(h / l), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(N[(h / t$95$0), $MachinePrecision] / N[(l * N[(t$95$0 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{d}{M \cdot D}\\
\mathbf{if}\;d \leq -8.6 \cdot 10^{+228}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\

\mathbf{elif}\;d \leq 2.8 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{-0.125}{t\_0} \cdot \frac{\frac{h}{\ell}}{t\_0}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -8.60000000000000063e228

    1. Initial program 59.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified59.5%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right), \left(\color{blue}{-1} \cdot d\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\mathsf{neg}\left(d\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6483.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    7. Simplified83.4%

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

    if -8.60000000000000063e228 < d < 2.79999999999999984e-308

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified74.5%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr74.4%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr75.3%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\left(\left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell} \cdot \frac{-0.125}{\frac{d}{M \cdot D}}\right) \cdot \sqrt{\frac{d}{h}}\right)} \]
    8. Step-by-step derivation
      1. associate-/l/N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{h}{\ell}}{\frac{d}{M \cdot D}}\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{h}{\ell}\right), \left(\frac{d}{M \cdot D}\right)\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \left(\frac{d}{M \cdot D}\right)\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{/.f64}\left(d, \left(M \cdot D\right)\right)\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
      6. *-lowering-*.f6476.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right), \mathsf{/.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, D\right)\right)\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)\right)\right) \]
    9. Applied egg-rr76.0%

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

    if 2.79999999999999984e-308 < d

    1. Initial program 67.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified72.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6471.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr71.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr76.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -8.6 \cdot 10^{+228}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \frac{-0.125}{\frac{d}{M \cdot D}} \cdot \frac{\frac{h}{\ell}}{\frac{d}{M \cdot D}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell \cdot \frac{\frac{d}{M \cdot D}}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 79.4% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ t_1 := \frac{d}{M \cdot D}\\ \mathbf{if}\;d \leq -1.38 \cdot 10^{+228}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + h \cdot \left(-0.125 \cdot \frac{t\_0}{\frac{\ell}{t\_0}}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{t\_1}}{\ell \cdot \frac{t\_1}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ (* M D) d)) (t_1 (/ d (* M D))))
   (if (<= d -1.38e+228)
     (* (- 0.0 d) (sqrt (/ 1.0 (* l h))))
     (if (<= d 2.8e-308)
       (*
        (sqrt (/ d l))
        (* (sqrt (/ d h)) (+ 1.0 (* h (* -0.125 (/ t_0 (/ l t_0)))))))
       (/
        (/ (* d (+ 1.0 (/ (/ h t_1) (* l (/ t_1 -0.125))))) (sqrt h))
        (sqrt l))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = (M * D) / d;
	double t_1 = d / (M * D);
	double tmp;
	if (d <= -1.38e+228) {
		tmp = (0.0 - d) * sqrt((1.0 / (l * h)));
	} else if (d <= 2.8e-308) {
		tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + (h * (-0.125 * (t_0 / (l / t_0))))));
	} else {
		tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / sqrt(h)) / sqrt(l);
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    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 = (m * d_1) / d
    t_1 = d / (m * d_1)
    if (d <= (-1.38d+228)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (l * h)))
    else if (d <= 2.8d-308) then
        tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0d0 + (h * ((-0.125d0) * (t_0 / (l / t_0))))))
    else
        tmp = ((d * (1.0d0 + ((h / t_1) / (l * (t_1 / (-0.125d0)))))) / sqrt(h)) / sqrt(l)
    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) / d;
	double t_1 = d / (M * D);
	double tmp;
	if (d <= -1.38e+228) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (l * h)));
	} else if (d <= 2.8e-308) {
		tmp = Math.sqrt((d / l)) * (Math.sqrt((d / h)) * (1.0 + (h * (-0.125 * (t_0 / (l / t_0))))));
	} else {
		tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / Math.sqrt(h)) / Math.sqrt(l);
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = (M * D) / d
	t_1 = d / (M * D)
	tmp = 0
	if d <= -1.38e+228:
		tmp = (0.0 - d) * math.sqrt((1.0 / (l * h)))
	elif d <= 2.8e-308:
		tmp = math.sqrt((d / l)) * (math.sqrt((d / h)) * (1.0 + (h * (-0.125 * (t_0 / (l / t_0))))))
	else:
		tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / math.sqrt(h)) / math.sqrt(l)
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(Float64(M * D) / d)
	t_1 = Float64(d / Float64(M * D))
	tmp = 0.0
	if (d <= -1.38e+228)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(l * h))));
	elseif (d <= 2.8e-308)
		tmp = Float64(sqrt(Float64(d / l)) * Float64(sqrt(Float64(d / h)) * Float64(1.0 + Float64(h * Float64(-0.125 * Float64(t_0 / Float64(l / t_0)))))));
	else
		tmp = Float64(Float64(Float64(d * Float64(1.0 + Float64(Float64(h / t_1) / Float64(l * Float64(t_1 / -0.125))))) / sqrt(h)) / sqrt(l));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = (M * D) / d;
	t_1 = d / (M * D);
	tmp = 0.0;
	if (d <= -1.38e+228)
		tmp = (0.0 - d) * sqrt((1.0 / (l * h)));
	elseif (d <= 2.8e-308)
		tmp = sqrt((d / l)) * (sqrt((d / h)) * (1.0 + (h * (-0.125 * (t_0 / (l / t_0))))));
	else
		tmp = ((d * (1.0 + ((h / t_1) / (l * (t_1 / -0.125))))) / sqrt(h)) / sqrt(l);
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$1 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.38e+228], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.8e-308], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(h * N[(-0.125 * N[(t$95$0 / N[(l / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(d * N[(1.0 + N[(N[(h / t$95$1), $MachinePrecision] / N[(l * N[(t$95$1 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
t_1 := \frac{d}{M \cdot D}\\
\mathbf{if}\;d \leq -1.38 \cdot 10^{+228}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\

\mathbf{elif}\;d \leq 2.8 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + h \cdot \left(-0.125 \cdot \frac{t\_0}{\frac{\ell}{t\_0}}\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -1.38000000000000004e228

    1. Initial program 59.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified59.5%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right), \left(\color{blue}{-1} \cdot d\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\mathsf{neg}\left(d\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6483.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    7. Simplified83.4%

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

    if -1.38000000000000004e228 < d < 2.79999999999999984e-308

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified74.5%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{h}\right)\right)\right)\right) \]
    6. Applied egg-rr73.7%

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

    if 2.79999999999999984e-308 < d

    1. Initial program 67.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified72.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6471.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr71.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr76.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.38 \cdot 10^{+228}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{elif}\;d \leq 2.8 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + h \cdot \left(-0.125 \cdot \frac{\frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell \cdot \frac{\frac{d}{M \cdot D}}{-0.125}}\right)}{\sqrt{h}}}{\sqrt{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 48.4% accurate, 2.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\\ t_1 := M \cdot \left(M \cdot \left(D \cdot D\right)\right)\\ \mathbf{if}\;d \leq -1.35 \cdot 10^{+87}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\ \;\;\;\;t\_0 \cdot \left(-0.125 \cdot \frac{t\_1}{0 - d}\right)\\ \mathbf{elif}\;d \leq 8.5 \cdot 10^{-154}:\\ \;\;\;\;t\_0 \cdot \frac{-0.125 \cdot t\_1}{d}\\ \mathbf{elif}\;d \leq 1.65 \cdot 10^{+47}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \frac{\frac{-0.125 \cdot \left(h \cdot t\_1\right)}{\ell}}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (/ (/ h l) (* l l)))) (t_1 (* M (* M (* D D)))))
   (if (<= d -1.35e+87)
     (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
     (if (<= d -2.4e-297)
       (* t_0 (* -0.125 (/ t_1 (- 0.0 d))))
       (if (<= d 8.5e-154)
         (* t_0 (/ (* -0.125 t_1) d))
         (if (<= d 1.65e+47)
           (* (/ d (sqrt (* l h))) (/ (/ (* -0.125 (* h t_1)) l) (* d d)))
           (* d (sqrt (/ (/ 1.0 l) h)))))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt(((h / l) / (l * l)));
	double t_1 = M * (M * (D * D));
	double tmp;
	if (d <= -1.35e+87) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (d <= -2.4e-297) {
		tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)));
	} else if (d <= 8.5e-154) {
		tmp = t_0 * ((-0.125 * t_1) / d);
	} else if (d <= 1.65e+47) {
		tmp = (d / sqrt((l * h))) * (((-0.125 * (h * t_1)) / l) / (d * d));
	} else {
		tmp = d * sqrt(((1.0 / l) / h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    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(((h / l) / (l * l)))
    t_1 = m * (m * (d_1 * d_1))
    if (d <= (-1.35d+87)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (d <= (-2.4d-297)) then
        tmp = t_0 * ((-0.125d0) * (t_1 / (0.0d0 - d)))
    else if (d <= 8.5d-154) then
        tmp = t_0 * (((-0.125d0) * t_1) / d)
    else if (d <= 1.65d+47) then
        tmp = (d / sqrt((l * h))) * ((((-0.125d0) * (h * t_1)) / l) / (d * d))
    else
        tmp = d * sqrt(((1.0d0 / l) / h))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt(((h / l) / (l * l)));
	double t_1 = M * (M * (D * D));
	double tmp;
	if (d <= -1.35e+87) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (d <= -2.4e-297) {
		tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)));
	} else if (d <= 8.5e-154) {
		tmp = t_0 * ((-0.125 * t_1) / d);
	} else if (d <= 1.65e+47) {
		tmp = (d / Math.sqrt((l * h))) * (((-0.125 * (h * t_1)) / l) / (d * d));
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / h));
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = math.sqrt(((h / l) / (l * l)))
	t_1 = M * (M * (D * D))
	tmp = 0
	if d <= -1.35e+87:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif d <= -2.4e-297:
		tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)))
	elif d <= 8.5e-154:
		tmp = t_0 * ((-0.125 * t_1) / d)
	elif d <= 1.65e+47:
		tmp = (d / math.sqrt((l * h))) * (((-0.125 * (h * t_1)) / l) / (d * d))
	else:
		tmp = d * math.sqrt(((1.0 / l) / h))
	return tmp
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(Float64(h / l) / Float64(l * l)))
	t_1 = Float64(M * Float64(M * Float64(D * D)))
	tmp = 0.0
	if (d <= -1.35e+87)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (d <= -2.4e-297)
		tmp = Float64(t_0 * Float64(-0.125 * Float64(t_1 / Float64(0.0 - d))));
	elseif (d <= 8.5e-154)
		tmp = Float64(t_0 * Float64(Float64(-0.125 * t_1) / d));
	elseif (d <= 1.65e+47)
		tmp = Float64(Float64(d / sqrt(Float64(l * h))) * Float64(Float64(Float64(-0.125 * Float64(h * t_1)) / l) / Float64(d * d)));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt(((h / l) / (l * l)));
	t_1 = M * (M * (D * D));
	tmp = 0.0;
	if (d <= -1.35e+87)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (d <= -2.4e-297)
		tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)));
	elseif (d <= 8.5e-154)
		tmp = t_0 * ((-0.125 * t_1) / d);
	elseif (d <= 1.65e+47)
		tmp = (d / sqrt((l * h))) * (((-0.125 * (h * t_1)) / l) / (d * d));
	else
		tmp = d * sqrt(((1.0 / l) / h));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.35e+87], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.4e-297], N[(t$95$0 * N[(-0.125 * N[(t$95$1 / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8.5e-154], N[(t$95$0 * N[(N[(-0.125 * t$95$1), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.65e+47], N[(N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(-0.125 * N[(h * t$95$1), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\\
t_1 := M \cdot \left(M \cdot \left(D \cdot D\right)\right)\\
\mathbf{if}\;d \leq -1.35 \cdot 10^{+87}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\
\;\;\;\;t\_0 \cdot \left(-0.125 \cdot \frac{t\_1}{0 - d}\right)\\

\mathbf{elif}\;d \leq 8.5 \cdot 10^{-154}:\\
\;\;\;\;t\_0 \cdot \frac{-0.125 \cdot t\_1}{d}\\

\mathbf{elif}\;d \leq 1.65 \cdot 10^{+47}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \frac{\frac{-0.125 \cdot \left(h \cdot t\_1\right)}{\ell}}{d \cdot d}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if d < -1.35000000000000003e87

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified68.1%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f646.2%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified6.2%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(0 - d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      11. /-lowering-/.f6462.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Simplified62.6%

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

    if -1.35000000000000003e87 < d < -2.4e-297

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified75.4%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr74.1%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr76.4%

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

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

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

    if -2.4e-297 < d < 8.4999999999999996e-154

    1. Initial program 42.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified46.1%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr42.9%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Step-by-step derivation
      1. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left(\frac{h}{d}\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left(\frac{1}{\frac{d}{h}}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left({\left(\frac{d}{h}\right)}^{-1}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      4. pow-powN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(-1 \cdot \frac{1}{2}\right)}}\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{pow.f64}\left(\left(\frac{d}{h}\right), \color{blue}{\left(-1 \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \left(\color{blue}{-1} \cdot \frac{1}{2}\right)\right)\right)\right) \]
      7. metadata-eval46.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \frac{-1}{2}\right)\right)\right) \]
    8. Applied egg-rr46.3%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{{\ell}^{3}}\right)\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      5. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      6. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{h}{\ell}}{{\ell}^{2}}\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{h}{\ell}\right), \left({\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \left({\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \left(\ell \cdot \ell\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      11. *-lowering-*.f64N/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({D}^{2} \cdot {M}^{2}\right)\right), d\right)\right) \]
      15. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(\left({D}^{2} \cdot M\right) \cdot M\right)\right), d\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\left({D}^{2} \cdot M\right), M\right)\right), d\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({D}^{2}\right), M\right), M\right)\right), d\right)\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), M\right), M\right)\right), d\right)\right) \]
      20. *-lowering-*.f6453.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), M\right), M\right)\right), d\right)\right) \]
    11. Simplified53.2%

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

    if 8.4999999999999996e-154 < d < 1.65e47

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified87.6%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6487.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr87.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr88.3%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
    10. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(h \cdot \left({D}^{2} \cdot {M}^{2}\right)\right)\right), \ell\right), \left({d}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(h, \left({D}^{2} \cdot {M}^{2}\right)\right)\right), \ell\right), \left({d}^{2}\right)\right)\right) \]
      11. unpow2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(h, \left(\left({D}^{2} \cdot M\right) \cdot M\right)\right)\right), \ell\right), \left({d}^{2}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\left({D}^{2} \cdot M\right), M\right)\right)\right), \ell\right), \left({d}^{2}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({D}^{2}\right), M\right), M\right)\right)\right), \ell\right), \left({d}^{2}\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), M\right), M\right)\right)\right), \ell\right), \left({d}^{2}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), M\right), M\right)\right)\right), \ell\right), \left({d}^{2}\right)\right)\right) \]
      17. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), M\right), M\right)\right)\right), \ell\right), \left(d \cdot \color{blue}{d}\right)\right)\right) \]
      18. *-lowering-*.f6440.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), M\right), M\right)\right)\right), \ell\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    11. Simplified40.5%

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

    if 1.65e47 < d

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified72.4%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6460.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified60.8%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6462.5%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    9. Applied egg-rr62.5%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification47.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.35 \cdot 10^{+87}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{elif}\;d \leq 8.5 \cdot 10^{-154}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \frac{-0.125 \cdot \left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right)}{d}\\ \mathbf{elif}\;d \leq 1.65 \cdot 10^{+47}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \frac{\frac{-0.125 \cdot \left(h \cdot \left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right)\right)}{\ell}}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 70.9% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{M \cdot D}\\ t_1 := \frac{h}{t\_0}\\ \mathbf{if}\;d \leq -3.2 \cdot 10^{+181}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -1.8 \cdot 10^{-214}:\\ \;\;\;\;\left(1 + \frac{t\_1}{\ell} \cdot \frac{-0.125}{t\_0}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot \left(1 + \frac{t\_1}{\ell \cdot \frac{t\_0}{-0.125}}\right)}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ d (* M D))) (t_1 (/ h t_0)))
   (if (<= d -3.2e+181)
     (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
     (if (<= d -1.8e-214)
       (* (+ 1.0 (* (/ t_1 l) (/ -0.125 t_0))) (sqrt (* (/ d l) (/ d h))))
       (if (<= d -2.4e-297)
         (*
          (sqrt (/ (/ h l) (* l l)))
          (* -0.125 (/ (* M (* M (* D D))) (- 0.0 d))))
         (/ (* d (+ 1.0 (/ t_1 (* l (/ t_0 -0.125))))) (sqrt (* l h))))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = d / (M * D);
	double t_1 = h / t_0;
	double tmp;
	if (d <= -3.2e+181) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (d <= -1.8e-214) {
		tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * sqrt(((d / l) * (d / h)));
	} else if (d <= -2.4e-297) {
		tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	} else {
		tmp = (d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / sqrt((l * h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    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 / (m * d_1)
    t_1 = h / t_0
    if (d <= (-3.2d+181)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (d <= (-1.8d-214)) then
        tmp = (1.0d0 + ((t_1 / l) * ((-0.125d0) / t_0))) * sqrt(((d / l) * (d / h)))
    else if (d <= (-2.4d-297)) then
        tmp = sqrt(((h / l) / (l * l))) * ((-0.125d0) * ((m * (m * (d_1 * d_1))) / (0.0d0 - d)))
    else
        tmp = (d * (1.0d0 + (t_1 / (l * (t_0 / (-0.125d0)))))) / sqrt((l * h))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = d / (M * D);
	double t_1 = h / t_0;
	double tmp;
	if (d <= -3.2e+181) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (d <= -1.8e-214) {
		tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * Math.sqrt(((d / l) * (d / h)));
	} else if (d <= -2.4e-297) {
		tmp = Math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	} else {
		tmp = (d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / Math.sqrt((l * h));
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = d / (M * D)
	t_1 = h / t_0
	tmp = 0
	if d <= -3.2e+181:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif d <= -1.8e-214:
		tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * math.sqrt(((d / l) * (d / h)))
	elif d <= -2.4e-297:
		tmp = math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)))
	else:
		tmp = (d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / math.sqrt((l * h))
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(d / Float64(M * D))
	t_1 = Float64(h / t_0)
	tmp = 0.0
	if (d <= -3.2e+181)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (d <= -1.8e-214)
		tmp = Float64(Float64(1.0 + Float64(Float64(t_1 / l) * Float64(-0.125 / t_0))) * sqrt(Float64(Float64(d / l) * Float64(d / h))));
	elseif (d <= -2.4e-297)
		tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(-0.125 * Float64(Float64(M * Float64(M * Float64(D * D))) / Float64(0.0 - d))));
	else
		tmp = Float64(Float64(d * Float64(1.0 + Float64(t_1 / Float64(l * Float64(t_0 / -0.125))))) / sqrt(Float64(l * h)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = d / (M * D);
	t_1 = h / t_0;
	tmp = 0.0;
	if (d <= -3.2e+181)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (d <= -1.8e-214)
		tmp = (1.0 + ((t_1 / l) * (-0.125 / t_0))) * sqrt(((d / l) * (d / h)));
	elseif (d <= -2.4e-297)
		tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	else
		tmp = (d * (1.0 + (t_1 / (l * (t_0 / -0.125))))) / sqrt((l * h));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(h / t$95$0), $MachinePrecision]}, If[LessEqual[d, -3.2e+181], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -1.8e-214], N[(N[(1.0 + N[(N[(t$95$1 / l), $MachinePrecision] * N[(-0.125 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.4e-297], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d * N[(1.0 + N[(t$95$1 / N[(l * N[(t$95$0 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{d}{M \cdot D}\\
t_1 := \frac{h}{t\_0}\\
\mathbf{if}\;d \leq -3.2 \cdot 10^{+181}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;d \leq -1.8 \cdot 10^{-214}:\\
\;\;\;\;\left(1 + \frac{t\_1}{\ell} \cdot \frac{-0.125}{t\_0}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\

\mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -3.2e181

    1. Initial program 67.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified67.8%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f647.3%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified7.3%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(0 - d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      11. /-lowering-/.f6479.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Simplified79.5%

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

    if -3.2e181 < d < -1.8e-214

    1. Initial program 77.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified79.5%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr80.5%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr68.5%

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

    if -1.8e-214 < d < -2.4e-297

    1. Initial program 44.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified44.0%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr36.8%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr44.0%

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

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

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

    if -2.4e-297 < d

    1. Initial program 67.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.7%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6471.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr71.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr76.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3.2 \cdot 10^{+181}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -1.8 \cdot 10^{-214}:\\ \;\;\;\;\left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell} \cdot \frac{-0.125}{\frac{d}{M \cdot D}}\right) \cdot \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell \cdot \frac{\frac{d}{M \cdot D}}{-0.125}}\right)}{\sqrt{\ell \cdot h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 63.8% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{d}{M \cdot D}\\ \mathbf{if}\;\ell \leq -2.45 \cdot 10^{-110}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot \left(1 + \frac{\frac{h}{t\_0}}{\ell \cdot \frac{t\_0}{-0.125}}\right)}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (/ d (* M D))))
   (if (<= l -2.45e-110)
     (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
     (if (<= l -1e-309)
       (*
        (sqrt (/ (/ h l) (* l l)))
        (* -0.125 (/ (* M (* M (* D D))) (- 0.0 d))))
       (/ (* d (+ 1.0 (/ (/ h t_0) (* l (/ t_0 -0.125))))) (sqrt (* l h)))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = d / (M * D);
	double tmp;
	if (l <= -2.45e-110) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (l <= -1e-309) {
		tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	} else {
		tmp = (d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / sqrt((l * h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    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 / (m * d_1)
    if (l <= (-2.45d-110)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (l <= (-1d-309)) then
        tmp = sqrt(((h / l) / (l * l))) * ((-0.125d0) * ((m * (m * (d_1 * d_1))) / (0.0d0 - d)))
    else
        tmp = (d * (1.0d0 + ((h / t_0) / (l * (t_0 / (-0.125d0)))))) / sqrt((l * h))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = d / (M * D);
	double tmp;
	if (l <= -2.45e-110) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (l <= -1e-309) {
		tmp = Math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	} else {
		tmp = (d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / Math.sqrt((l * h));
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = d / (M * D)
	tmp = 0
	if l <= -2.45e-110:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif l <= -1e-309:
		tmp = math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)))
	else:
		tmp = (d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / math.sqrt((l * h))
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(d / Float64(M * D))
	tmp = 0.0
	if (l <= -2.45e-110)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (l <= -1e-309)
		tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(-0.125 * Float64(Float64(M * Float64(M * Float64(D * D))) / Float64(0.0 - d))));
	else
		tmp = Float64(Float64(d * Float64(1.0 + Float64(Float64(h / t_0) / Float64(l * Float64(t_0 / -0.125))))) / sqrt(Float64(l * h)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = d / (M * D);
	tmp = 0.0;
	if (l <= -2.45e-110)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (l <= -1e-309)
		tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	else
		tmp = (d * (1.0 + ((h / t_0) / (l * (t_0 / -0.125))))) / sqrt((l * h));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2.45e-110], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d * N[(1.0 + N[(N[(h / t$95$0), $MachinePrecision] / N[(l * N[(t$95$0 / -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{d}{M \cdot D}\\
\mathbf{if}\;\ell \leq -2.45 \cdot 10^{-110}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -2.4499999999999999e-110

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified74.2%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f647.0%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified7.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(0 - d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      11. /-lowering-/.f6446.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Simplified46.4%

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

    if -2.4499999999999999e-110 < l < -1.000000000000002e-309

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified70.9%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr68.8%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr72.8%

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

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

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

    if -1.000000000000002e-309 < l

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6471.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr71.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr76.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.45 \cdot 10^{-110}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d \cdot \left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell \cdot \frac{\frac{d}{M \cdot D}}{-0.125}}\right)}{\sqrt{\ell \cdot h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 62.5% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -1.4 \cdot 10^{-109}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \left(1 + \frac{\frac{h \cdot \frac{-0.125}{\frac{d}{M \cdot D}}}{\frac{\ell}{M \cdot D}}}{d}\right)\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= l -1.4e-109)
   (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
   (if (<= l -1e-309)
     (*
      (sqrt (/ (/ h l) (* l l)))
      (* -0.125 (/ (* M (* M (* D D))) (- 0.0 d))))
     (*
      (/ d (sqrt (* l h)))
      (+ 1.0 (/ (/ (* h (/ -0.125 (/ d (* M D)))) (/ l (* M D))) d))))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -1.4e-109) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (l <= -1e-309) {
		tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	} else {
		tmp = (d / sqrt((l * h))) * (1.0 + (((h * (-0.125 / (d / (M * D)))) / (l / (M * D))) / d));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (l <= (-1.4d-109)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (l <= (-1d-309)) then
        tmp = sqrt(((h / l) / (l * l))) * ((-0.125d0) * ((m * (m * (d_1 * d_1))) / (0.0d0 - d)))
    else
        tmp = (d / sqrt((l * h))) * (1.0d0 + (((h * ((-0.125d0) / (d / (m * d_1)))) / (l / (m * d_1))) / d))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -1.4e-109) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (l <= -1e-309) {
		tmp = Math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	} else {
		tmp = (d / Math.sqrt((l * h))) * (1.0 + (((h * (-0.125 / (d / (M * D)))) / (l / (M * D))) / d));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if l <= -1.4e-109:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif l <= -1e-309:
		tmp = math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)))
	else:
		tmp = (d / math.sqrt((l * h))) * (1.0 + (((h * (-0.125 / (d / (M * D)))) / (l / (M * D))) / d))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (l <= -1.4e-109)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (l <= -1e-309)
		tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(-0.125 * Float64(Float64(M * Float64(M * Float64(D * D))) / Float64(0.0 - d))));
	else
		tmp = Float64(Float64(d / sqrt(Float64(l * h))) * Float64(1.0 + Float64(Float64(Float64(h * Float64(-0.125 / Float64(d / Float64(M * D)))) / Float64(l / Float64(M * D))) / d)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (l <= -1.4e-109)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (l <= -1e-309)
		tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	else
		tmp = (d / sqrt((l * h))) * (1.0 + (((h * (-0.125 / (d / (M * D)))) / (l / (M * D))) / d));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.4e-109], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(h * N[(-0.125 / N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.4 \cdot 10^{-109}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \left(1 + \frac{\frac{h \cdot \frac{-0.125}{\frac{d}{M \cdot D}}}{\frac{\ell}{M \cdot D}}}{d}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -1.39999999999999989e-109

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified74.2%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f647.0%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified7.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(0 - d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      11. /-lowering-/.f6446.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Simplified46.4%

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

    if -1.39999999999999989e-109 < l < -1.000000000000002e-309

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified70.9%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr68.8%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr72.8%

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

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

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

    if -1.000000000000002e-309 < l

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6471.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr71.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr76.4%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 + \frac{\frac{M \cdot D}{d} \cdot \left(h \cdot 0.25\right)}{\frac{\ell}{M \cdot D} \cdot \left(d \cdot -2\right)}\right)} \]
    9. Step-by-step derivation
      1. associate-*r*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\left(h \cdot \frac{1}{\frac{d}{M \cdot D}}\right) \cdot \frac{1}{4}}{\frac{\ell}{M \cdot D} \cdot \left(d \cdot -2\right)}\right)\right)\right) \]
      4. div-invN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{h}{\frac{d}{M \cdot D}} \cdot \frac{1}{4}}{\frac{\ell}{\frac{M \cdot D}{d}} \cdot -2}\right)\right)\right) \]
      7. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{h}{\frac{d}{M \cdot D}}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot \frac{-1}{8}\right)\right)\right) \]
      9. associate-*l/N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{\frac{h}{\frac{d}{M \cdot D}} \cdot \frac{-1}{8}}{\frac{\ell}{M \cdot D}}}{\color{blue}{d}}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\frac{h}{\frac{d}{M \cdot D}} \cdot \frac{-1}{8}}{\frac{\ell}{M \cdot D}}\right), \color{blue}{d}\right)\right)\right) \]
    10. Applied egg-rr75.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.4 \cdot 10^{-109}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \left(1 + \frac{\frac{h \cdot \frac{-0.125}{\frac{d}{M \cdot D}}}{\frac{\ell}{M \cdot D}}}{d}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 60.9% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -6.8 \cdot 10^{-110}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \left(1 + \frac{M \cdot D}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot \left(-0.125 \cdot \frac{h}{d}\right)\right)\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= l -6.8e-110)
   (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
   (if (<= l -1e-309)
     (*
      (sqrt (/ (/ h l) (* l l)))
      (* -0.125 (/ (* M (* M (* D D))) (- 0.0 d))))
     (*
      (/ d (sqrt (* l h)))
      (+ 1.0 (* (/ (* M D) (/ l (/ (* M D) d))) (* -0.125 (/ h d))))))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -6.8e-110) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (l <= -1e-309) {
		tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	} else {
		tmp = (d / sqrt((l * h))) * (1.0 + (((M * D) / (l / ((M * D) / d))) * (-0.125 * (h / d))));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (l <= (-6.8d-110)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (l <= (-1d-309)) then
        tmp = sqrt(((h / l) / (l * l))) * ((-0.125d0) * ((m * (m * (d_1 * d_1))) / (0.0d0 - d)))
    else
        tmp = (d / sqrt((l * h))) * (1.0d0 + (((m * d_1) / (l / ((m * d_1) / d))) * ((-0.125d0) * (h / d))))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -6.8e-110) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (l <= -1e-309) {
		tmp = Math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	} else {
		tmp = (d / Math.sqrt((l * h))) * (1.0 + (((M * D) / (l / ((M * D) / d))) * (-0.125 * (h / d))));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if l <= -6.8e-110:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif l <= -1e-309:
		tmp = math.sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)))
	else:
		tmp = (d / math.sqrt((l * h))) * (1.0 + (((M * D) / (l / ((M * D) / d))) * (-0.125 * (h / d))))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (l <= -6.8e-110)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (l <= -1e-309)
		tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(-0.125 * Float64(Float64(M * Float64(M * Float64(D * D))) / Float64(0.0 - d))));
	else
		tmp = Float64(Float64(d / sqrt(Float64(l * h))) * Float64(1.0 + Float64(Float64(Float64(M * D) / Float64(l / Float64(Float64(M * D) / d))) * Float64(-0.125 * Float64(h / d)))));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (l <= -6.8e-110)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (l <= -1e-309)
		tmp = sqrt(((h / l) / (l * l))) * (-0.125 * ((M * (M * (D * D))) / (0.0 - d)));
	else
		tmp = (d / sqrt((l * h))) * (1.0 + (((M * D) / (l / ((M * D) / d))) * (-0.125 * (h / d))));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -6.8e-110], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(N[(M * D), $MachinePrecision] / N[(l / N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.125 * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -6.8 \cdot 10^{-110}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \left(1 + \frac{M \cdot D}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot \left(-0.125 \cdot \frac{h}{d}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -6.8000000000000002e-110

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified74.2%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f647.0%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified7.0%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(0 - d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      11. /-lowering-/.f6446.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Simplified46.4%

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

    if -6.8000000000000002e-110 < l < -1.000000000000002e-309

    1. Initial program 70.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified70.9%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr68.8%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr72.8%

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

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

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

    if -1.000000000000002e-309 < l

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      3. sqr-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)}^{2}\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right)}, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      7. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{4}}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \color{blue}{h}\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(\frac{d}{\ell}\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\color{blue}{\mathsf{/.f64}\left(d, h\right)}\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f6471.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \frac{1}{4}\right), 2\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{d}, h\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), \frac{1}{4}\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), -2\right), \ell\right)\right)\right)\right)\right) \]
    6. Applied egg-rr71.4%

      \[\leadsto \color{blue}{{\left({\left(\frac{d}{\ell}\right)}^{0.25}\right)}^{2}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right) \]
    7. Step-by-step derivation
      1. pow-powN/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{4} \cdot 2\right)} \cdot \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\frac{1}{2}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right) \]
      3. pow1/2N/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \left(\color{blue}{\sqrt{\frac{d}{h}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)} \]
      5. sqrt-divN/A

        \[\leadsto \left(\frac{\sqrt{d}}{\sqrt{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      6. pow1/2N/A

        \[\leadsto \left(\frac{\sqrt{d}}{{\ell}^{\frac{1}{2}}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      7. sqrt-divN/A

        \[\leadsto \left(\frac{\sqrt{d}}{{\ell}^{\frac{1}{2}}} \cdot \frac{\sqrt{d}}{\sqrt{h}}\right) \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      8. frac-timesN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{{\ell}^{\frac{1}{2}} \cdot \sqrt{h}} \cdot \left(\color{blue}{1} + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      9. rem-square-sqrtN/A

        \[\leadsto \frac{d}{{\ell}^{\frac{1}{2}} \cdot \sqrt{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      10. *-commutativeN/A

        \[\leadsto \frac{d}{\sqrt{h} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      11. pow1/2N/A

        \[\leadsto \frac{d}{{h}^{\frac{1}{2}} \cdot {\ell}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      12. pow-prod-downN/A

        \[\leadsto \frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{d}{{\left(h \cdot \ell\right)}^{\frac{1}{2}}}\right), \color{blue}{\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)}\right) \]
    8. Applied egg-rr76.4%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 + \frac{\frac{M \cdot D}{d} \cdot \left(h \cdot 0.25\right)}{\frac{\ell}{M \cdot D} \cdot \left(d \cdot -2\right)}\right)} \]
    9. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \left(\frac{\frac{M \cdot D}{d}}{\frac{\ell}{M \cdot D}} \cdot \color{blue}{\frac{h \cdot \frac{1}{4}}{d \cdot -2}}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{M \cdot D}{d}}{\frac{\ell}{M \cdot D}}\right), \color{blue}{\left(\frac{h \cdot \frac{1}{4}}{d \cdot -2}\right)}\right)\right)\right) \]
      3. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{\frac{\ell}{M \cdot D} \cdot d}\right), \left(\frac{\color{blue}{h \cdot \frac{1}{4}}}{d \cdot -2}\right)\right)\right)\right) \]
      4. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M \cdot D}{\frac{\ell}{\frac{M \cdot D}{d}}}\right), \left(\frac{h \cdot \color{blue}{\frac{1}{4}}}{d \cdot -2}\right)\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), \left(\frac{\ell}{\frac{M \cdot D}{d}}\right)\right), \left(\frac{\color{blue}{h \cdot \frac{1}{4}}}{d \cdot -2}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \left(\frac{\ell}{\frac{M \cdot D}{d}}\right)\right), \left(\frac{\color{blue}{h} \cdot \frac{1}{4}}{d \cdot -2}\right)\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{/.f64}\left(\ell, \left(\frac{M \cdot D}{d}\right)\right)\right), \left(\frac{h \cdot \color{blue}{\frac{1}{4}}}{d \cdot -2}\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right)\right), \left(\frac{h \cdot \frac{1}{4}}{d \cdot -2}\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \left(\frac{h \cdot \frac{1}{4}}{d \cdot -2}\right)\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \left(\frac{\frac{1}{4} \cdot h}{\color{blue}{d} \cdot -2}\right)\right)\right)\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \left(\frac{\frac{1}{4} \cdot h}{-2 \cdot \color{blue}{d}}\right)\right)\right)\right) \]
      12. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \left(\frac{\frac{1}{4}}{-2} \cdot \color{blue}{\frac{h}{d}}\right)\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{\color{blue}{h}}{d}\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \mathsf{*.f64}\left(\frac{-1}{8}, \color{blue}{\left(\frac{h}{d}\right)}\right)\right)\right)\right) \]
      15. /-lowering-/.f6472.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{/.f64}\left(h, \color{blue}{d}\right)\right)\right)\right)\right) \]
    10. Applied egg-rr72.6%

      \[\leadsto \frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 + \color{blue}{\frac{M \cdot D}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot \left(-0.125 \cdot \frac{h}{d}\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -6.8 \cdot 10^{-110}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \left(1 + \frac{M \cdot D}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot \left(-0.125 \cdot \frac{h}{d}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 48.2% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\\ t_1 := M \cdot \left(M \cdot \left(D \cdot D\right)\right)\\ \mathbf{if}\;d \leq -3.4 \cdot 10^{+87}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\ \;\;\;\;t\_0 \cdot \left(-0.125 \cdot \frac{t\_1}{0 - d}\right)\\ \mathbf{elif}\;d \leq 6.2 \cdot 10^{+21}:\\ \;\;\;\;t\_0 \cdot \frac{-0.125 \cdot t\_1}{d}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (/ (/ h l) (* l l)))) (t_1 (* M (* M (* D D)))))
   (if (<= d -3.4e+87)
     (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
     (if (<= d -2.4e-297)
       (* t_0 (* -0.125 (/ t_1 (- 0.0 d))))
       (if (<= d 6.2e+21)
         (* t_0 (/ (* -0.125 t_1) d))
         (* d (sqrt (/ (/ 1.0 l) h))))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt(((h / l) / (l * l)));
	double t_1 = M * (M * (D * D));
	double tmp;
	if (d <= -3.4e+87) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (d <= -2.4e-297) {
		tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)));
	} else if (d <= 6.2e+21) {
		tmp = t_0 * ((-0.125 * t_1) / d);
	} else {
		tmp = d * sqrt(((1.0 / l) / h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    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(((h / l) / (l * l)))
    t_1 = m * (m * (d_1 * d_1))
    if (d <= (-3.4d+87)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (d <= (-2.4d-297)) then
        tmp = t_0 * ((-0.125d0) * (t_1 / (0.0d0 - d)))
    else if (d <= 6.2d+21) then
        tmp = t_0 * (((-0.125d0) * t_1) / d)
    else
        tmp = d * sqrt(((1.0d0 / l) / h))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = Math.sqrt(((h / l) / (l * l)));
	double t_1 = M * (M * (D * D));
	double tmp;
	if (d <= -3.4e+87) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (d <= -2.4e-297) {
		tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)));
	} else if (d <= 6.2e+21) {
		tmp = t_0 * ((-0.125 * t_1) / d);
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / h));
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = math.sqrt(((h / l) / (l * l)))
	t_1 = M * (M * (D * D))
	tmp = 0
	if d <= -3.4e+87:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif d <= -2.4e-297:
		tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)))
	elif d <= 6.2e+21:
		tmp = t_0 * ((-0.125 * t_1) / d)
	else:
		tmp = d * math.sqrt(((1.0 / l) / h))
	return tmp
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(Float64(h / l) / Float64(l * l)))
	t_1 = Float64(M * Float64(M * Float64(D * D)))
	tmp = 0.0
	if (d <= -3.4e+87)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (d <= -2.4e-297)
		tmp = Float64(t_0 * Float64(-0.125 * Float64(t_1 / Float64(0.0 - d))));
	elseif (d <= 6.2e+21)
		tmp = Float64(t_0 * Float64(Float64(-0.125 * t_1) / d));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt(((h / l) / (l * l)));
	t_1 = M * (M * (D * D));
	tmp = 0.0;
	if (d <= -3.4e+87)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (d <= -2.4e-297)
		tmp = t_0 * (-0.125 * (t_1 / (0.0 - d)));
	elseif (d <= 6.2e+21)
		tmp = t_0 * ((-0.125 * t_1) / d);
	else
		tmp = d * sqrt(((1.0 / l) / h));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -3.4e+87], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2.4e-297], N[(t$95$0 * N[(-0.125 * N[(t$95$1 / N[(0.0 - d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 6.2e+21], N[(t$95$0 * N[(N[(-0.125 * t$95$1), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}}\\
t_1 := M \cdot \left(M \cdot \left(D \cdot D\right)\right)\\
\mathbf{if}\;d \leq -3.4 \cdot 10^{+87}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\
\;\;\;\;t\_0 \cdot \left(-0.125 \cdot \frac{t\_1}{0 - d}\right)\\

\mathbf{elif}\;d \leq 6.2 \cdot 10^{+21}:\\
\;\;\;\;t\_0 \cdot \frac{-0.125 \cdot t\_1}{d}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < -3.4000000000000002e87

    1. Initial program 67.6%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified68.1%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f646.2%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified6.2%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left({\left(\sqrt{-1}\right)}^{2} \cdot d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. unpow2N/A

        \[\leadsto \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      3. rem-square-sqrtN/A

        \[\leadsto \left(-1 \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot d\right), \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      6. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\left(0 - d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      11. /-lowering-/.f6462.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Simplified62.6%

      \[\leadsto \color{blue}{\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]

    if -3.4000000000000002e87 < d < -2.4e-297

    1. Initial program 72.9%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \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. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified75.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{h}{d}}}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\frac{1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}}{\color{blue}{\sqrt{\frac{h}{d}}}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr74.1%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Applied egg-rr76.4%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\left(\left(1 + \frac{\frac{h}{\frac{d}{M \cdot D}}}{\ell} \cdot \frac{-0.125}{\frac{d}{M \cdot D}}\right) \cdot \sqrt{\frac{d}{h}}\right)} \]
    8. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot {\left(\sqrt{-1}\right)}^{2}\right)}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    9. Simplified31.1%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{0 - \left(\left(D \cdot D\right) \cdot M\right) \cdot M}{d}\right)} \]

    if -2.4e-297 < d < 6.2e21

    1. Initial program 59.3%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified67.1%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{h}{d}}}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\frac{1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}}{\color{blue}{\sqrt{\frac{h}{d}}}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr65.6%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Step-by-step derivation
      1. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left(\frac{h}{d}\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left(\frac{1}{\frac{d}{h}}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left({\left(\frac{d}{h}\right)}^{-1}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      4. pow-powN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(-1 \cdot \frac{1}{2}\right)}}\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{pow.f64}\left(\left(\frac{d}{h}\right), \color{blue}{\left(-1 \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \left(\color{blue}{-1} \cdot \frac{1}{2}\right)\right)\right)\right) \]
      7. metadata-eval67.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \frac{-1}{2}\right)\right)\right) \]
    8. Applied egg-rr67.2%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\color{blue}{{\left(\frac{d}{h}\right)}^{-0.5}}} \]
    9. Taylor expanded in d around 0

      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    10. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{{\ell}^{3}}\right)\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      5. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{\ell \cdot {\ell}^{2}}\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      7. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{h}{\ell}}{{\ell}^{2}}\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{h}{\ell}\right), \left({\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \left({\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \left(\ell \cdot \ell\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      12. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{\color{blue}{d}}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({D}^{2} \cdot {M}^{2}\right)\right), \color{blue}{d}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({D}^{2} \cdot {M}^{2}\right)\right), d\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({D}^{2} \cdot \left(M \cdot M\right)\right)\right), d\right)\right) \]
      16. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(\left({D}^{2} \cdot M\right) \cdot M\right)\right), d\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\left({D}^{2} \cdot M\right), M\right)\right), d\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({D}^{2}\right), M\right), M\right)\right), d\right)\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), M\right), M\right)\right), d\right)\right) \]
      20. *-lowering-*.f6442.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), M\right), M\right)\right), d\right)\right) \]
    11. Simplified42.3%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \frac{-0.125 \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)}{d}} \]

    if 6.2e21 < d

    1. Initial program 74.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified75.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6456.1%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified56.1%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{\ell \cdot h}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{h}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6457.5%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    9. Applied egg-rr57.5%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification46.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -3.4 \cdot 10^{+87}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -2.4 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{0 - d}\right)\\ \mathbf{elif}\;d \leq 6.2 \cdot 10^{+21}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \frac{-0.125 \cdot \left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right)}{d}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 47.1% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -1.18 \cdot 10^{-200}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right)}^{0.25}}\\ \mathbf{elif}\;\ell \leq 2.2 \cdot 10^{-73}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \frac{-0.125 \cdot \left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right)}{d}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= l -1.18e-200)
   (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
   (if (<= l -1e-309)
     (/ d (pow (* h (* h (* l l))) 0.25))
     (if (<= l 2.2e-73)
       (* (sqrt (/ (/ h l) (* l l))) (/ (* -0.125 (* M (* M (* D D)))) d))
       (* d (sqrt (/ (/ 1.0 l) h)))))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -1.18e-200) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (l <= -1e-309) {
		tmp = d / pow((h * (h * (l * l))), 0.25);
	} else if (l <= 2.2e-73) {
		tmp = sqrt(((h / l) / (l * l))) * ((-0.125 * (M * (M * (D * D)))) / d);
	} else {
		tmp = d * sqrt(((1.0 / l) / h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (l <= (-1.18d-200)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (l <= (-1d-309)) then
        tmp = d / ((h * (h * (l * l))) ** 0.25d0)
    else if (l <= 2.2d-73) then
        tmp = sqrt(((h / l) / (l * l))) * (((-0.125d0) * (m * (m * (d_1 * d_1)))) / d)
    else
        tmp = d * sqrt(((1.0d0 / l) / h))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -1.18e-200) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (l <= -1e-309) {
		tmp = d / Math.pow((h * (h * (l * l))), 0.25);
	} else if (l <= 2.2e-73) {
		tmp = Math.sqrt(((h / l) / (l * l))) * ((-0.125 * (M * (M * (D * D)))) / d);
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / h));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if l <= -1.18e-200:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif l <= -1e-309:
		tmp = d / math.pow((h * (h * (l * l))), 0.25)
	elif l <= 2.2e-73:
		tmp = math.sqrt(((h / l) / (l * l))) * ((-0.125 * (M * (M * (D * D)))) / d)
	else:
		tmp = d * math.sqrt(((1.0 / l) / h))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (l <= -1.18e-200)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (l <= -1e-309)
		tmp = Float64(d / (Float64(h * Float64(h * Float64(l * l))) ^ 0.25));
	elseif (l <= 2.2e-73)
		tmp = Float64(sqrt(Float64(Float64(h / l) / Float64(l * l))) * Float64(Float64(-0.125 * Float64(M * Float64(M * Float64(D * D)))) / d));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (l <= -1.18e-200)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (l <= -1e-309)
		tmp = d / ((h * (h * (l * l))) ^ 0.25);
	elseif (l <= 2.2e-73)
		tmp = sqrt(((h / l) / (l * l))) * ((-0.125 * (M * (M * (D * D)))) / d);
	else
		tmp = d * sqrt(((1.0 / l) / h));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.18e-200], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-309], N[(d / N[Power[N[(h * N[(h * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.2e-73], N[(N[Sqrt[N[(N[(h / l), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(-0.125 * N[(M * N[(M * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.18 \cdot 10^{-200}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{d}{{\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right)}^{0.25}}\\

\mathbf{elif}\;\ell \leq 2.2 \cdot 10^{-73}:\\
\;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \frac{-0.125 \cdot \left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right)}{d}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < -1.17999999999999996e-200

    1. Initial program 71.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified72.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f646.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified6.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left({\left(\sqrt{-1}\right)}^{2} \cdot d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. unpow2N/A

        \[\leadsto \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      3. rem-square-sqrtN/A

        \[\leadsto \left(-1 \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot d\right), \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      6. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\left(0 - d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      11. /-lowering-/.f6441.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Simplified41.7%

      \[\leadsto \color{blue}{\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]

    if -1.17999999999999996e-200 < l < -1.000000000000002e-309

    1. Initial program 72.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified73.4%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6428.2%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified28.2%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \color{blue}{\left(\sqrt{h \cdot \ell}\right)}\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\left(h \cdot \ell\right)\right)\right) \]
      6. *-lowering-*.f6428.2%

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right) \]
    9. Applied egg-rr28.2%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
    10. Step-by-step derivation
      1. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(d, \left({\left(h \cdot \ell\right)}^{\color{blue}{\frac{1}{2}}}\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(d, \left({\left(h \cdot \ell\right)}^{\left(2 \cdot \color{blue}{\frac{1}{4}}\right)}\right)\right) \]
      3. pow-powN/A

        \[\leadsto \mathsf{/.f64}\left(d, \left({\left({\left(h \cdot \ell\right)}^{2}\right)}^{\color{blue}{\frac{1}{4}}}\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(d, \left({\left(\left(h \cdot \ell\right) \cdot \left(h \cdot \ell\right)\right)}^{\frac{1}{4}}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\left(\left(h \cdot \ell\right) \cdot \left(h \cdot \ell\right)\right), \color{blue}{\frac{1}{4}}\right)\right) \]
      6. swap-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\left(\left(h \cdot h\right) \cdot \left(\ell \cdot \ell\right)\right), \frac{1}{4}\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right), \frac{1}{4}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \left(h \cdot \left(\ell \cdot \ell\right)\right)\right), \frac{1}{4}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(h, \left(\ell \cdot \ell\right)\right)\right), \frac{1}{4}\right)\right) \]
      10. *-lowering-*.f6456.5%

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \frac{1}{4}\right)\right) \]
    11. Applied egg-rr56.5%

      \[\leadsto \frac{d}{\color{blue}{{\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right)}^{0.25}}} \]

    if -1.000000000000002e-309 < l < 2.2e-73

    1. Initial program 67.6%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified73.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \color{blue}{\sqrt{\frac{d}{h}}}\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \sqrt{\frac{1}{\frac{h}{d}}}\right)\right) \]
      3. sqrt-divN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{\frac{h}{d}}}}\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right) \cdot \frac{1}{\sqrt{\color{blue}{\frac{h}{d}}}}\right)\right) \]
      5. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left(\frac{1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}}{\color{blue}{\sqrt{\frac{h}{d}}}}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot \frac{1}{4}\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right), \color{blue}{\left(\sqrt{\frac{h}{d}}\right)}\right)\right) \]
    6. Applied egg-rr71.9%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \color{blue}{\frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\sqrt{\frac{h}{d}}}} \]
    7. Step-by-step derivation
      1. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left(\frac{h}{d}\right)}^{\color{blue}{\frac{1}{2}}}\right)\right)\right) \]
      2. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left(\frac{1}{\frac{d}{h}}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      3. inv-powN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left({\left(\frac{d}{h}\right)}^{-1}\right)}^{\frac{1}{2}}\right)\right)\right) \]
      4. pow-powN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(-1 \cdot \frac{1}{2}\right)}}\right)\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{pow.f64}\left(\left(\frac{d}{h}\right), \color{blue}{\left(-1 \cdot \frac{1}{2}\right)}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \left(\color{blue}{-1} \cdot \frac{1}{2}\right)\right)\right)\right) \]
      7. metadata-eval73.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right), \frac{-1}{8}\right)\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(d, h\right), \frac{-1}{2}\right)\right)\right) \]
    8. Applied egg-rr73.9%

      \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \frac{1 + \frac{h \cdot \frac{M \cdot D}{d}}{\frac{\ell}{\frac{M \cdot D}{d}}} \cdot -0.125}{\color{blue}{{\left(\frac{d}{h}\right)}^{-0.5}}} \]
    9. Taylor expanded in d around 0

      \[\leadsto \color{blue}{\frac{-1}{8} \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    10. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right) \cdot \color{blue}{\sqrt{\frac{h}{{\ell}^{3}}}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{\frac{h}{{\ell}^{3}}} \cdot \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{h}{{\ell}^{3}}}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)}\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{{\ell}^{3}}\right)\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      5. cube-multN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{\ell \cdot \left(\ell \cdot \ell\right)}\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{h}{\ell \cdot {\ell}^{2}}\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      7. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{\frac{h}{\ell}}{{\ell}^{2}}\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{h}{\ell}\right), \left({\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \left({\ell}^{2}\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \left(\ell \cdot \ell\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot {M}^{2}}{d}\right)\right) \]
      12. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot {M}^{2}\right)}{\color{blue}{d}}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({D}^{2} \cdot {M}^{2}\right)\right), \color{blue}{d}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({D}^{2} \cdot {M}^{2}\right)\right), d\right)\right) \]
      15. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({D}^{2} \cdot \left(M \cdot M\right)\right)\right), d\right)\right) \]
      16. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(\left({D}^{2} \cdot M\right) \cdot M\right)\right), d\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\left({D}^{2} \cdot M\right), M\right)\right), d\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({D}^{2}\right), M\right), M\right)\right), d\right)\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), M\right), M\right)\right), d\right)\right) \]
      20. *-lowering-*.f6445.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), M\right), M\right)\right), d\right)\right) \]
    11. Simplified45.9%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \frac{-0.125 \cdot \left(\left(\left(D \cdot D\right) \cdot M\right) \cdot M\right)}{d}} \]

    if 2.2e-73 < l

    1. Initial program 66.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified70.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6447.7%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified47.7%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{\ell \cdot h}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{h}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6448.9%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    9. Applied egg-rr48.9%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification46.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.18 \cdot 10^{-200}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right)}^{0.25}}\\ \mathbf{elif}\;\ell \leq 2.2 \cdot 10^{-73}:\\ \;\;\;\;\sqrt{\frac{\frac{h}{\ell}}{\ell \cdot \ell}} \cdot \frac{-0.125 \cdot \left(M \cdot \left(M \cdot \left(D \cdot D\right)\right)\right)}{d}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 44.5% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -1.45 \cdot 10^{-200}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq -5.5 \cdot 10^{-306}:\\ \;\;\;\;\frac{d}{{\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right)}^{0.25}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= l -1.45e-200)
   (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
   (if (<= l -5.5e-306)
     (/ d (pow (* h (* h (* l l))) 0.25))
     (* d (sqrt (/ (/ 1.0 l) h))))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -1.45e-200) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else if (l <= -5.5e-306) {
		tmp = d / pow((h * (h * (l * l))), 0.25);
	} else {
		tmp = d * sqrt(((1.0 / l) / h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (l <= (-1.45d-200)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else if (l <= (-5.5d-306)) then
        tmp = d / ((h * (h * (l * l))) ** 0.25d0)
    else
        tmp = d * sqrt(((1.0d0 / l) / h))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -1.45e-200) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else if (l <= -5.5e-306) {
		tmp = d / Math.pow((h * (h * (l * l))), 0.25);
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / h));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if l <= -1.45e-200:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	elif l <= -5.5e-306:
		tmp = d / math.pow((h * (h * (l * l))), 0.25)
	else:
		tmp = d * math.sqrt(((1.0 / l) / h))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (l <= -1.45e-200)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	elseif (l <= -5.5e-306)
		tmp = Float64(d / (Float64(h * Float64(h * Float64(l * l))) ^ 0.25));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (l <= -1.45e-200)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	elseif (l <= -5.5e-306)
		tmp = d / ((h * (h * (l * l))) ^ 0.25);
	else
		tmp = d * sqrt(((1.0 / l) / h));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.45e-200], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -5.5e-306], N[(d / N[Power[N[(h * N[(h * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.45 \cdot 10^{-200}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{elif}\;\ell \leq -5.5 \cdot 10^{-306}:\\
\;\;\;\;\frac{d}{{\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right)}^{0.25}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -1.45e-200

    1. Initial program 71.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified72.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f646.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified6.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left({\left(\sqrt{-1}\right)}^{2} \cdot d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. unpow2N/A

        \[\leadsto \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      3. rem-square-sqrtN/A

        \[\leadsto \left(-1 \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot d\right), \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      6. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\left(0 - d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      11. /-lowering-/.f6441.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Simplified41.7%

      \[\leadsto \color{blue}{\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]

    if -1.45e-200 < l < -5.49999999999999992e-306

    1. Initial program 70.9%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \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. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified72.2%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6425.1%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified25.1%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \color{blue}{\left(\sqrt{h \cdot \ell}\right)}\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\left(h \cdot \ell\right)\right)\right) \]
      6. *-lowering-*.f6425.1%

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right) \]
    9. Applied egg-rr25.1%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
    10. Step-by-step derivation
      1. pow1/2N/A

        \[\leadsto \mathsf{/.f64}\left(d, \left({\left(h \cdot \ell\right)}^{\color{blue}{\frac{1}{2}}}\right)\right) \]
      2. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(d, \left({\left(h \cdot \ell\right)}^{\left(2 \cdot \color{blue}{\frac{1}{4}}\right)}\right)\right) \]
      3. pow-powN/A

        \[\leadsto \mathsf{/.f64}\left(d, \left({\left({\left(h \cdot \ell\right)}^{2}\right)}^{\color{blue}{\frac{1}{4}}}\right)\right) \]
      4. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(d, \left({\left(\left(h \cdot \ell\right) \cdot \left(h \cdot \ell\right)\right)}^{\frac{1}{4}}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\left(\left(h \cdot \ell\right) \cdot \left(h \cdot \ell\right)\right), \color{blue}{\frac{1}{4}}\right)\right) \]
      6. swap-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\left(\left(h \cdot h\right) \cdot \left(\ell \cdot \ell\right)\right), \frac{1}{4}\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right), \frac{1}{4}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \left(h \cdot \left(\ell \cdot \ell\right)\right)\right), \frac{1}{4}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(h, \left(\ell \cdot \ell\right)\right)\right), \frac{1}{4}\right)\right) \]
      10. *-lowering-*.f6454.6%

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{pow.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \frac{1}{4}\right)\right) \]
    11. Applied egg-rr54.6%

      \[\leadsto \frac{d}{\color{blue}{{\left(h \cdot \left(h \cdot \left(\ell \cdot \ell\right)\right)\right)}^{0.25}}} \]

    if -5.49999999999999992e-306 < l

    1. Initial program 67.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) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.7%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6439.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified39.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{\ell \cdot h}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{h}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6440.5%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    9. Applied egg-rr40.5%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 15: 41.8% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -8.8 \cdot 10^{-203}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= l -8.8e-203)
   (* (- 0.0 d) (sqrt (/ (/ 1.0 h) l)))
   (* d (sqrt (/ (/ 1.0 l) h)))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -8.8e-203) {
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	} else {
		tmp = d * sqrt(((1.0 / l) / h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (l <= (-8.8d-203)) then
        tmp = (0.0d0 - d) * sqrt(((1.0d0 / h) / l))
    else
        tmp = d * sqrt(((1.0d0 / l) / h))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -8.8e-203) {
		tmp = (0.0 - d) * Math.sqrt(((1.0 / h) / l));
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / h));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if l <= -8.8e-203:
		tmp = (0.0 - d) * math.sqrt(((1.0 / h) / l))
	else:
		tmp = d * math.sqrt(((1.0 / l) / h))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (l <= -8.8e-203)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(Float64(1.0 / h) / l)));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (l <= -8.8e-203)
		tmp = (0.0 - d) * sqrt(((1.0 / h) / l));
	else
		tmp = d * sqrt(((1.0 / l) / h));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -8.8e-203], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -8.8 \cdot 10^{-203}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -8.7999999999999999e-203

    1. Initial program 71.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified72.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f646.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified6.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Taylor expanded in h around -inf

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left({\left(\sqrt{-1}\right)}^{2} \cdot d\right) \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      2. unpow2N/A

        \[\leadsto \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      3. rem-square-sqrtN/A

        \[\leadsto \left(-1 \cdot d\right) \cdot \sqrt{\frac{\color{blue}{1}}{h \cdot \ell}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(-1 \cdot d\right), \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\mathsf{neg}\left(d\right)\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      6. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\left(0 - d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \left(\sqrt{\color{blue}{\frac{1}{h \cdot \ell}}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      9. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{h}}{\ell}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{h}\right), \ell\right)\right)\right) \]
      11. /-lowering-/.f6441.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(0, d\right), \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, h\right), \ell\right)\right)\right) \]
    10. Simplified41.7%

      \[\leadsto \color{blue}{\left(0 - d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}} \]

    if -8.7999999999999999e-203 < l

    1. Initial program 67.6%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6437.6%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified37.6%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{\ell \cdot h}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{h}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6438.2%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    9. Applied egg-rr38.2%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 41.6% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -8.8 \cdot 10^{-203}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= l -8.8e-203)
   (* (- 0.0 d) (sqrt (/ 1.0 (* l h))))
   (* d (sqrt (/ (/ 1.0 l) h)))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -8.8e-203) {
		tmp = (0.0 - d) * sqrt((1.0 / (l * h)));
	} else {
		tmp = d * sqrt(((1.0 / l) / h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (l <= (-8.8d-203)) then
        tmp = (0.0d0 - d) * sqrt((1.0d0 / (l * h)))
    else
        tmp = d * sqrt(((1.0d0 / l) / h))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -8.8e-203) {
		tmp = (0.0 - d) * Math.sqrt((1.0 / (l * h)));
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / h));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if l <= -8.8e-203:
		tmp = (0.0 - d) * math.sqrt((1.0 / (l * h)))
	else:
		tmp = d * math.sqrt(((1.0 / l) / h))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (l <= -8.8e-203)
		tmp = Float64(Float64(0.0 - d) * sqrt(Float64(1.0 / Float64(l * h))));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (l <= -8.8e-203)
		tmp = (0.0 - d) * sqrt((1.0 / (l * h)));
	else
		tmp = d * sqrt(((1.0 / l) / h));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -8.8e-203], N[(N[(0.0 - d), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -8.8 \cdot 10^{-203}:\\
\;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -8.7999999999999999e-203

    1. Initial program 71.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified72.9%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in l around -inf

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \color{blue}{d}\right) \]
      3. unpow2N/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(\left(\sqrt{-1} \cdot \sqrt{-1}\right) \cdot d\right) \]
      4. rem-square-sqrtN/A

        \[\leadsto \sqrt{\frac{1}{h \cdot \ell}} \cdot \left(-1 \cdot d\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{1}{h \cdot \ell}}\right), \color{blue}{\left(-1 \cdot d\right)}\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right), \left(\color{blue}{-1} \cdot d\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(-1 \cdot d\right)\right) \]
      9. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(\mathsf{neg}\left(d\right)\right)\right) \]
      10. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \left(0 - \color{blue}{d}\right)\right) \]
      11. --lowering--.f6440.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right), \mathsf{\_.f64}\left(0, \color{blue}{d}\right)\right) \]
    7. Simplified40.4%

      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(0 - d\right)} \]

    if -8.7999999999999999e-203 < l

    1. Initial program 67.6%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified71.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6437.6%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified37.6%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{\ell \cdot h}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{h}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6438.2%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    9. Applied egg-rr38.2%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -8.8 \cdot 10^{-203}:\\ \;\;\;\;\left(0 - d\right) \cdot \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 36.8% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -4.1 \cdot 10^{-238}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= l -4.1e-238) (sqrt (* (/ d l) (/ d h))) (* d (sqrt (/ (/ 1.0 l) h)))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -4.1e-238) {
		tmp = sqrt(((d / l) * (d / h)));
	} else {
		tmp = d * sqrt(((1.0 / l) / h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (l <= (-4.1d-238)) then
        tmp = sqrt(((d / l) * (d / h)))
    else
        tmp = d * sqrt(((1.0d0 / l) / h))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -4.1e-238) {
		tmp = Math.sqrt(((d / l) * (d / h)));
	} else {
		tmp = d * Math.sqrt(((1.0 / l) / h));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if l <= -4.1e-238:
		tmp = math.sqrt(((d / l) * (d / h)))
	else:
		tmp = d * math.sqrt(((1.0 / l) / h))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (l <= -4.1e-238)
		tmp = sqrt(Float64(Float64(d / l) * Float64(d / h)));
	else
		tmp = Float64(d * sqrt(Float64(Float64(1.0 / l) / h)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (l <= -4.1e-238)
		tmp = sqrt(((d / l) * (d / h)));
	else
		tmp = d * sqrt(((1.0 / l) / h));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -4.1e-238], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -4.1 \cdot 10^{-238}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -4.1000000000000001e-238

    1. Initial program 71.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified74.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f647.4%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified7.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. pow1/2N/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{{\ell}^{\frac{1}{2}} \cdot \sqrt{\color{blue}{h}}} \]
      8. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{{\ell}^{\frac{1}{2}}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      9. sqrt-divN/A

        \[\leadsto \frac{\sqrt{d}}{{\ell}^{\frac{1}{2}}} \cdot \sqrt{\frac{d}{h}} \]
      10. pow1/2N/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \sqrt{\frac{d}{\color{blue}{h}}} \]
      11. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}} \]
      12. sqrt-unprodN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
      13. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{d}{h}\right)\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{d}{h}\right)\right)\right) \]
      16. /-lowering-/.f6435.5%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(d, h\right)\right)\right) \]
    9. Applied egg-rr35.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]

    if -4.1000000000000001e-238 < l

    1. Initial program 67.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified70.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6438.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified38.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{\ell \cdot h}\right)\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{\frac{1}{\ell}}{h}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\ell}\right), h\right)\right)\right) \]
      4. /-lowering-/.f6439.4%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \ell\right), h\right)\right)\right) \]
    9. Applied egg-rr39.4%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 36.8% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -2.1 \cdot 10^{-236}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= l -2.1e-236) (sqrt (* (/ d l) (/ d h))) (/ d (sqrt (* l h)))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -2.1e-236) {
		tmp = sqrt(((d / l) * (d / h)));
	} else {
		tmp = d / sqrt((l * h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (l <= (-2.1d-236)) then
        tmp = sqrt(((d / l) * (d / h)))
    else
        tmp = d / sqrt((l * h))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (l <= -2.1e-236) {
		tmp = Math.sqrt(((d / l) * (d / h)));
	} else {
		tmp = d / Math.sqrt((l * h));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if l <= -2.1e-236:
		tmp = math.sqrt(((d / l) * (d / h)))
	else:
		tmp = d / math.sqrt((l * h))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (l <= -2.1e-236)
		tmp = sqrt(Float64(Float64(d / l) * Float64(d / h)));
	else
		tmp = Float64(d / sqrt(Float64(l * h)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (l <= -2.1e-236)
		tmp = sqrt(((d / l) * (d / h)));
	else
		tmp = d / sqrt((l * h));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -2.1e-236], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2.1 \cdot 10^{-236}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\

\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -2.09999999999999979e-236

    1. Initial program 71.4%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified74.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f647.4%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified7.4%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. rem-square-sqrtN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell \cdot h}} \]
      6. sqrt-prodN/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{\ell} \cdot \color{blue}{\sqrt{h}}} \]
      7. pow1/2N/A

        \[\leadsto \frac{\sqrt{d} \cdot \sqrt{d}}{{\ell}^{\frac{1}{2}} \cdot \sqrt{\color{blue}{h}}} \]
      8. frac-timesN/A

        \[\leadsto \frac{\sqrt{d}}{{\ell}^{\frac{1}{2}}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \]
      9. sqrt-divN/A

        \[\leadsto \frac{\sqrt{d}}{{\ell}^{\frac{1}{2}}} \cdot \sqrt{\frac{d}{h}} \]
      10. pow1/2N/A

        \[\leadsto \frac{\sqrt{d}}{\sqrt{\ell}} \cdot \sqrt{\frac{d}{\color{blue}{h}}} \]
      11. sqrt-divN/A

        \[\leadsto \sqrt{\frac{d}{\ell}} \cdot \sqrt{\color{blue}{\frac{d}{h}}} \]
      12. sqrt-unprodN/A

        \[\leadsto \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \]
      13. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{d}{\ell} \cdot \frac{d}{h}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{d}{\ell}\right), \left(\frac{d}{h}\right)\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \left(\frac{d}{h}\right)\right)\right) \]
      16. /-lowering-/.f6435.5%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, \ell\right), \mathsf{/.f64}\left(d, h\right)\right)\right) \]
    9. Applied egg-rr35.5%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}} \]

    if -2.09999999999999979e-236 < l

    1. Initial program 67.1%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
      2. associate-*l*N/A

        \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      5. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      6. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      10. unpow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      11. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
      14. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    3. Simplified70.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in d around inf

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f6438.8%

        \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
    7. Simplified38.8%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. sqrt-divN/A

        \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      2. metadata-evalN/A

        \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
      3. div-invN/A

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \color{blue}{\left(\sqrt{h \cdot \ell}\right)}\right) \]
      5. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\left(h \cdot \ell\right)\right)\right) \]
      6. *-lowering-*.f6439.3%

        \[\leadsto \mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right) \]
    9. Applied egg-rr39.3%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.1 \cdot 10^{-236}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 26.0% accurate, 3.2× speedup?

\[\begin{array}{l} \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
(FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
double code(double d, double h, double l, double M, double D) {
	return d / sqrt((l * h));
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    code = d / sqrt((l * h))
end function
public static double code(double d, double h, double l, double M, double D) {
	return d / Math.sqrt((l * h));
}
def code(d, h, l, M, D):
	return d / math.sqrt((l * h))
function code(d, h, l, M, D)
	return Float64(d / sqrt(Float64(l * h)))
end
function tmp = code(d, h, l, M, D)
	tmp = d / sqrt((l * h));
end
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{d}{\sqrt{\ell \cdot h}}
\end{array}
Derivation
  1. Initial program 69.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) \]
  2. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \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(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. associate-*l*N/A

      \[\leadsto {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\left({\left(\frac{d}{\ell}\right)}^{\frac{1}{2}}\right), \left({\left(\frac{d}{h}\right)}^{\color{blue}{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    5. unpow1/2N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{\ell}}\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    6. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{\ell}\right)\right), \left(\color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \left({\color{blue}{\left(\frac{d}{h}\right)}}^{\left(\frac{1}{2}\right)} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)}\right), \color{blue}{\left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)}\right)\right) \]
    9. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{d}{h}\right)}^{\frac{1}{2}}\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    10. unpow1/2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\left(\sqrt{\frac{d}{h}}\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    11. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{d}{h}\right)\right), \left(\color{blue}{1} - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    12. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)\right) \]
    13. sub-negN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \left(1 + \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
    14. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(d, h\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(\mathsf{neg}\left(\left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right)}\right)\right)\right) \]
  3. Simplified72.2%

    \[\leadsto \color{blue}{\sqrt{\frac{d}{\ell}} \cdot \left(\sqrt{\frac{d}{h}} \cdot \left(1 + \left(h \cdot \left(\frac{M \cdot D}{d} \cdot 0.25\right)\right) \cdot \frac{\frac{\frac{M \cdot D}{d}}{-2}}{\ell}\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in d around inf

    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
  6. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(d, \color{blue}{\left(\sqrt{\frac{1}{h \cdot \ell}}\right)}\right) \]
    2. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\left(\frac{1}{h \cdot \ell}\right)\right)\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \left(h \cdot \ell\right)\right)\right)\right) \]
    4. *-lowering-*.f6424.9%

      \[\leadsto \mathsf{*.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(h, \ell\right)\right)\right)\right) \]
  7. Simplified24.9%

    \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
  8. Step-by-step derivation
    1. sqrt-divN/A

      \[\leadsto d \cdot \frac{\sqrt{1}}{\color{blue}{\sqrt{h \cdot \ell}}} \]
    2. metadata-evalN/A

      \[\leadsto d \cdot \frac{1}{\sqrt{\color{blue}{h \cdot \ell}}} \]
    3. div-invN/A

      \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(d, \color{blue}{\left(\sqrt{h \cdot \ell}\right)}\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\left(h \cdot \ell\right)\right)\right) \]
    6. *-lowering-*.f6425.2%

      \[\leadsto \mathsf{/.f64}\left(d, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(h, \ell\right)\right)\right) \]
  9. Applied egg-rr25.2%

    \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
  10. Final simplification25.2%

    \[\leadsto \frac{d}{\sqrt{\ell \cdot h}} \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2024125 
(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)))))