Henrywood and Agarwal, Equation (12)

Percentage Accurate: 66.3% → 78.3%
Time: 20.8s
Alternatives: 14
Speedup: 0.8×

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 14 alternatives:

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

Initial Program: 66.3% 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: 78.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \frac{h}{\ell} \cdot \left(0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\right)\\ t_1 := \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{if}\;t_0 \leq -5 \cdot 10^{-150}:\\ \;\;\;\;t_1 \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;t_0 \leq 0 \lor \neg \left(t_0 \leq 10^{+241}\right):\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \cdot t_1\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0
         (*
          (* (pow (/ d h) 0.5) (pow (/ d l) 0.5))
          (- 1.0 (* (/ h l) (* 0.5 (pow (/ (* D M) (* d 2.0)) 2.0))))))
        (t_1 (* (sqrt (/ d l)) (sqrt (/ d h)))))
   (if (<= t_0 -5e-150)
     (* t_1 (- 1.0 (/ (* h (* 0.5 (pow (* (/ D d) (* 0.5 M)) 2.0))) l)))
     (if (or (<= t_0 0.0) (not (<= t_0 1e+241)))
       (/ (fabs d) (sqrt (* h l)))
       (* (- 1.0 (* h (/ (pow (* D (/ 0.5 (/ d M))) 2.0) (/ l 0.5)))) t_1)))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = (pow((d / h), 0.5) * pow((d / l), 0.5)) * (1.0 - ((h / l) * (0.5 * pow(((D * M) / (d * 2.0)), 2.0))));
	double t_1 = sqrt((d / l)) * sqrt((d / h));
	double tmp;
	if (t_0 <= -5e-150) {
		tmp = t_1 * (1.0 - ((h * (0.5 * pow(((D / d) * (0.5 * M)), 2.0))) / l));
	} else if ((t_0 <= 0.0) || !(t_0 <= 1e+241)) {
		tmp = fabs(d) / sqrt((h * l));
	} else {
		tmp = (1.0 - (h * (pow((D * (0.5 / (d / M))), 2.0) / (l / 0.5)))) * t_1;
	}
	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 / h) ** 0.5d0) * ((d / l) ** 0.5d0)) * (1.0d0 - ((h / l) * (0.5d0 * (((d_1 * m) / (d * 2.0d0)) ** 2.0d0))))
    t_1 = sqrt((d / l)) * sqrt((d / h))
    if (t_0 <= (-5d-150)) then
        tmp = t_1 * (1.0d0 - ((h * (0.5d0 * (((d_1 / d) * (0.5d0 * m)) ** 2.0d0))) / l))
    else if ((t_0 <= 0.0d0) .or. (.not. (t_0 <= 1d+241))) then
        tmp = abs(d) / sqrt((h * l))
    else
        tmp = (1.0d0 - (h * (((d_1 * (0.5d0 / (d / m))) ** 2.0d0) / (l / 0.5d0)))) * t_1
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = (Math.pow((d / h), 0.5) * Math.pow((d / l), 0.5)) * (1.0 - ((h / l) * (0.5 * Math.pow(((D * M) / (d * 2.0)), 2.0))));
	double t_1 = Math.sqrt((d / l)) * Math.sqrt((d / h));
	double tmp;
	if (t_0 <= -5e-150) {
		tmp = t_1 * (1.0 - ((h * (0.5 * Math.pow(((D / d) * (0.5 * M)), 2.0))) / l));
	} else if ((t_0 <= 0.0) || !(t_0 <= 1e+241)) {
		tmp = Math.abs(d) / Math.sqrt((h * l));
	} else {
		tmp = (1.0 - (h * (Math.pow((D * (0.5 / (d / M))), 2.0) / (l / 0.5)))) * t_1;
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = (math.pow((d / h), 0.5) * math.pow((d / l), 0.5)) * (1.0 - ((h / l) * (0.5 * math.pow(((D * M) / (d * 2.0)), 2.0))))
	t_1 = math.sqrt((d / l)) * math.sqrt((d / h))
	tmp = 0
	if t_0 <= -5e-150:
		tmp = t_1 * (1.0 - ((h * (0.5 * math.pow(((D / d) * (0.5 * M)), 2.0))) / l))
	elif (t_0 <= 0.0) or not (t_0 <= 1e+241):
		tmp = math.fabs(d) / math.sqrt((h * l))
	else:
		tmp = (1.0 - (h * (math.pow((D * (0.5 / (d / M))), 2.0) / (l / 0.5)))) * t_1
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(Float64((Float64(d / h) ^ 0.5) * (Float64(d / l) ^ 0.5)) * Float64(1.0 - Float64(Float64(h / l) * Float64(0.5 * (Float64(Float64(D * M) / Float64(d * 2.0)) ^ 2.0)))))
	t_1 = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)))
	tmp = 0.0
	if (t_0 <= -5e-150)
		tmp = Float64(t_1 * Float64(1.0 - Float64(Float64(h * Float64(0.5 * (Float64(Float64(D / d) * Float64(0.5 * M)) ^ 2.0))) / l)));
	elseif ((t_0 <= 0.0) || !(t_0 <= 1e+241))
		tmp = Float64(abs(d) / sqrt(Float64(h * l)));
	else
		tmp = Float64(Float64(1.0 - Float64(h * Float64((Float64(D * Float64(0.5 / Float64(d / M))) ^ 2.0) / Float64(l / 0.5)))) * t_1);
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = (((d / h) ^ 0.5) * ((d / l) ^ 0.5)) * (1.0 - ((h / l) * (0.5 * (((D * M) / (d * 2.0)) ^ 2.0))));
	t_1 = sqrt((d / l)) * sqrt((d / h));
	tmp = 0.0;
	if (t_0 <= -5e-150)
		tmp = t_1 * (1.0 - ((h * (0.5 * (((D / d) * (0.5 * M)) ^ 2.0))) / l));
	elseif ((t_0 <= 0.0) || ~((t_0 <= 1e+241)))
		tmp = abs(d) / sqrt((h * l));
	else
		tmp = (1.0 - (h * (((D * (0.5 / (d / M))) ^ 2.0) / (l / 0.5)))) * t_1;
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(0.5 * N[Power[N[(N[(D * M), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-150], N[(t$95$1 * N[(1.0 - N[(N[(h * N[(0.5 * N[Power[N[(N[(D / d), $MachinePrecision] * N[(0.5 * M), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$0, 0.0], N[Not[LessEqual[t$95$0, 1e+241]], $MachinePrecision]], N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(h * N[(N[Power[N[(D * N[(0.5 / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(l / 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_0 \leq 0 \lor \neg \left(t_0 \leq 10^{+241}\right):\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\

\mathbf{else}:\\
\;\;\;\;\left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \cdot t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < -4.9999999999999999e-150

    1. Initial program 90.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. metadata-eval90.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      10. div-inv90.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\left({\left(\frac{D}{d} \cdot \color{blue}{\left(M \cdot \frac{1}{2}\right)}\right)}^{2} \cdot 0.5\right) \cdot h}{\ell}\right) \]
      11. metadata-eval90.9%

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

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

    if -4.9999999999999999e-150 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < -0.0 or 1.0000000000000001e241 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l))))

    1. Initial program 27.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. associate-*l*27.1%

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. unpow1/227.1%

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
      10. distribute-rgt-neg-in27.1%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
    4. Taylor expanded in M around 0 34.5%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. expm1-log1p-u34.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
      3. expm1-udef31.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
      4. sqrt-unprod29.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
    6. Applied egg-rr29.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def31.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
      2. expm1-log1p32.0%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
    8. Simplified32.0%

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

      \[\leadsto \sqrt{\color{blue}{\frac{{d}^{2}}{\ell \cdot h}}} \]
    10. Step-by-step derivation
      1. unpow236.3%

        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{\ell \cdot h}} \]
      2. *-commutative36.3%

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \]
    11. Simplified36.3%

      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \]
    12. Step-by-step derivation
      1. sqrt-div42.4%

        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    13. Applied egg-rr42.4%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    14. Step-by-step derivation
      1. rem-sqrt-square63.7%

        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \]
    15. Simplified63.7%

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

    if -0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < 1.0000000000000001e241

    1. Initial program 99.5%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. metadata-eval99.5%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*97.9%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
      6. un-div-inv99.5%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right) \]
      8. *-commutative99.5%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative97.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv97.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{D}{d} \cdot \color{blue}{\left(M \cdot \frac{1}{2}\right)}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      12. metadata-eval97.9%

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/97.9%

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(\frac{D}{d} \cdot \frac{M}{\color{blue}{2}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      7. times-frac99.5%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \color{blue}{\frac{\frac{M}{2}}{d}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      10. metadata-eval99.5%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity99.5%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{M \cdot 0.5}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      13. *-commutative99.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \frac{h}{\ell} \cdot \left(0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\right) \leq -5 \cdot 10^{-150}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}\right)}{\ell}\right)\\ \mathbf{elif}\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \frac{h}{\ell} \cdot \left(0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\right) \leq 0 \lor \neg \left(\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \frac{h}{\ell} \cdot \left(0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\right) \leq 10^{+241}\right):\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)\\ \end{array} \]

Alternative 2: 77.5% accurate, 0.8× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < -9.999999999999969e-311

    1. Initial program 65.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. metadata-eval65.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*65.9%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
      6. un-div-inv66.8%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative66.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv66.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{D}{d} \cdot \color{blue}{\left(M \cdot \frac{1}{2}\right)}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      12. metadata-eval66.8%

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/69.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity69.4%

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}}\right) \]
    8. Step-by-step derivation
      1. frac-2neg69.4%

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

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

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

    if -9.999999999999969e-311 < d < 5.8000000000000001e-224

    1. Initial program 34.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. metadata-eval34.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*22.9%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
      6. un-div-inv34.0%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right) \]
      8. *-commutative34.0%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative22.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv22.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{D}{d} \cdot \color{blue}{\left(M \cdot \frac{1}{2}\right)}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      12. metadata-eval22.9%

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/23.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity34.2%

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

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

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

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

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    9. Step-by-step derivation
      1. *-commutative28.6%

        \[\leadsto \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot -0.125} \]
      2. associate-*l*28.6%

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

        \[\leadsto \frac{\color{blue}{\left(D \cdot D\right)} \cdot {M}^{2}}{d} \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right) \]
      4. unpow228.6%

        \[\leadsto \frac{\left(D \cdot D\right) \cdot \color{blue}{\left(M \cdot M\right)}}{d} \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right) \]
      5. unswap-sqr45.4%

        \[\leadsto \frac{\color{blue}{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}}{d} \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right) \]
    10. Simplified45.4%

      \[\leadsto \color{blue}{\frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right)} \]
    11. Step-by-step derivation
      1. sqrt-div45.4%

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\color{blue}{\frac{\sqrt{h}}{\sqrt{{\ell}^{3}}}} \cdot -0.125\right) \]
    12. Applied egg-rr45.4%

      \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\color{blue}{\frac{\sqrt{h}}{\sqrt{{\ell}^{3}}}} \cdot -0.125\right) \]
    13. Step-by-step derivation
      1. sqr-pow45.4%

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

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{\color{blue}{\left|{\ell}^{\left(\frac{3}{2}\right)}\right|}} \cdot -0.125\right) \]
      3. sqr-pow72.2%

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{\left|\color{blue}{{\ell}^{\left(\frac{\frac{3}{2}}{2}\right)} \cdot {\ell}^{\left(\frac{\frac{3}{2}}{2}\right)}}\right|} \cdot -0.125\right) \]
      4. fabs-sqr72.2%

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{\color{blue}{{\ell}^{\left(\frac{\frac{3}{2}}{2}\right)} \cdot {\ell}^{\left(\frac{\frac{3}{2}}{2}\right)}}} \cdot -0.125\right) \]
      5. sqr-pow72.2%

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{\color{blue}{{\ell}^{\left(\frac{3}{2}\right)}}} \cdot -0.125\right) \]
      6. metadata-eval72.2%

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{{\ell}^{\color{blue}{1.5}}} \cdot -0.125\right) \]
    14. Simplified72.2%

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

    if 5.8000000000000001e-224 < d

    1. Initial program 70.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. metadata-eval70.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div80.3%

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

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

      \[\leadsto \left(\color{blue}{\left(\sqrt{d} \cdot \frac{1}{\sqrt{h}}\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r/80.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1 \cdot 10^{-310}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right)\\ \mathbf{elif}\;d \leq 5.8 \cdot 10^{-224}:\\ \;\;\;\;\frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \frac{\sqrt{d}}{\sqrt{h}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\\ \end{array} \]

Alternative 3: 52.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;D \leq 7.2 \cdot 10^{+46}:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\

\mathbf{else}:\\
\;\;\;\;\left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if D < 7.1999999999999997e46

    1. Initial program 65.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. associate-*l*64.7%

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. unpow1/264.7%

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
      10. distribute-rgt-neg-in64.7%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(-\frac{1}{2} \cdot \frac{h}{\ell}\right)} + 1\right)\right) \]
      11. *-commutative64.7%

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
    4. Taylor expanded in M around 0 45.2%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{1}\right) \]
    5. Step-by-step derivation
      1. *-rgt-identity45.2%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. expm1-log1p-u44.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
      3. expm1-udef29.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
      4. sqrt-unprod25.9%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
    6. Applied egg-rr25.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def37.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
      2. expm1-log1p38.4%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
    8. Simplified38.4%

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

      \[\leadsto \sqrt{\color{blue}{\frac{{d}^{2}}{\ell \cdot h}}} \]
    10. Step-by-step derivation
      1. unpow232.7%

        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{\ell \cdot h}} \]
      2. *-commutative32.7%

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \]
    11. Simplified32.7%

      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \]
    12. Step-by-step derivation
      1. sqrt-div39.2%

        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    13. Applied egg-rr39.2%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    14. Step-by-step derivation
      1. rem-sqrt-square53.9%

        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \]
    15. Simplified53.9%

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

    if 7.1999999999999997e46 < 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. metadata-eval67.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*67.1%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/67.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity65.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 7.2 \cdot 10^{+46}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)\\ \end{array} \]

Alternative 4: 51.9% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ t_1 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{if}\;M \leq 6.4 \cdot 10^{-284}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;M \leq 4.4 \cdot 10^{-267}:\\ \;\;\;\;t_0 \cdot \left(1 - h \cdot \left(\frac{D \cdot M}{\frac{\ell}{D \cdot M}} \cdot \frac{0.125}{d \cdot d}\right)\right)\\ \mathbf{elif}\;M \leq 7 \cdot 10^{-247}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;M \leq 1.35 \cdot 10^{-220}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 + \left(h \cdot \frac{{\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2}}{\ell}\right) \cdot -0.5\right)\\ \mathbf{elif}\;M \leq 3.2 \cdot 10^{-140}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(0.125 \cdot \frac{M \cdot \left(h \cdot M\right)}{\ell}\right)\right)\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* (sqrt (/ d l)) (sqrt (/ d h))))
        (t_1 (/ (fabs d) (sqrt (* h l)))))
   (if (<= M 6.4e-284)
     t_1
     (if (<= M 4.4e-267)
       (* t_0 (- 1.0 (* h (* (/ (* D M) (/ l (* D M))) (/ 0.125 (* d d))))))
       (if (<= M 7e-247)
         t_1
         (if (<= M 1.35e-220)
           (*
            (sqrt (* (/ d l) (/ d h)))
            (+ 1.0 (* (* h (/ (pow (* 0.5 (/ (* D M) d)) 2.0) l)) -0.5)))
           (if (<= M 3.2e-140)
             t_1
             (*
              t_0
              (-
               1.0
               (* (* (/ D d) (/ D d)) (* 0.125 (/ (* M (* h M)) l))))))))))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((d / l)) * sqrt((d / h));
	double t_1 = fabs(d) / sqrt((h * l));
	double tmp;
	if (M <= 6.4e-284) {
		tmp = t_1;
	} else if (M <= 4.4e-267) {
		tmp = t_0 * (1.0 - (h * (((D * M) / (l / (D * M))) * (0.125 / (d * d)))));
	} else if (M <= 7e-247) {
		tmp = t_1;
	} else if (M <= 1.35e-220) {
		tmp = sqrt(((d / l) * (d / h))) * (1.0 + ((h * (pow((0.5 * ((D * M) / d)), 2.0) / l)) * -0.5));
	} else if (M <= 3.2e-140) {
		tmp = t_1;
	} else {
		tmp = t_0 * (1.0 - (((D / d) * (D / d)) * (0.125 * ((M * (h * M)) / 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 = sqrt((d / l)) * sqrt((d / h))
    t_1 = abs(d) / sqrt((h * l))
    if (m <= 6.4d-284) then
        tmp = t_1
    else if (m <= 4.4d-267) then
        tmp = t_0 * (1.0d0 - (h * (((d_1 * m) / (l / (d_1 * m))) * (0.125d0 / (d * d)))))
    else if (m <= 7d-247) then
        tmp = t_1
    else if (m <= 1.35d-220) then
        tmp = sqrt(((d / l) * (d / h))) * (1.0d0 + ((h * (((0.5d0 * ((d_1 * m) / d)) ** 2.0d0) / l)) * (-0.5d0)))
    else if (m <= 3.2d-140) then
        tmp = t_1
    else
        tmp = t_0 * (1.0d0 - (((d_1 / d) * (d_1 / d)) * (0.125d0 * ((m * (h * m)) / l))))
    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((d / l)) * Math.sqrt((d / h));
	double t_1 = Math.abs(d) / Math.sqrt((h * l));
	double tmp;
	if (M <= 6.4e-284) {
		tmp = t_1;
	} else if (M <= 4.4e-267) {
		tmp = t_0 * (1.0 - (h * (((D * M) / (l / (D * M))) * (0.125 / (d * d)))));
	} else if (M <= 7e-247) {
		tmp = t_1;
	} else if (M <= 1.35e-220) {
		tmp = Math.sqrt(((d / l) * (d / h))) * (1.0 + ((h * (Math.pow((0.5 * ((D * M) / d)), 2.0) / l)) * -0.5));
	} else if (M <= 3.2e-140) {
		tmp = t_1;
	} else {
		tmp = t_0 * (1.0 - (((D / d) * (D / d)) * (0.125 * ((M * (h * M)) / l))));
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = math.sqrt((d / l)) * math.sqrt((d / h))
	t_1 = math.fabs(d) / math.sqrt((h * l))
	tmp = 0
	if M <= 6.4e-284:
		tmp = t_1
	elif M <= 4.4e-267:
		tmp = t_0 * (1.0 - (h * (((D * M) / (l / (D * M))) * (0.125 / (d * d)))))
	elif M <= 7e-247:
		tmp = t_1
	elif M <= 1.35e-220:
		tmp = math.sqrt(((d / l) * (d / h))) * (1.0 + ((h * (math.pow((0.5 * ((D * M) / d)), 2.0) / l)) * -0.5))
	elif M <= 3.2e-140:
		tmp = t_1
	else:
		tmp = t_0 * (1.0 - (((D / d) * (D / d)) * (0.125 * ((M * (h * M)) / l))))
	return tmp
function code(d, h, l, M, D)
	t_0 = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)))
	t_1 = Float64(abs(d) / sqrt(Float64(h * l)))
	tmp = 0.0
	if (M <= 6.4e-284)
		tmp = t_1;
	elseif (M <= 4.4e-267)
		tmp = Float64(t_0 * Float64(1.0 - Float64(h * Float64(Float64(Float64(D * M) / Float64(l / Float64(D * M))) * Float64(0.125 / Float64(d * d))))));
	elseif (M <= 7e-247)
		tmp = t_1;
	elseif (M <= 1.35e-220)
		tmp = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(1.0 + Float64(Float64(h * Float64((Float64(0.5 * Float64(Float64(D * M) / d)) ^ 2.0) / l)) * -0.5)));
	elseif (M <= 3.2e-140)
		tmp = t_1;
	else
		tmp = Float64(t_0 * Float64(1.0 - Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(0.125 * Float64(Float64(M * Float64(h * M)) / l)))));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = sqrt((d / l)) * sqrt((d / h));
	t_1 = abs(d) / sqrt((h * l));
	tmp = 0.0;
	if (M <= 6.4e-284)
		tmp = t_1;
	elseif (M <= 4.4e-267)
		tmp = t_0 * (1.0 - (h * (((D * M) / (l / (D * M))) * (0.125 / (d * d)))));
	elseif (M <= 7e-247)
		tmp = t_1;
	elseif (M <= 1.35e-220)
		tmp = sqrt(((d / l) * (d / h))) * (1.0 + ((h * (((0.5 * ((D * M) / d)) ^ 2.0) / l)) * -0.5));
	elseif (M <= 3.2e-140)
		tmp = t_1;
	else
		tmp = t_0 * (1.0 - (((D / d) * (D / d)) * (0.125 * ((M * (h * M)) / l))));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M, 6.4e-284], t$95$1, If[LessEqual[M, 4.4e-267], N[(t$95$0 * N[(1.0 - N[(h * N[(N[(N[(D * M), $MachinePrecision] / N[(l / N[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.125 / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 7e-247], t$95$1, If[LessEqual[M, 1.35e-220], N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(N[(h * N[(N[Power[N[(0.5 * N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 3.2e-140], t$95$1, N[(t$95$0 * N[(1.0 - N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(0.125 * N[(N[(M * N[(h * M), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
t_1 := \frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\
\mathbf{if}\;M \leq 6.4 \cdot 10^{-284}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;M \leq 4.4 \cdot 10^{-267}:\\
\;\;\;\;t_0 \cdot \left(1 - h \cdot \left(\frac{D \cdot M}{\frac{\ell}{D \cdot M}} \cdot \frac{0.125}{d \cdot d}\right)\right)\\

\mathbf{elif}\;M \leq 7 \cdot 10^{-247}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;M \leq 1.35 \cdot 10^{-220}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 + \left(h \cdot \frac{{\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2}}{\ell}\right) \cdot -0.5\right)\\

\mathbf{elif}\;M \leq 3.2 \cdot 10^{-140}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(0.125 \cdot \frac{M \cdot \left(h \cdot M\right)}{\ell}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if M < 6.40000000000000047e-284 or 4.39999999999999976e-267 < M < 6.9999999999999998e-247 or 1.35e-220 < M < 3.2000000000000001e-140

    1. Initial program 63.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. associate-*l*62.9%

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. unpow1/262.9%

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
      10. distribute-rgt-neg-in62.9%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
    4. Taylor expanded in M around 0 40.3%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{1}\right) \]
    5. Step-by-step derivation
      1. *-rgt-identity40.3%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. expm1-log1p-u38.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
      3. expm1-udef28.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
      4. sqrt-unprod24.4%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
    6. Applied egg-rr24.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def33.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
      2. expm1-log1p34.2%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
    8. Simplified34.2%

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

      \[\leadsto \sqrt{\color{blue}{\frac{{d}^{2}}{\ell \cdot h}}} \]
    10. Step-by-step derivation
      1. unpow230.0%

        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{\ell \cdot h}} \]
      2. *-commutative30.0%

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \]
    11. Simplified30.0%

      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \]
    12. Step-by-step derivation
      1. sqrt-div37.2%

        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    13. Applied egg-rr37.2%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    14. Step-by-step derivation
      1. rem-sqrt-square52.4%

        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \]
    15. Simplified52.4%

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

    if 6.40000000000000047e-284 < M < 4.39999999999999976e-267

    1. Initial program 100.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. metadata-eval100.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*100.0%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
      6. un-div-inv100.0%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right) \]
      8. *-commutative100.0%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative100.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv100.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{D}{d} \cdot \color{blue}{\left(M \cdot \frac{1}{2}\right)}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      12. metadata-eval100.0%

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/100.0%

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(\frac{D}{d} \cdot \frac{M}{\color{blue}{2}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      7. times-frac100.0%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \color{blue}{\frac{\frac{M}{2}}{d}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      10. metadata-eval100.0%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity100.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{M \cdot 0.5}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      13. *-commutative100.0%

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \color{blue}{\left(0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{\ell \cdot {d}^{2}}\right)}\right) \]
    9. Step-by-step derivation
      1. associate-*r/100.0%

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \left(\frac{\left(M \cdot M\right) \cdot \color{blue}{\left(D \cdot D\right)}}{\ell} \cdot \frac{0.125}{{d}^{2}}\right)\right) \]
      7. unswap-sqr100.0%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \left(\color{blue}{\frac{M \cdot D}{\frac{\ell}{M \cdot D}}} \cdot \frac{0.125}{{d}^{2}}\right)\right) \]
      9. *-commutative100.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \left(\frac{\color{blue}{D \cdot M}}{\frac{\ell}{M \cdot D}} \cdot \frac{0.125}{{d}^{2}}\right)\right) \]
      10. *-commutative100.0%

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

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

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

    if 6.9999999999999998e-247 < M < 1.35e-220

    1. Initial program 79.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. metadata-eval79.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*79.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/80.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity80.2%

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}}\right) \]
    8. Step-by-step derivation
      1. expm1-log1p-u38.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right)\right)\right)} \]
      2. expm1-udef19.7%

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

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right)\right)} - 1 \]
      4. associate-/r/19.7%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - h \cdot \color{blue}{\left(\frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\ell} \cdot 0.5\right)}\right)\right)} - 1 \]
      5. associate-/r/19.7%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - h \cdot \left(\frac{{\left(D \cdot \color{blue}{\left(\frac{0.5}{d} \cdot M\right)}\right)}^{2}}{\ell} \cdot 0.5\right)\right)\right)} - 1 \]
    9. Applied egg-rr19.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - h \cdot \left(\frac{{\left(D \cdot \left(\frac{0.5}{d} \cdot M\right)\right)}^{2}}{\ell} \cdot 0.5\right)\right)\right)} - 1} \]
    10. Simplified80.6%

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

    if 3.2000000000000001e-140 < M

    1. Initial program 69.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. metadata-eval69.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative48.8%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{{d}^{2}} \cdot \frac{{M}^{2} \cdot h}{\ell}\right)} \cdot 0.125\right) \]
      4. *-commutative47.6%

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell} \cdot 0.125\right)\right) \]
      10. associate-*r*62.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 6.4 \cdot 10^{-284}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;M \leq 4.4 \cdot 10^{-267}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - h \cdot \left(\frac{D \cdot M}{\frac{\ell}{D \cdot M}} \cdot \frac{0.125}{d \cdot d}\right)\right)\\ \mathbf{elif}\;M \leq 7 \cdot 10^{-247}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;M \leq 1.35 \cdot 10^{-220}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 + \left(h \cdot \frac{{\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2}}{\ell}\right) \cdot -0.5\right)\\ \mathbf{elif}\;M \leq 3.2 \cdot 10^{-140}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(0.125 \cdot \frac{M \cdot \left(h \cdot M\right)}{\ell}\right)\right)\\ \end{array} \]

Alternative 5: 66.3% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;d \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;d \leq 5.9 \cdot 10^{+119}:\\
\;\;\;\;t_0\\

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


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

    1. Initial program 68.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. metadata-eval68.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative39.4%

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D \cdot D}{\color{blue}{d \cdot d}} \cdot \left(\frac{h \cdot {M}^{2}}{\ell} \cdot 0.125\right)\right) \]
      8. times-frac65.5%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell} \cdot 0.125\right)\right) \]
      10. associate-*r*65.8%

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{\left(h \cdot M\right) \cdot M}{\ell} \cdot 0.125\right)}\right) \]
    7. Step-by-step derivation
      1. clear-num65.8%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg80.6%

        \[\leadsto \color{blue}{-d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative80.6%

        \[\leadsto -\color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
      3. distribute-rgt-neg-in80.6%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)} \]
      4. associate-/r*81.2%

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

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

    if -1.45e169 < d < -1.000000000000002e-309 or 1.08e-106 < d < 5.9000000000000001e119

    1. Initial program 70.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. metadata-eval70.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*70.7%

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right) \]
      8. *-commutative70.6%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative70.6%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv70.6%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/74.4%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \color{blue}{\frac{\frac{M}{2}}{d}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      10. metadata-eval73.7%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity73.7%

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

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \color{blue}{\left(0.125 \cdot \frac{{D}^{2} \cdot {M}^{2}}{\ell \cdot {d}^{2}}\right)}\right) \]
    9. Step-by-step derivation
      1. associate-*r/58.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.000000000000002e-309 < d < 1.08e-106

    1. Initial program 49.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. metadata-eval49.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*45.6%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
      6. un-div-inv49.9%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative45.6%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv45.6%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/45.7%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2}}{\frac{\ell}{0.5}}}\right) \]
      4. /-rgt-identity45.7%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(\frac{D}{d} \cdot \frac{M}{\color{blue}{2}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      7. times-frac50.0%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \color{blue}{\frac{\frac{M}{2}}{d}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      10. metadata-eval49.9%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity49.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{M \cdot 0.5}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      13. *-commutative49.9%

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

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

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

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    9. Step-by-step derivation
      1. *-commutative30.8%

        \[\leadsto \color{blue}{\left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) \cdot -0.125} \]
      2. associate-*l*30.8%

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

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

        \[\leadsto \frac{\left(D \cdot D\right) \cdot \color{blue}{\left(M \cdot M\right)}}{d} \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right) \]
      5. unswap-sqr48.0%

        \[\leadsto \frac{\color{blue}{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}}{d} \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right) \]
    10. Simplified48.0%

      \[\leadsto \color{blue}{\frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right)} \]
    11. Step-by-step derivation
      1. sqrt-div50.1%

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

      \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\color{blue}{\frac{\sqrt{h}}{\sqrt{{\ell}^{3}}}} \cdot -0.125\right) \]
    13. Step-by-step derivation
      1. sqr-pow50.1%

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{\sqrt{\color{blue}{{\ell}^{\left(\frac{3}{2}\right)} \cdot {\ell}^{\left(\frac{3}{2}\right)}}}} \cdot -0.125\right) \]
      2. rem-sqrt-square66.6%

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{\color{blue}{\left|{\ell}^{\left(\frac{3}{2}\right)}\right|}} \cdot -0.125\right) \]
      3. sqr-pow66.6%

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

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{\color{blue}{{\ell}^{\left(\frac{\frac{3}{2}}{2}\right)} \cdot {\ell}^{\left(\frac{\frac{3}{2}}{2}\right)}}} \cdot -0.125\right) \]
      5. sqr-pow66.6%

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{\color{blue}{{\ell}^{\left(\frac{3}{2}\right)}}} \cdot -0.125\right) \]
      6. metadata-eval66.6%

        \[\leadsto \frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{{\ell}^{\color{blue}{1.5}}} \cdot -0.125\right) \]
    14. Simplified66.6%

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

    if 5.9000000000000001e119 < d

    1. Initial program 64.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. metadata-eval64.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*66.5%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
      6. un-div-inv64.0%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{\color{blue}{0.5} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right) \]
      8. *-commutative64.0%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative66.5%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv66.5%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{D}{d} \cdot \color{blue}{\left(M \cdot \frac{1}{2}\right)}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      12. metadata-eval66.5%

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/69.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity69.3%

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification72.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -1.45 \cdot 10^{+169}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - h \cdot \left(\frac{D \cdot M}{\frac{\ell}{D \cdot M}} \cdot \frac{0.125}{d \cdot d}\right)\right)\\ \mathbf{elif}\;d \leq 1.08 \cdot 10^{-106}:\\ \;\;\;\;\frac{\left(D \cdot M\right) \cdot \left(D \cdot M\right)}{d} \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \mathbf{elif}\;d \leq 5.9 \cdot 10^{+119}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - h \cdot \left(\frac{D \cdot M}{\frac{\ell}{D \cdot M}} \cdot \frac{0.125}{d \cdot d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \end{array} \]

Alternative 6: 50.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;D \leq 7.5 \cdot 10^{+49}:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 + \left(h \cdot \frac{{\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2}}{\ell}\right) \cdot -0.5\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if D < 7.4999999999999995e49

    1. Initial program 65.5%

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Step-by-step derivation
      1. associate-*l*65.0%

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. unpow1/265.0%

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
      10. distribute-rgt-neg-in65.0%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
    4. Taylor expanded in M around 0 45.1%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. expm1-log1p-u43.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
      3. expm1-udef29.4%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
      4. sqrt-unprod25.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
    6. Applied egg-rr25.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def37.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
      2. expm1-log1p38.1%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
    8. Simplified38.1%

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

      \[\leadsto \sqrt{\color{blue}{\frac{{d}^{2}}{\ell \cdot h}}} \]
    10. Step-by-step derivation
      1. unpow232.4%

        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{\ell \cdot h}} \]
      2. *-commutative32.4%

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \]
    11. Simplified32.4%

      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \]
    12. Step-by-step derivation
      1. sqrt-div39.1%

        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    13. Applied egg-rr39.1%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    14. Step-by-step derivation
      1. rem-sqrt-square53.7%

        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \]
    15. Simplified53.7%

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

    if 7.4999999999999995e49 < D

    1. Initial program 65.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. metadata-eval65.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*65.8%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
      6. un-div-inv63.9%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative63.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv63.8%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{D}{d} \cdot \color{blue}{\left(M \cdot \frac{1}{2}\right)}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      12. metadata-eval63.8%

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/65.8%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \color{blue}{\frac{\frac{M}{2}}{d}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      10. metadata-eval63.9%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity63.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{M \cdot 0.5}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      13. *-commutative63.9%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}}\right) \]
    8. Step-by-step derivation
      1. expm1-log1p-u12.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right)\right)\right)} \]
      2. expm1-udef10.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right)\right)} - 1} \]
      3. sqrt-unprod8.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\frac{\ell}{0.5}}\right)\right)} - 1 \]
      4. associate-/r/8.3%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - h \cdot \color{blue}{\left(\frac{{\left(D \cdot \frac{0.5}{\frac{d}{M}}\right)}^{2}}{\ell} \cdot 0.5\right)}\right)\right)} - 1 \]
      5. associate-/r/8.3%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - h \cdot \left(\frac{{\left(D \cdot \color{blue}{\left(\frac{0.5}{d} \cdot M\right)}\right)}^{2}}{\ell} \cdot 0.5\right)\right)\right)} - 1 \]
    9. Applied egg-rr8.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - h \cdot \left(\frac{{\left(D \cdot \left(\frac{0.5}{d} \cdot M\right)\right)}^{2}}{\ell} \cdot 0.5\right)\right)\right)} - 1} \]
    10. Simplified53.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 7.5 \cdot 10^{+49}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 + \left(h \cdot \frac{{\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2}}{\ell}\right) \cdot -0.5\right)\\ \end{array} \]

Alternative 7: 45.5% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \leq 3.8 \cdot 10^{-36}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 + -0.125 \cdot \left(\frac{D \cdot D}{d \cdot d} \cdot \frac{M \cdot M}{\frac{\ell}{h}}\right)\right)\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= M 3.8e-36)
   (/ (fabs d) (sqrt (* h l)))
   (*
    (sqrt (/ (/ d h) (/ l d)))
    (+ 1.0 (* -0.125 (* (/ (* D D) (* d d)) (/ (* M M) (/ l h))))))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (M <= 3.8e-36) {
		tmp = fabs(d) / sqrt((h * l));
	} else {
		tmp = sqrt(((d / h) / (l / d))) * (1.0 + (-0.125 * (((D * D) / (d * d)) * ((M * M) / (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 (m <= 3.8d-36) then
        tmp = abs(d) / sqrt((h * l))
    else
        tmp = sqrt(((d / h) / (l / d))) * (1.0d0 + ((-0.125d0) * (((d_1 * d_1) / (d * d)) * ((m * m) / (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 (M <= 3.8e-36) {
		tmp = Math.abs(d) / Math.sqrt((h * l));
	} else {
		tmp = Math.sqrt(((d / h) / (l / d))) * (1.0 + (-0.125 * (((D * D) / (d * d)) * ((M * M) / (l / h)))));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if M <= 3.8e-36:
		tmp = math.fabs(d) / math.sqrt((h * l))
	else:
		tmp = math.sqrt(((d / h) / (l / d))) * (1.0 + (-0.125 * (((D * D) / (d * d)) * ((M * M) / (l / h)))))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (M <= 3.8e-36)
		tmp = Float64(abs(d) / sqrt(Float64(h * l)));
	else
		tmp = Float64(sqrt(Float64(Float64(d / h) / Float64(l / d))) * Float64(1.0 + Float64(-0.125 * Float64(Float64(Float64(D * D) / Float64(d * d)) * Float64(Float64(M * M) / Float64(l / h))))));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (M <= 3.8e-36)
		tmp = abs(d) / sqrt((h * l));
	else
		tmp = sqrt(((d / h) / (l / d))) * (1.0 + (-0.125 * (((D * D) / (d * d)) * ((M * M) / (l / h)))));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[M, 3.8e-36], N[(N[Abs[d], $MachinePrecision] / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(d / h), $MachinePrecision] / N[(l / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(-0.125 * N[(N[(N[(D * D), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;M \leq 3.8 \cdot 10^{-36}:\\
\;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if M < 3.79999999999999971e-36

    1. Initial program 64.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. associate-*l*63.6%

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. unpow1/263.6%

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
      10. distribute-rgt-neg-in63.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(-\frac{1}{2} \cdot \frac{h}{\ell}\right)} + 1\right)\right) \]
      11. *-commutative63.6%

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
    4. Taylor expanded in M around 0 42.6%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{1}\right) \]
    5. Step-by-step derivation
      1. *-rgt-identity42.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. expm1-log1p-u41.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
      3. expm1-udef27.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
      4. sqrt-unprod24.3%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
    6. Applied egg-rr24.3%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def34.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
      2. expm1-log1p35.8%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
    8. Simplified35.8%

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

      \[\leadsto \sqrt{\color{blue}{\frac{{d}^{2}}{\ell \cdot h}}} \]
    10. Step-by-step derivation
      1. unpow230.7%

        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{\ell \cdot h}} \]
      2. *-commutative30.7%

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \]
    11. Simplified30.7%

      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \]
    12. Step-by-step derivation
      1. sqrt-div37.4%

        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    13. Applied egg-rr37.4%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    14. Step-by-step derivation
      1. rem-sqrt-square52.0%

        \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \]
    15. Simplified52.0%

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

    if 3.79999999999999971e-36 < M

    1. Initial program 69.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. metadata-eval69.7%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div41.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\left(\sqrt{d} \cdot \frac{1}{\sqrt{\ell}}\right)}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r/41.3%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    8. Step-by-step derivation
      1. pow141.3%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\frac{d \cdot d}{h \cdot \ell}} \cdot \left(1 - {\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\right)}^{1}} \]
    10. Step-by-step derivation
      1. unpow148.1%

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

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - {\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      3. associate-*r/51.0%

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

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

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\left(\left(-{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
      7. distribute-rgt-neg-in58.2%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(\color{blue}{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)} + 1\right) \]
      8. fma-def58.2%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\mathsf{fma}\left({\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2}, -0.5 \cdot \frac{h}{\ell}, 1\right)} \]
    11. Simplified58.2%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left({\left(\frac{D}{\frac{d}{M \cdot 0.5}}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)} \]
    12. Taylor expanded in D around 0 35.8%

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\left(-0.125 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2} \cdot \ell} + 1\right)} \]
      2. fma-def35.8%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\mathsf{fma}\left(-0.125, \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2} \cdot \ell}, 1\right)} \]
      3. times-frac35.6%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, \color{blue}{\frac{{D}^{2}}{{d}^{2}} \cdot \frac{h \cdot {M}^{2}}{\ell}}, 1\right) \]
      4. unpow235.6%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, \frac{\color{blue}{D \cdot D}}{{d}^{2}} \cdot \frac{h \cdot {M}^{2}}{\ell}, 1\right) \]
      5. unpow235.6%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, \frac{D \cdot D}{\color{blue}{d \cdot d}} \cdot \frac{h \cdot {M}^{2}}{\ell}, 1\right) \]
      6. times-frac48.9%

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

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, {\left(\frac{D}{d}\right)}^{2} \cdot \frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}, 1\right) \]
      9. associate-*r*49.0%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, {\left(\frac{D}{d}\right)}^{2} \cdot \frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}, 1\right) \]
      10. associate-/l*50.5%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, {\left(\frac{D}{d}\right)}^{2} \cdot \color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}, 1\right) \]
      11. fma-def50.5%

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(\color{blue}{\left({\left(\frac{D}{d}\right)}^{2} \cdot \frac{h \cdot M}{\frac{\ell}{M}}\right) \cdot -0.125} + 1\right) \]
      13. associate-*r*50.5%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(\color{blue}{{\left(\frac{D}{d}\right)}^{2} \cdot \left(\frac{h \cdot M}{\frac{\ell}{M}} \cdot -0.125\right)} + 1\right) \]
      14. +-commutative50.5%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\left(1 + {\left(\frac{D}{d}\right)}^{2} \cdot \left(\frac{h \cdot M}{\frac{\ell}{M}} \cdot -0.125\right)\right)} \]
      15. associate-*r*50.5%

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 + \color{blue}{-0.125 \cdot \left({\left(\frac{D}{d}\right)}^{2} \cdot \frac{h \cdot M}{\frac{\ell}{M}}\right)}\right) \]
    14. Simplified35.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 3.8 \cdot 10^{-36}:\\ \;\;\;\;\frac{\left|d\right|}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 + -0.125 \cdot \left(\frac{D \cdot D}{d \cdot d} \cdot \frac{M \cdot M}{\frac{\ell}{h}}\right)\right)\\ \end{array} \]

Alternative 8: 44.4% accurate, 2.5× speedup?

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

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

\mathbf{elif}\;\ell \leq -4.8 \cdot 10^{-40}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;\ell \leq -3.3 \cdot 10^{-245}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;\ell \leq 1.5 \cdot 10^{-108}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -5.2e96 or -4.79999999999999982e-40 < l < -3.3000000000000001e-245

    1. Initial program 60.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. metadata-eval60.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative38.5%

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(\frac{{D}^{2}}{{d}^{2}} \cdot \frac{{M}^{2} \cdot h}{\ell}\right)} \cdot 0.125\right) \]
      4. *-commutative39.7%

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell} \cdot 0.125\right)\right) \]
      10. associate-*r*53.3%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell} \cdot 0.125\right)\right) \]
    6. Simplified53.3%

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{\left(h \cdot M\right) \cdot M}{\ell} \cdot 0.125\right)}\right) \]
    7. Step-by-step derivation
      1. clear-num52.1%

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

        \[\leadsto \left(\color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{h}{d}}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{\left(h \cdot M\right) \cdot M}{\ell} \cdot 0.125\right)\right) \]
      3. metadata-eval53.7%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg58.3%

        \[\leadsto \color{blue}{-d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative58.3%

        \[\leadsto -\color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
      3. distribute-rgt-neg-in58.3%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)} \]
      4. associate-/r*58.6%

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

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

    if -5.2e96 < l < -4.79999999999999982e-40 or -3.3000000000000001e-245 < l < 1.49999999999999996e-108

    1. Initial program 76.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. metadata-eval76.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. sqrt-div42.0%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\left(\sqrt{d} \cdot \frac{1}{\sqrt{\ell}}\right)}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r/42.0%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{\sqrt{d} \cdot 1}{\sqrt{\ell}}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      2. *-rgt-identity42.0%

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
    8. Step-by-step derivation
      1. pow142.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\frac{d \cdot d}{h \cdot \ell}} \cdot \left(1 - {\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\right)}^{1}} \]
    10. Step-by-step derivation
      1. unpow155.3%

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

        \[\leadsto \sqrt{\color{blue}{\frac{d}{h} \cdot \frac{d}{\ell}}} \cdot \left(1 - {\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \]
      3. associate-*r/63.2%

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

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

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\left(\left(-{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) + 1\right)} \]
      7. distribute-rgt-neg-in69.2%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(\color{blue}{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(-0.5 \cdot \frac{h}{\ell}\right)} + 1\right) \]
      8. fma-def69.2%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\mathsf{fma}\left({\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2}, -0.5 \cdot \frac{h}{\ell}, 1\right)} \]
    11. Simplified68.1%

      \[\leadsto \color{blue}{\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left({\left(\frac{D}{\frac{d}{M \cdot 0.5}}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)} \]
    12. Taylor expanded in D around 0 53.3%

      \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\left(1 + -0.125 \cdot \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2} \cdot \ell}\right)} \]
    13. Step-by-step derivation
      1. +-commutative53.3%

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\mathsf{fma}\left(-0.125, \frac{{D}^{2} \cdot \left(h \cdot {M}^{2}\right)}{{d}^{2} \cdot \ell}, 1\right)} \]
      3. times-frac55.6%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, \color{blue}{\frac{{D}^{2}}{{d}^{2}} \cdot \frac{h \cdot {M}^{2}}{\ell}}, 1\right) \]
      4. unpow255.6%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, \frac{\color{blue}{D \cdot D}}{{d}^{2}} \cdot \frac{h \cdot {M}^{2}}{\ell}, 1\right) \]
      5. unpow255.6%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, \frac{D \cdot D}{\color{blue}{d \cdot d}} \cdot \frac{h \cdot {M}^{2}}{\ell}, 1\right) \]
      6. times-frac65.1%

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, \color{blue}{{\left(\frac{D}{d}\right)}^{2}} \cdot \frac{h \cdot {M}^{2}}{\ell}, 1\right) \]
      8. unpow265.1%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, {\left(\frac{D}{d}\right)}^{2} \cdot \frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell}, 1\right) \]
      9. associate-*r*65.8%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, {\left(\frac{D}{d}\right)}^{2} \cdot \frac{\color{blue}{\left(h \cdot M\right) \cdot M}}{\ell}, 1\right) \]
      10. associate-/l*68.1%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \mathsf{fma}\left(-0.125, {\left(\frac{D}{d}\right)}^{2} \cdot \color{blue}{\frac{h \cdot M}{\frac{\ell}{M}}}, 1\right) \]
      11. fma-def68.1%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\left(-0.125 \cdot \left({\left(\frac{D}{d}\right)}^{2} \cdot \frac{h \cdot M}{\frac{\ell}{M}}\right) + 1\right)} \]
      12. *-commutative68.1%

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(\color{blue}{\left({\left(\frac{D}{d}\right)}^{2} \cdot \frac{h \cdot M}{\frac{\ell}{M}}\right) \cdot -0.125} + 1\right) \]
      13. associate-*r*68.1%

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \color{blue}{\left(1 + {\left(\frac{D}{d}\right)}^{2} \cdot \left(\frac{h \cdot M}{\frac{\ell}{M}} \cdot -0.125\right)\right)} \]
      15. associate-*r*68.1%

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

        \[\leadsto \sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 + \color{blue}{-0.125 \cdot \left({\left(\frac{D}{d}\right)}^{2} \cdot \frac{h \cdot M}{\frac{\ell}{M}}\right)}\right) \]
    14. Simplified51.7%

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

    if 1.49999999999999996e-108 < l

    1. Initial program 60.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. metadata-eval60.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*59.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative57.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv57.9%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{D}{d} \cdot \color{blue}{\left(M \cdot \frac{1}{2}\right)}\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      12. metadata-eval57.9%

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/60.3%

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(\frac{D}{d} \cdot \frac{M}{\color{blue}{2}}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      7. times-frac61.5%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity62.6%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{M \cdot 0.5}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      13. *-commutative62.6%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification52.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -5.2 \cdot 10^{+96}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;\ell \leq -4.8 \cdot 10^{-40}:\\ \;\;\;\;\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 + -0.125 \cdot \left(\frac{D \cdot D}{d \cdot d} \cdot \frac{M \cdot M}{\frac{\ell}{h}}\right)\right)\\ \mathbf{elif}\;\ell \leq -3.3 \cdot 10^{-245}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;\ell \leq 1.5 \cdot 10^{-108}:\\ \;\;\;\;\sqrt{\frac{\frac{d}{h}}{\frac{\ell}{d}}} \cdot \left(1 + -0.125 \cdot \left(\frac{D \cdot D}{d \cdot d} \cdot \frac{M \cdot M}{\frac{\ell}{h}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \end{array} \]

Alternative 9: 42.7% accurate, 3.0× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{h \cdot \ell}}\\
\mathbf{if}\;d \leq 8 \cdot 10^{-167}:\\
\;\;\;\;\left(-d\right) \cdot t_0\\

\mathbf{else}:\\
\;\;\;\;d \cdot t_0\\


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

    1. Initial program 62.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. associate-*l*62.1%

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. unpow1/262.1%

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
      10. distribute-rgt-neg-in62.1%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
    4. Taylor expanded in M around 0 35.8%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{1}\right) \]
    5. Step-by-step derivation
      1. *-rgt-identity35.8%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. expm1-log1p-u34.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
      3. expm1-udef23.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
      4. sqrt-unprod21.1%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
    6. Applied egg-rr21.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def30.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
      2. expm1-log1p30.7%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
    8. Simplified30.7%

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

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg44.3%

        \[\leadsto \color{blue}{-d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative44.3%

        \[\leadsto -\color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
      3. distribute-rgt-neg-in44.3%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)} \]
      4. *-commutative44.3%

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

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

    if 8.00000000000000002e-167 < d

    1. Initial program 70.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. metadata-eval70.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*71.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/74.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity73.4%

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 8 \cdot 10^{-167}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \end{array} \]

Alternative 10: 42.8% accurate, 3.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;d \leq 8 \cdot 10^{-167}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\

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


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

    1. Initial program 62.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. metadata-eval62.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{0.125 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\ell \cdot {d}^{2}}}\right) \]
    5. Step-by-step derivation
      1. *-commutative43.7%

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{D \cdot D}{\color{blue}{d \cdot d}} \cdot \left(\frac{h \cdot {M}^{2}}{\ell} \cdot 0.125\right)\right) \]
      8. times-frac56.6%

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{\ell} \cdot 0.125\right)\right) \]
      10. associate-*r*57.1%

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{\left(h \cdot M\right) \cdot M}{\ell} \cdot 0.125\right)}\right) \]
    7. Step-by-step derivation
      1. clear-num56.5%

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

        \[\leadsto \left(\color{blue}{\frac{\sqrt{1}}{\sqrt{\frac{h}{d}}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(\frac{\left(h \cdot M\right) \cdot M}{\ell} \cdot 0.125\right)\right) \]
      3. metadata-eval57.3%

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \]
    10. Step-by-step derivation
      1. mul-1-neg44.3%

        \[\leadsto \color{blue}{-d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. *-commutative44.3%

        \[\leadsto -\color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
      3. distribute-rgt-neg-in44.3%

        \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot \left(-d\right)} \]
      4. associate-/r*44.4%

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

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

    if 8.00000000000000002e-167 < d

    1. Initial program 70.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. metadata-eval70.3%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*71.2%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/74.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity73.4%

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 8 \cdot 10^{-167}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \end{array} \]

Alternative 11: 38.0% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;h \leq 1.7 \cdot 10^{-284}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= h 1.7e-284) (sqrt (* (/ d l) (/ d h))) (/ d (sqrt (* h l)))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (h <= 1.7e-284) {
		tmp = sqrt(((d / l) * (d / h)));
	} else {
		tmp = d / sqrt((h * 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) :: tmp
    if (h <= 1.7d-284) then
        tmp = sqrt(((d / l) * (d / h)))
    else
        tmp = d / sqrt((h * l))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (h <= 1.7e-284) {
		tmp = Math.sqrt(((d / l) * (d / h)));
	} else {
		tmp = d / Math.sqrt((h * l));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if h <= 1.7e-284:
		tmp = math.sqrt(((d / l) * (d / h)))
	else:
		tmp = d / math.sqrt((h * l))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (h <= 1.7e-284)
		tmp = sqrt(Float64(Float64(d / l) * Float64(d / h)));
	else
		tmp = Float64(d / sqrt(Float64(h * l)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (h <= 1.7e-284)
		tmp = sqrt(((d / l) * (d / h)));
	else
		tmp = d / sqrt((h * l));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[h, 1.7e-284], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;h \leq 1.7 \cdot 10^{-284}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if h < 1.69999999999999996e-284

    1. Initial program 65.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. associate-*l*65.2%

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. unpow1/265.2%

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
      10. distribute-rgt-neg-in65.2%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
    4. Taylor expanded in M around 0 43.9%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{1}\right) \]
    5. Step-by-step derivation
      1. *-rgt-identity43.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. expm1-log1p-u42.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
      3. expm1-udef29.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
      4. sqrt-unprod26.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
    6. Applied egg-rr26.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def36.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
      2. expm1-log1p37.7%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
    8. Simplified37.7%

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

    if 1.69999999999999996e-284 < h

    1. Initial program 65.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. associate-*l*65.2%

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. unpow1/265.2%

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
      10. distribute-rgt-neg-in65.2%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
    4. Taylor expanded in M around 0 34.0%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. expm1-log1p-u33.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
      3. expm1-udef21.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
      4. sqrt-unprod18.4%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
    6. Applied egg-rr18.4%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def27.4%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
      2. expm1-log1p28.1%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
    8. Simplified28.1%

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

      \[\leadsto \sqrt{\color{blue}{\frac{{d}^{2}}{\ell \cdot h}}} \]
    10. Step-by-step derivation
      1. unpow223.5%

        \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{\ell \cdot h}} \]
      2. *-commutative23.5%

        \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \]
    11. Simplified23.5%

      \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \]
    12. Step-by-step derivation
      1. sqrt-div29.5%

        \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    13. Applied egg-rr29.5%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
    14. Step-by-step derivation
      1. rem-sqrt-square42.2%

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

        \[\leadsto \frac{\left|\color{blue}{{d}^{1}}\right|}{\sqrt{h \cdot \ell}} \]
      3. sqr-pow42.1%

        \[\leadsto \frac{\left|\color{blue}{{d}^{\left(\frac{1}{2}\right)} \cdot {d}^{\left(\frac{1}{2}\right)}}\right|}{\sqrt{h \cdot \ell}} \]
      4. fabs-sqr42.1%

        \[\leadsto \frac{\color{blue}{{d}^{\left(\frac{1}{2}\right)} \cdot {d}^{\left(\frac{1}{2}\right)}}}{\sqrt{h \cdot \ell}} \]
      5. sqr-pow42.2%

        \[\leadsto \frac{\color{blue}{{d}^{1}}}{\sqrt{h \cdot \ell}} \]
      6. unpow142.2%

        \[\leadsto \frac{\color{blue}{d}}{\sqrt{h \cdot \ell}} \]
    15. Simplified42.2%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq 1.7 \cdot 10^{-284}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]

Alternative 12: 38.0% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;h \leq 5.8 \cdot 10^{-284}:\\ \;\;\;\;\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 (<= h 5.8e-284) (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 (h <= 5.8e-284) {
		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 (h <= 5.8d-284) 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 (h <= 5.8e-284) {
		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 h <= 5.8e-284:
		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 (h <= 5.8e-284)
		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 (h <= 5.8e-284)
		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[h, 5.8e-284], 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}\;h \leq 5.8 \cdot 10^{-284}:\\
\;\;\;\;\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 h < 5.8000000000000002e-284

    1. Initial program 65.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. associate-*l*65.2%

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. unpow1/265.2%

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
      10. distribute-rgt-neg-in65.2%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
    4. Taylor expanded in M around 0 43.9%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{1}\right) \]
    5. Step-by-step derivation
      1. *-rgt-identity43.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. expm1-log1p-u42.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
      3. expm1-udef29.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
      4. sqrt-unprod26.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
    6. Applied egg-rr26.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def36.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
      2. expm1-log1p37.7%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
    8. Simplified37.7%

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

    if 5.8000000000000002e-284 < h

    1. Initial program 65.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. metadata-eval65.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*64.4%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
      6. un-div-inv64.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative63.6%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv63.6%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/66.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity66.1%

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    9. Step-by-step derivation
      1. *-commutative42.3%

        \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{\ell \cdot h}}} \]
      2. associate-/r*42.2%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
    10. Simplified42.2%

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq 5.8 \cdot 10^{-284}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]

Alternative 13: 37.8% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;h \leq 9.2 \cdot 10^{-281}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= h 9.2e-281) (sqrt (* (/ d l) (/ d h))) (* d (sqrt (/ 1.0 (* h l))))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (h <= 9.2e-281) {
		tmp = sqrt(((d / l) * (d / h)));
	} else {
		tmp = d * sqrt((1.0 / (h * 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) :: tmp
    if (h <= 9.2d-281) then
        tmp = sqrt(((d / l) * (d / h)))
    else
        tmp = d * sqrt((1.0d0 / (h * l)))
    end if
    code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (h <= 9.2e-281) {
		tmp = Math.sqrt(((d / l) * (d / h)));
	} else {
		tmp = d * Math.sqrt((1.0 / (h * l)));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if h <= 9.2e-281:
		tmp = math.sqrt(((d / l) * (d / h)))
	else:
		tmp = d * math.sqrt((1.0 / (h * l)))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (h <= 9.2e-281)
		tmp = sqrt(Float64(Float64(d / l) * Float64(d / h)));
	else
		tmp = Float64(d * sqrt(Float64(1.0 / Float64(h * l))));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (h <= 9.2e-281)
		tmp = sqrt(((d / l) * (d / h)));
	else
		tmp = d * sqrt((1.0 / (h * l)));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[h, 9.2e-281], N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(d * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;h \leq 9.2 \cdot 10^{-281}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if h < 9.19999999999999956e-281

    1. Initial program 65.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. associate-*l*65.2%

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
      5. unpow1/265.2%

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
      10. distribute-rgt-neg-in65.2%

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
    4. Taylor expanded in M around 0 43.9%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{1}\right) \]
    5. Step-by-step derivation
      1. *-rgt-identity43.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
      2. expm1-log1p-u42.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
      3. expm1-udef29.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
      4. sqrt-unprod26.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
    6. Applied egg-rr26.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
    7. Step-by-step derivation
      1. expm1-def36.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
      2. expm1-log1p37.7%

        \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
    8. Simplified37.7%

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

    if 9.19999999999999956e-281 < h

    1. Initial program 65.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. metadata-eval65.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*64.4%

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \color{blue}{\frac{1}{\frac{\ell}{h}}}\right) \]
      6. un-div-inv64.4%

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      10. *-commutative63.6%

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\color{blue}{\left(\frac{D}{d} \cdot \frac{M}{2}\right)}}^{2} \cdot 0.5}{\frac{\ell}{h}}\right) \]
      11. div-inv63.6%

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

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

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \color{blue}{\frac{{\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot 0.5}{\frac{\ell}{h}}}\right) \]
    6. Step-by-step derivation
      1. associate-/r/66.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - h \cdot \frac{{\left(D \cdot \frac{\color{blue}{\frac{M \cdot 0.5}{1}}}{d}\right)}^{2}}{\frac{\ell}{0.5}}\right) \]
      12. /-rgt-identity66.1%

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq 9.2 \cdot 10^{-281}:\\ \;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \end{array} \]

Alternative 14: 27.0% accurate, 3.2× speedup?

\[\begin{array}{l} \\ \frac{d}{\sqrt{h \cdot \ell}} \end{array} \]
(FPCore (d h l M D) :precision binary64 (/ d (sqrt (* h l))))
double code(double d, double h, double l, double M, double D) {
	return d / sqrt((h * l));
}
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((h * l))
end function
public static double code(double d, double h, double l, double M, double D) {
	return d / Math.sqrt((h * l));
}
def code(d, h, l, M, D):
	return d / math.sqrt((h * l))
function code(d, h, l, M, D)
	return Float64(d / sqrt(Float64(h * l)))
end
function tmp = code(d, h, l, M, D)
	tmp = d / sqrt((h * l));
end
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{d}{\sqrt{h \cdot \ell}}
\end{array}
Derivation
  1. Initial program 65.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. associate-*l*65.2%

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

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

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

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\color{blue}{0.5}} \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\right) \]
    5. unpow1/265.2%

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

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

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

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

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(\left(-\color{blue}{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \left(\frac{1}{2} \cdot \frac{h}{\ell}\right)}\right) + 1\right)\right) \]
    10. distribute-rgt-neg-in65.2%

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

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

    \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(M \cdot \frac{\frac{D}{d}}{2}\right)}^{2}, \frac{-0.5}{\frac{\ell}{h}}, 1\right)\right)} \]
  4. Taylor expanded in M around 0 39.0%

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

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\frac{d}{\ell}}} \]
    2. expm1-log1p-u37.9%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\right)} \]
    3. expm1-udef25.9%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)} - 1} \]
    4. sqrt-unprod22.6%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}}\right)} - 1 \]
  6. Applied egg-rr22.6%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)} - 1} \]
  7. Step-by-step derivation
    1. expm1-def32.2%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\right)\right)} \]
    2. expm1-log1p33.0%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}} \]
  8. Simplified33.0%

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

    \[\leadsto \sqrt{\color{blue}{\frac{{d}^{2}}{\ell \cdot h}}} \]
  10. Step-by-step derivation
    1. unpow227.7%

      \[\leadsto \sqrt{\frac{\color{blue}{d \cdot d}}{\ell \cdot h}} \]
    2. *-commutative27.7%

      \[\leadsto \sqrt{\frac{d \cdot d}{\color{blue}{h \cdot \ell}}} \]
  11. Simplified27.7%

    \[\leadsto \sqrt{\color{blue}{\frac{d \cdot d}{h \cdot \ell}}} \]
  12. Step-by-step derivation
    1. sqrt-div33.4%

      \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
  13. Applied egg-rr33.4%

    \[\leadsto \color{blue}{\frac{\sqrt{d \cdot d}}{\sqrt{h \cdot \ell}}} \]
  14. Step-by-step derivation
    1. rem-sqrt-square46.7%

      \[\leadsto \frac{\color{blue}{\left|d\right|}}{\sqrt{h \cdot \ell}} \]
    2. unpow146.7%

      \[\leadsto \frac{\left|\color{blue}{{d}^{1}}\right|}{\sqrt{h \cdot \ell}} \]
    3. sqr-pow21.5%

      \[\leadsto \frac{\left|\color{blue}{{d}^{\left(\frac{1}{2}\right)} \cdot {d}^{\left(\frac{1}{2}\right)}}\right|}{\sqrt{h \cdot \ell}} \]
    4. fabs-sqr21.5%

      \[\leadsto \frac{\color{blue}{{d}^{\left(\frac{1}{2}\right)} \cdot {d}^{\left(\frac{1}{2}\right)}}}{\sqrt{h \cdot \ell}} \]
    5. sqr-pow25.8%

      \[\leadsto \frac{\color{blue}{{d}^{1}}}{\sqrt{h \cdot \ell}} \]
    6. unpow125.8%

      \[\leadsto \frac{\color{blue}{d}}{\sqrt{h \cdot \ell}} \]
  15. Simplified25.8%

    \[\leadsto \color{blue}{\frac{d}{\sqrt{h \cdot \ell}}} \]
  16. Final simplification25.8%

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

Reproduce

?
herbie shell --seed 2023252 
(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)))))