Henrywood and Agarwal, Equation (12)

Percentage Accurate: 67.0% → 81.4%
Time: 23.6s
Alternatives: 16
Speedup: 1.0×

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

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

Initial Program: 67.0% 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: 81.4% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -1.034e217

    1. Initial program 44.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. Simplified44.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.034e217 < l < -1.999999999999994e-310

    1. Initial program 74.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. Simplified74.3%

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

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

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

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

    if -1.999999999999994e-310 < l

    1. Initial program 62.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. Simplified61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 81.3% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 69.4%

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

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

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

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

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

    if -1.999999999999994e-310 < l

    1. Initial program 62.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. Simplified61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.5% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 69.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. Simplified67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000015e-285 < d < 2.7999999999999998e-224

    1. Initial program 33.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. Simplified33.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125} \cdot \left(D \cdot \frac{M}{\sqrt{d}}\right)\right)}^{2}} \]
    12. Step-by-step derivation
      1. unpow20.0%

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

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

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

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

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

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

    if 2.7999999999999998e-224 < d

    1. Initial program 64.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. Simplified63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -4.9999999999999997e174

    1. Initial program 39.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. Simplified39.3%

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

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

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

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

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

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

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt2.0%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\left(-\sqrt{\frac{d}{\ell}}\right) \cdot \left(-\sqrt{\frac{d}{\ell}}\right)}} \]
      3. sqr-neg40.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{\ell}}}} \]
      4. add-sqr-sqrt40.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}} \]
      5. frac-2neg40.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{-d}{-\ell}}} \]
      6. sqrt-div57.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}} \]
    8. Applied egg-rr57.9%

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

    if -4.9999999999999997e174 < l < -1.999999999999994e-310

    1. Initial program 77.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < l

    1. Initial program 62.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. Simplified61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 77.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -1.3e172

    1. Initial program 39.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. Simplified39.3%

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

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

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

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

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

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

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt2.0%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\left(-\sqrt{\frac{d}{\ell}}\right) \cdot \left(-\sqrt{\frac{d}{\ell}}\right)}} \]
      3. sqr-neg40.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{\ell}}}} \]
      4. add-sqr-sqrt40.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}} \]
      5. frac-2neg40.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{-d}{-\ell}}} \]
      6. sqrt-div57.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}} \]
    8. Applied egg-rr57.9%

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

    if -1.3e172 < l < -1.999999999999994e-310

    1. Initial program 77.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < l

    1. Initial program 62.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. Simplified61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 72.7% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -2.90000000000000017e72

    1. Initial program 53.8%

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

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{-1} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      4. mul-1-neg2.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    6. Simplified2.9%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt1.3%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\left(-\sqrt{\frac{d}{\ell}}\right) \cdot \left(-\sqrt{\frac{d}{\ell}}\right)}} \]
      3. sqr-neg46.3%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{\ell}}}} \]
      4. add-sqr-sqrt46.3%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{-d}{-\ell}}} \]
      6. sqrt-div57.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}} \]
    8. Applied egg-rr57.6%

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

    if -2.90000000000000017e72 < l < -1.999999999999994e-310

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < l

    1. Initial program 62.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. Simplified61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 62.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -8.3 \cdot 10^{+67}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\\

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

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -8.299999999999999e67

    1. Initial program 53.8%

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

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

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

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

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{-1} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      4. mul-1-neg2.9%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    6. Simplified2.9%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt1.3%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\sqrt{\left(-\sqrt{\frac{d}{\ell}}\right) \cdot \left(-\sqrt{\frac{d}{\ell}}\right)}} \]
      3. sqr-neg46.3%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{\ell}}}} \]
      4. add-sqr-sqrt46.3%

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

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \sqrt{\color{blue}{\frac{-d}{-\ell}}} \]
      6. sqrt-div57.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}} \]
    8. Applied egg-rr57.6%

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

    if -8.299999999999999e67 < l < 5.6000000000000003e28

    1. Initial program 77.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. Simplified75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.6000000000000003e28 < l

    1. Initial program 49.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. Simplified47.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. Step-by-step derivation
      1. associate-/r*59.2%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
      2. associate-/r*58.2%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      3. unpow-158.2%

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

        \[\leadsto d \cdot \sqrt{{\left(h \cdot \ell\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}} \]
      5. pow-sqr58.2%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-0.5} \cdot {\left(h \cdot \ell\right)}^{-0.5}}} \]
      6. rem-sqrt-square58.2%

        \[\leadsto d \cdot \color{blue}{\left|{\left(h \cdot \ell\right)}^{-0.5}\right|} \]
      7. rem-square-sqrt57.9%

        \[\leadsto d \cdot \left|\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right| \]
      8. fabs-sqr57.9%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}\right)} \]
      9. rem-square-sqrt58.2%

        \[\leadsto d \cdot \color{blue}{{\left(h \cdot \ell\right)}^{-0.5}} \]
    8. Simplified58.2%

      \[\leadsto \color{blue}{d \cdot {\left(h \cdot \ell\right)}^{-0.5}} \]
    9. Taylor expanded in h around -inf 0.0%

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    10. Step-by-step derivation
      1. associate-*l*0.0%

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

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

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

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

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

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

        \[\leadsto d \cdot \left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}}\right) \]
      8. pow-sqr6.5%

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right) \]
      9. rem-sqrt-square6.5%

        \[\leadsto d \cdot \left(-\color{blue}{\left|{\left(\ell \cdot h\right)}^{-0.5}\right|}\right) \]
      10. +-rgt-identity6.5%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(\ell \cdot h + 0\right)}}^{-0.5}\right|\right) \]
      11. metadata-eval6.5%

        \[\leadsto d \cdot \left(-\left|{\left(\ell \cdot h + \color{blue}{\left(1 + -1\right)}\right)}^{-0.5}\right|\right) \]
      12. associate-+l+12.0%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(\left(\ell \cdot h + 1\right) + -1\right)}}^{-0.5}\right|\right) \]
      13. fma-undefine12.0%

        \[\leadsto d \cdot \left(-\left|{\left(\color{blue}{\mathsf{fma}\left(\ell, h, 1\right)} + -1\right)}^{-0.5}\right|\right) \]
      14. +-commutative12.0%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}}^{-0.5}\right|\right) \]
      15. rem-square-sqrt12.0%

        \[\leadsto d \cdot \left(-\left|\color{blue}{\sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}} \cdot \sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}}\right|\right) \]
      16. fabs-sqr12.0%

        \[\leadsto d \cdot \left(-\color{blue}{\sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}} \cdot \sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}}\right) \]
      17. rem-square-sqrt12.0%

        \[\leadsto d \cdot \left(-\color{blue}{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}\right) \]
    11. Simplified6.5%

      \[\leadsto \color{blue}{d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
    12. Step-by-step derivation
      1. add-sqr-sqrt3.5%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{-{\left(\ell \cdot h\right)}^{-0.5}} \cdot \sqrt{-{\left(\ell \cdot h\right)}^{-0.5}}\right)} \]
      2. sqrt-unprod58.2%

        \[\leadsto d \cdot \color{blue}{\sqrt{\left(-{\left(\ell \cdot h\right)}^{-0.5}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)}} \]
      3. add-sqr-sqrt58.0%

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

        \[\leadsto d \cdot \sqrt{\left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      5. pow-prod-up58.2%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(-0.5 + -0.5\right)}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      6. metadata-eval58.2%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{\frac{1}{\ell \cdot h}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      8. associate-/l/58.1%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      9. add-cbrt-cube34.7%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{\color{blue}{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      11. add-sqr-sqrt34.7%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right)} \]
      13. pow-prod-up34.7%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(-0.5 + -0.5\right)}}}\right)} \]
      14. metadata-eval34.7%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{-1}}}\right)} \]
      15. inv-pow34.7%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\frac{1}{\ell \cdot h}}}\right)} \]
      16. associate-/l/34.7%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}}\right)} \]
      17. add-cbrt-cube34.7%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\sqrt[3]{\left(\frac{\frac{1}{h}}{\ell} \cdot \frac{\frac{1}{h}}{\ell}\right) \cdot \frac{\frac{1}{h}}{\ell}}}}\right)} \]
      18. unpow334.7%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\sqrt[3]{\color{blue}{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}}\right)} \]
    13. Applied egg-rr66.3%

      \[\leadsto d \cdot \color{blue}{\frac{{h}^{-0.5}}{\sqrt{\ell}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.9%

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

Alternative 8: 62.7% accurate, 1.4× speedup?

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

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

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

\mathbf{elif}\;d \leq 1.7 \cdot 10^{+90}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < 2.00000000000000015e-285 or 2.54999999999999995e-133 < d < 1.70000000000000009e90

    1. Initial program 75.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. Simplified73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000015e-285 < d < 2.54999999999999995e-133

    1. Initial program 36.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. Simplified34.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.70000000000000009e90 < d

    1. Initial program 55.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. Simplified55.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. Step-by-step derivation
      1. associate-/r*75.3%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
      2. associate-/r*74.8%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      3. unpow-174.8%

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

        \[\leadsto d \cdot \sqrt{{\left(h \cdot \ell\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}} \]
      5. pow-sqr74.8%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-0.5} \cdot {\left(h \cdot \ell\right)}^{-0.5}}} \]
      6. rem-sqrt-square74.8%

        \[\leadsto d \cdot \color{blue}{\left|{\left(h \cdot \ell\right)}^{-0.5}\right|} \]
      7. rem-square-sqrt74.4%

        \[\leadsto d \cdot \left|\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right| \]
      8. fabs-sqr74.4%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}\right)} \]
      9. rem-square-sqrt74.8%

        \[\leadsto d \cdot \color{blue}{{\left(h \cdot \ell\right)}^{-0.5}} \]
    8. Simplified74.8%

      \[\leadsto \color{blue}{d \cdot {\left(h \cdot \ell\right)}^{-0.5}} \]
    9. Taylor expanded in h around -inf 0.0%

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    10. Step-by-step derivation
      1. associate-*l*0.0%

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

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

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

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

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

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

        \[\leadsto d \cdot \left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}}\right) \]
      8. pow-sqr5.4%

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right) \]
      9. rem-sqrt-square5.4%

        \[\leadsto d \cdot \left(-\color{blue}{\left|{\left(\ell \cdot h\right)}^{-0.5}\right|}\right) \]
      10. +-rgt-identity5.4%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(\ell \cdot h + 0\right)}}^{-0.5}\right|\right) \]
      11. metadata-eval5.4%

        \[\leadsto d \cdot \left(-\left|{\left(\ell \cdot h + \color{blue}{\left(1 + -1\right)}\right)}^{-0.5}\right|\right) \]
      12. associate-+l+12.5%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(\left(\ell \cdot h + 1\right) + -1\right)}}^{-0.5}\right|\right) \]
      13. fma-undefine12.5%

        \[\leadsto d \cdot \left(-\left|{\left(\color{blue}{\mathsf{fma}\left(\ell, h, 1\right)} + -1\right)}^{-0.5}\right|\right) \]
      14. +-commutative12.5%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}}^{-0.5}\right|\right) \]
      15. rem-square-sqrt12.5%

        \[\leadsto d \cdot \left(-\left|\color{blue}{\sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}} \cdot \sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}}\right|\right) \]
      16. fabs-sqr12.5%

        \[\leadsto d \cdot \left(-\color{blue}{\sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}} \cdot \sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}}\right) \]
      17. rem-square-sqrt12.5%

        \[\leadsto d \cdot \left(-\color{blue}{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}\right) \]
    11. Simplified5.4%

      \[\leadsto \color{blue}{d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
    12. Step-by-step derivation
      1. add-sqr-sqrt0.2%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{-{\left(\ell \cdot h\right)}^{-0.5}} \cdot \sqrt{-{\left(\ell \cdot h\right)}^{-0.5}}\right)} \]
      2. sqrt-unprod74.8%

        \[\leadsto d \cdot \color{blue}{\sqrt{\left(-{\left(\ell \cdot h\right)}^{-0.5}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)}} \]
      3. add-sqr-sqrt74.6%

        \[\leadsto d \cdot \sqrt{\left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5}} \cdot \sqrt{{\left(\ell \cdot h\right)}^{-0.5}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      4. sqrt-unprod74.8%

        \[\leadsto d \cdot \sqrt{\left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      5. pow-prod-up74.8%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(-0.5 + -0.5\right)}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      6. metadata-eval74.8%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{-1}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      7. inv-pow74.8%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{\frac{1}{\ell \cdot h}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      8. associate-/l/74.7%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      9. add-cbrt-cube34.5%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{\color{blue}{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      11. add-sqr-sqrt34.4%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right)} \]
      13. pow-prod-up34.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(-0.5 + -0.5\right)}}}\right)} \]
      14. metadata-eval34.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{-1}}}\right)} \]
      15. inv-pow34.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\frac{1}{\ell \cdot h}}}\right)} \]
      16. associate-/l/34.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}}\right)} \]
      17. add-cbrt-cube34.4%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\sqrt[3]{\color{blue}{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}}\right)} \]
    13. Applied egg-rr80.3%

      \[\leadsto d \cdot \color{blue}{\frac{{h}^{-0.5}}{\sqrt{\ell}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.3%

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

Alternative 9: 49.1% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;d \leq 2.7 \cdot 10^{-282}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

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

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\


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

    1. Initial program 69.0%

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

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

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

    if 2.69999999999999982e-282 < d < 5.2000000000000004e-29

    1. Initial program 56.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. Simplified54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2000000000000004e-29 < d

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. Step-by-step derivation
      1. associate-/r*62.9%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
      2. associate-/r*62.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      3. unpow-162.0%

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

        \[\leadsto d \cdot \sqrt{{\left(h \cdot \ell\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}} \]
      5. pow-sqr62.0%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-0.5} \cdot {\left(h \cdot \ell\right)}^{-0.5}}} \]
      6. rem-sqrt-square62.0%

        \[\leadsto d \cdot \color{blue}{\left|{\left(h \cdot \ell\right)}^{-0.5}\right|} \]
      7. rem-square-sqrt61.6%

        \[\leadsto d \cdot \left|\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right| \]
      8. fabs-sqr61.6%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}\right)} \]
      9. rem-square-sqrt62.0%

        \[\leadsto d \cdot \color{blue}{{\left(h \cdot \ell\right)}^{-0.5}} \]
    8. Simplified62.0%

      \[\leadsto \color{blue}{d \cdot {\left(h \cdot \ell\right)}^{-0.5}} \]
    9. Taylor expanded in h around -inf 0.0%

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    10. Step-by-step derivation
      1. associate-*l*0.0%

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

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

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

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

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

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

        \[\leadsto d \cdot \left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}}\right) \]
      8. pow-sqr6.7%

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right) \]
      9. rem-sqrt-square6.7%

        \[\leadsto d \cdot \left(-\color{blue}{\left|{\left(\ell \cdot h\right)}^{-0.5}\right|}\right) \]
      10. +-rgt-identity6.7%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(\ell \cdot h + 0\right)}}^{-0.5}\right|\right) \]
      11. metadata-eval6.7%

        \[\leadsto d \cdot \left(-\left|{\left(\ell \cdot h + \color{blue}{\left(1 + -1\right)}\right)}^{-0.5}\right|\right) \]
      12. associate-+l+19.4%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(\left(\ell \cdot h + 1\right) + -1\right)}}^{-0.5}\right|\right) \]
      13. fma-undefine19.4%

        \[\leadsto d \cdot \left(-\left|{\left(\color{blue}{\mathsf{fma}\left(\ell, h, 1\right)} + -1\right)}^{-0.5}\right|\right) \]
      14. +-commutative19.4%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}}^{-0.5}\right|\right) \]
      15. rem-square-sqrt19.4%

        \[\leadsto d \cdot \left(-\left|\color{blue}{\sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}} \cdot \sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}}\right|\right) \]
      16. fabs-sqr19.4%

        \[\leadsto d \cdot \left(-\color{blue}{\sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}} \cdot \sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}}\right) \]
      17. rem-square-sqrt19.4%

        \[\leadsto d \cdot \left(-\color{blue}{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}\right) \]
    11. Simplified6.7%

      \[\leadsto \color{blue}{d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
    12. Step-by-step derivation
      1. add-sqr-sqrt0.2%

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

        \[\leadsto d \cdot \color{blue}{\sqrt{\left(-{\left(\ell \cdot h\right)}^{-0.5}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)}} \]
      3. add-sqr-sqrt61.8%

        \[\leadsto d \cdot \sqrt{\left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5}} \cdot \sqrt{{\left(\ell \cdot h\right)}^{-0.5}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      4. sqrt-unprod62.0%

        \[\leadsto d \cdot \sqrt{\left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      5. pow-prod-up62.0%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(-0.5 + -0.5\right)}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      6. metadata-eval62.0%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{-1}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      7. inv-pow62.0%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{\frac{1}{\ell \cdot h}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      8. associate-/l/61.9%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      9. add-cbrt-cube29.4%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{\color{blue}{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      11. add-sqr-sqrt29.4%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right)} \]
      13. pow-prod-up29.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(-0.5 + -0.5\right)}}}\right)} \]
      14. metadata-eval29.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{-1}}}\right)} \]
      15. inv-pow29.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\frac{1}{\ell \cdot h}}}\right)} \]
      16. associate-/l/29.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}}\right)} \]
      17. add-cbrt-cube29.4%

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

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

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

Alternative 10: 46.0% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;d \leq 4.9 \cdot 10^{-265}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (if (<= d 4.9e-265)
   (* (sqrt (/ d h)) (sqrt (/ d l)))
   (* d (/ (pow h -0.5) (sqrt l)))))
double code(double d, double h, double l, double M, double D) {
	double tmp;
	if (d <= 4.9e-265) {
		tmp = sqrt((d / h)) * sqrt((d / l));
	} else {
		tmp = d * (pow(h, -0.5) / sqrt(l));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: tmp
    if (d <= 4.9d-265) then
        tmp = sqrt((d / h)) * sqrt((d / l))
    else
        tmp = d * ((h ** (-0.5d0)) / sqrt(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 <= 4.9e-265) {
		tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
	} else {
		tmp = d * (Math.pow(h, -0.5) / Math.sqrt(l));
	}
	return tmp;
}
def code(d, h, l, M, D):
	tmp = 0
	if d <= 4.9e-265:
		tmp = math.sqrt((d / h)) * math.sqrt((d / l))
	else:
		tmp = d * (math.pow(h, -0.5) / math.sqrt(l))
	return tmp
function code(d, h, l, M, D)
	tmp = 0.0
	if (d <= 4.9e-265)
		tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l)));
	else
		tmp = Float64(d * Float64((h ^ -0.5) / sqrt(l)));
	end
	return tmp
end
function tmp_2 = code(d, h, l, M, D)
	tmp = 0.0;
	if (d <= 4.9e-265)
		tmp = sqrt((d / h)) * sqrt((d / l));
	else
		tmp = d * ((h ^ -0.5) / sqrt(l));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 4.9e-265], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;d \leq 4.9 \cdot 10^{-265}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\


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

    1. Initial program 68.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. Simplified65.6%

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

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

    if 4.89999999999999999e-265 < d

    1. Initial program 63.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. Simplified63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. Step-by-step derivation
      1. associate-/r*47.9%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
      2. associate-/r*47.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      3. unpow-147.4%

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

        \[\leadsto d \cdot \sqrt{{\left(h \cdot \ell\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}} \]
      5. pow-sqr47.4%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-0.5} \cdot {\left(h \cdot \ell\right)}^{-0.5}}} \]
      6. rem-sqrt-square47.4%

        \[\leadsto d \cdot \color{blue}{\left|{\left(h \cdot \ell\right)}^{-0.5}\right|} \]
      7. rem-square-sqrt47.2%

        \[\leadsto d \cdot \left|\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right| \]
      8. fabs-sqr47.2%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}\right)} \]
      9. rem-square-sqrt47.4%

        \[\leadsto d \cdot \color{blue}{{\left(h \cdot \ell\right)}^{-0.5}} \]
    8. Simplified47.4%

      \[\leadsto \color{blue}{d \cdot {\left(h \cdot \ell\right)}^{-0.5}} \]
    9. Taylor expanded in h around -inf 0.0%

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    10. Step-by-step derivation
      1. associate-*l*0.0%

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

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

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

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

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

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

        \[\leadsto d \cdot \left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}}\right) \]
      8. pow-sqr9.4%

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right) \]
      9. rem-sqrt-square9.4%

        \[\leadsto d \cdot \left(-\color{blue}{\left|{\left(\ell \cdot h\right)}^{-0.5}\right|}\right) \]
      10. +-rgt-identity9.4%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(\ell \cdot h + 0\right)}}^{-0.5}\right|\right) \]
      11. metadata-eval9.4%

        \[\leadsto d \cdot \left(-\left|{\left(\ell \cdot h + \color{blue}{\left(1 + -1\right)}\right)}^{-0.5}\right|\right) \]
      12. associate-+l+24.7%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(\left(\ell \cdot h + 1\right) + -1\right)}}^{-0.5}\right|\right) \]
      13. fma-undefine24.7%

        \[\leadsto d \cdot \left(-\left|{\left(\color{blue}{\mathsf{fma}\left(\ell, h, 1\right)} + -1\right)}^{-0.5}\right|\right) \]
      14. +-commutative24.7%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}}^{-0.5}\right|\right) \]
      15. rem-square-sqrt24.7%

        \[\leadsto d \cdot \left(-\left|\color{blue}{\sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}} \cdot \sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}}\right|\right) \]
      16. fabs-sqr24.7%

        \[\leadsto d \cdot \left(-\color{blue}{\sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}} \cdot \sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}}\right) \]
      17. rem-square-sqrt24.7%

        \[\leadsto d \cdot \left(-\color{blue}{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}\right) \]
    11. Simplified9.4%

      \[\leadsto \color{blue}{d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
    12. Step-by-step derivation
      1. add-sqr-sqrt1.8%

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

        \[\leadsto d \cdot \color{blue}{\sqrt{\left(-{\left(\ell \cdot h\right)}^{-0.5}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)}} \]
      3. add-sqr-sqrt47.3%

        \[\leadsto d \cdot \sqrt{\left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5}} \cdot \sqrt{{\left(\ell \cdot h\right)}^{-0.5}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      4. sqrt-unprod47.4%

        \[\leadsto d \cdot \sqrt{\left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      5. pow-prod-up47.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(-0.5 + -0.5\right)}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      6. metadata-eval47.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{-1}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      7. inv-pow47.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{\frac{1}{\ell \cdot h}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      8. associate-/l/47.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      9. add-cbrt-cube24.6%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{\color{blue}{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      11. add-sqr-sqrt24.6%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right)} \]
      13. pow-prod-up24.6%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(-0.5 + -0.5\right)}}}\right)} \]
      14. metadata-eval24.6%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{-1}}}\right)} \]
      15. inv-pow24.6%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\frac{1}{\ell \cdot h}}}\right)} \]
      16. associate-/l/24.6%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}}\right)} \]
      17. add-cbrt-cube24.6%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\sqrt[3]{\left(\frac{\frac{1}{h}}{\ell} \cdot \frac{\frac{1}{h}}{\ell}\right) \cdot \frac{\frac{1}{h}}{\ell}}}}\right)} \]
      18. unpow324.6%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\sqrt[3]{\color{blue}{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}}\right)} \]
    13. Applied egg-rr53.5%

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

Alternative 11: 47.2% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6 \cdot 10^{-218}:\\
\;\;\;\;\left(-d\right) \cdot {\left(\ell \cdot h\right)}^{-0.5}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 5.9999999999999997e-218

    1. Initial program 68.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. Simplified66.5%

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

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

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

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

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

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

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

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

        \[\leadsto d \cdot \left(-\sqrt{{\left(h \cdot \ell\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}}\right) \]
      7. pow-sqr41.2%

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-0.5} \cdot {\left(h \cdot \ell\right)}^{-0.5}}}\right) \]
      8. rem-sqrt-square41.4%

        \[\leadsto d \cdot \left(-\color{blue}{\left|{\left(h \cdot \ell\right)}^{-0.5}\right|}\right) \]
      9. rem-square-sqrt41.3%

        \[\leadsto d \cdot \left(-\left|\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right|\right) \]
      10. fabs-sqr41.3%

        \[\leadsto d \cdot \left(-\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right) \]
      11. rem-square-sqrt41.4%

        \[\leadsto d \cdot \left(-\color{blue}{{\left(h \cdot \ell\right)}^{-0.5}}\right) \]
    7. Simplified41.4%

      \[\leadsto \color{blue}{d \cdot \left(-{\left(h \cdot \ell\right)}^{-0.5}\right)} \]

    if 5.9999999999999997e-218 < l

    1. Initial program 63.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. Simplified61.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. Step-by-step derivation
      1. associate-/r*51.3%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}} \]
      2. associate-/r*50.8%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
      3. unpow-150.8%

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

        \[\leadsto d \cdot \sqrt{{\left(h \cdot \ell\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}} \]
      5. pow-sqr50.8%

        \[\leadsto d \cdot \sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-0.5} \cdot {\left(h \cdot \ell\right)}^{-0.5}}} \]
      6. rem-sqrt-square50.8%

        \[\leadsto d \cdot \color{blue}{\left|{\left(h \cdot \ell\right)}^{-0.5}\right|} \]
      7. rem-square-sqrt50.5%

        \[\leadsto d \cdot \left|\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right| \]
      8. fabs-sqr50.5%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}\right)} \]
      9. rem-square-sqrt50.8%

        \[\leadsto d \cdot \color{blue}{{\left(h \cdot \ell\right)}^{-0.5}} \]
    8. Simplified50.8%

      \[\leadsto \color{blue}{d \cdot {\left(h \cdot \ell\right)}^{-0.5}} \]
    9. Taylor expanded in h around -inf 0.0%

      \[\leadsto \color{blue}{\left(d \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    10. Step-by-step derivation
      1. associate-*l*0.0%

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

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

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

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

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

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

        \[\leadsto d \cdot \left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}}\right) \]
      8. pow-sqr5.5%

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right) \]
      9. rem-sqrt-square5.5%

        \[\leadsto d \cdot \left(-\color{blue}{\left|{\left(\ell \cdot h\right)}^{-0.5}\right|}\right) \]
      10. +-rgt-identity5.5%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(\ell \cdot h + 0\right)}}^{-0.5}\right|\right) \]
      11. metadata-eval5.5%

        \[\leadsto d \cdot \left(-\left|{\left(\ell \cdot h + \color{blue}{\left(1 + -1\right)}\right)}^{-0.5}\right|\right) \]
      12. associate-+l+18.0%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(\left(\ell \cdot h + 1\right) + -1\right)}}^{-0.5}\right|\right) \]
      13. fma-undefine18.0%

        \[\leadsto d \cdot \left(-\left|{\left(\color{blue}{\mathsf{fma}\left(\ell, h, 1\right)} + -1\right)}^{-0.5}\right|\right) \]
      14. +-commutative18.0%

        \[\leadsto d \cdot \left(-\left|{\color{blue}{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}}^{-0.5}\right|\right) \]
      15. rem-square-sqrt18.0%

        \[\leadsto d \cdot \left(-\left|\color{blue}{\sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}} \cdot \sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}}\right|\right) \]
      16. fabs-sqr18.0%

        \[\leadsto d \cdot \left(-\color{blue}{\sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}} \cdot \sqrt{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}}\right) \]
      17. rem-square-sqrt18.0%

        \[\leadsto d \cdot \left(-\color{blue}{{\left(-1 + \mathsf{fma}\left(\ell, h, 1\right)\right)}^{-0.5}}\right) \]
    11. Simplified5.5%

      \[\leadsto \color{blue}{d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
    12. Step-by-step derivation
      1. add-sqr-sqrt2.0%

        \[\leadsto d \cdot \color{blue}{\left(\sqrt{-{\left(\ell \cdot h\right)}^{-0.5}} \cdot \sqrt{-{\left(\ell \cdot h\right)}^{-0.5}}\right)} \]
      2. sqrt-unprod50.8%

        \[\leadsto d \cdot \color{blue}{\sqrt{\left(-{\left(\ell \cdot h\right)}^{-0.5}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)}} \]
      3. add-sqr-sqrt50.7%

        \[\leadsto d \cdot \sqrt{\left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5}} \cdot \sqrt{{\left(\ell \cdot h\right)}^{-0.5}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      4. sqrt-unprod50.8%

        \[\leadsto d \cdot \sqrt{\left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      5. pow-prod-up50.8%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(-0.5 + -0.5\right)}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      6. metadata-eval50.8%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{-1}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      7. inv-pow50.8%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{\frac{1}{\ell \cdot h}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      8. associate-/l/50.7%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      9. add-cbrt-cube27.5%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{\color{blue}{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}}\right) \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)} \]
      11. add-sqr-sqrt27.5%

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

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\color{blue}{\sqrt{{\left(\ell \cdot h\right)}^{-0.5} \cdot {\left(\ell \cdot h\right)}^{-0.5}}}\right)} \]
      13. pow-prod-up27.5%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{{\left(\ell \cdot h\right)}^{\left(-0.5 + -0.5\right)}}}\right)} \]
      14. metadata-eval27.5%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{{\left(\ell \cdot h\right)}^{\color{blue}{-1}}}\right)} \]
      15. inv-pow27.5%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\frac{1}{\ell \cdot h}}}\right)} \]
      16. associate-/l/27.4%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\frac{\frac{1}{h}}{\ell}}}\right)} \]
      17. add-cbrt-cube27.5%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\color{blue}{\sqrt[3]{\left(\frac{\frac{1}{h}}{\ell} \cdot \frac{\frac{1}{h}}{\ell}\right) \cdot \frac{\frac{1}{h}}{\ell}}}}\right)} \]
      18. unpow327.5%

        \[\leadsto d \cdot \sqrt{\left(-\sqrt{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}\right) \cdot \left(-\sqrt{\sqrt[3]{\color{blue}{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}}\right)} \]
    13. Applied egg-rr56.9%

      \[\leadsto d \cdot \color{blue}{\frac{{h}^{-0.5}}{\sqrt{\ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 6 \cdot 10^{-218}:\\ \;\;\;\;\left(-d\right) \cdot {\left(\ell \cdot h\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{h}^{-0.5}}{\sqrt{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 43.4% accurate, 3.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4 \cdot 10^{-177}:\\
\;\;\;\;\left(-d\right) \cdot {\left(\ell \cdot h\right)}^{-0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 3.99999999999999981e-177

    1. Initial program 68.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. Simplified66.8%

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

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

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

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

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

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

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

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-1}}}\right) \]
      6. metadata-eval40.0%

        \[\leadsto d \cdot \left(-\sqrt{{\left(h \cdot \ell\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}}\right) \]
      7. pow-sqr40.0%

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-0.5} \cdot {\left(h \cdot \ell\right)}^{-0.5}}}\right) \]
      8. rem-sqrt-square40.2%

        \[\leadsto d \cdot \left(-\color{blue}{\left|{\left(h \cdot \ell\right)}^{-0.5}\right|}\right) \]
      9. rem-square-sqrt40.1%

        \[\leadsto d \cdot \left(-\left|\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right|\right) \]
      10. fabs-sqr40.1%

        \[\leadsto d \cdot \left(-\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right) \]
      11. rem-square-sqrt40.2%

        \[\leadsto d \cdot \left(-\color{blue}{{\left(h \cdot \ell\right)}^{-0.5}}\right) \]
    7. Simplified40.2%

      \[\leadsto \color{blue}{d \cdot \left(-{\left(h \cdot \ell\right)}^{-0.5}\right)} \]

    if 3.99999999999999981e-177 < l

    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. Simplified61.2%

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

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    5. Step-by-step derivation
      1. add-cbrt-cube29.1%

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

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

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

      \[\leadsto d \cdot \sqrt{\color{blue}{\sqrt[3]{{\left(\frac{\frac{1}{h}}{\ell}\right)}^{3}}}} \]
    7. Taylor expanded in h around 0 52.9%

      \[\leadsto d \cdot \sqrt{\color{blue}{\frac{1}{h \cdot \ell}}} \]
    8. Step-by-step derivation
      1. associate-/l/53.6%

        \[\leadsto d \cdot \sqrt{\color{blue}{\frac{\frac{1}{\ell}}{h}}} \]
    9. Simplified53.6%

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

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

Alternative 13: 43.4% accurate, 3.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.6 \cdot 10^{-177}:\\
\;\;\;\;\left(-d\right) \cdot {\left(\ell \cdot h\right)}^{-0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 4.60000000000000044e-177

    1. Initial program 68.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. Simplified66.8%

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

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

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

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

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

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

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

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-1}}}\right) \]
      6. metadata-eval40.0%

        \[\leadsto d \cdot \left(-\sqrt{{\left(h \cdot \ell\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}}\right) \]
      7. pow-sqr40.0%

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-0.5} \cdot {\left(h \cdot \ell\right)}^{-0.5}}}\right) \]
      8. rem-sqrt-square40.2%

        \[\leadsto d \cdot \left(-\color{blue}{\left|{\left(h \cdot \ell\right)}^{-0.5}\right|}\right) \]
      9. rem-square-sqrt40.1%

        \[\leadsto d \cdot \left(-\left|\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right|\right) \]
      10. fabs-sqr40.1%

        \[\leadsto d \cdot \left(-\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right) \]
      11. rem-square-sqrt40.2%

        \[\leadsto d \cdot \left(-\color{blue}{{\left(h \cdot \ell\right)}^{-0.5}}\right) \]
    7. Simplified40.2%

      \[\leadsto \color{blue}{d \cdot \left(-{\left(h \cdot \ell\right)}^{-0.5}\right)} \]

    if 4.60000000000000044e-177 < l

    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. Simplified61.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{1}{h \cdot \ell}}} \]
    7. Step-by-step derivation
      1. associate-/r*53.5%

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

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

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

Alternative 14: 43.4% accurate, 3.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.8 \cdot 10^{-176}:\\
\;\;\;\;\left(-d\right) \cdot {\left(\ell \cdot h\right)}^{-0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 5.80000000000000012e-176

    1. Initial program 68.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. Simplified66.8%

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

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

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

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

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

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

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

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-1}}}\right) \]
      6. metadata-eval40.0%

        \[\leadsto d \cdot \left(-\sqrt{{\left(h \cdot \ell\right)}^{\color{blue}{\left(2 \cdot -0.5\right)}}}\right) \]
      7. pow-sqr40.0%

        \[\leadsto d \cdot \left(-\sqrt{\color{blue}{{\left(h \cdot \ell\right)}^{-0.5} \cdot {\left(h \cdot \ell\right)}^{-0.5}}}\right) \]
      8. rem-sqrt-square40.2%

        \[\leadsto d \cdot \left(-\color{blue}{\left|{\left(h \cdot \ell\right)}^{-0.5}\right|}\right) \]
      9. rem-square-sqrt40.1%

        \[\leadsto d \cdot \left(-\left|\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right|\right) \]
      10. fabs-sqr40.1%

        \[\leadsto d \cdot \left(-\color{blue}{\sqrt{{\left(h \cdot \ell\right)}^{-0.5}} \cdot \sqrt{{\left(h \cdot \ell\right)}^{-0.5}}}\right) \]
      11. rem-square-sqrt40.2%

        \[\leadsto d \cdot \left(-\color{blue}{{\left(h \cdot \ell\right)}^{-0.5}}\right) \]
    7. Simplified40.2%

      \[\leadsto \color{blue}{d \cdot \left(-{\left(h \cdot \ell\right)}^{-0.5}\right)} \]

    if 5.80000000000000012e-176 < l

    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. Simplified61.2%

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

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
    5. Step-by-step derivation
      1. *-commutative0.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{\frac{d}{\ell}}\right)} \]
      2. unpow20.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      3. rem-square-sqrt7.2%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{-1} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      4. mul-1-neg7.2%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    6. Simplified7.2%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    7. Step-by-step derivation
      1. sqrt-div5.7%

        \[\leadsto \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \left(-\sqrt{\frac{d}{\ell}}\right) \]
      2. add-sqr-sqrt3.0%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \color{blue}{\left(\sqrt{-\sqrt{\frac{d}{\ell}}} \cdot \sqrt{-\sqrt{\frac{d}{\ell}}}\right)} \]
      3. sqrt-unprod52.5%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \color{blue}{\sqrt{\left(-\sqrt{\frac{d}{\ell}}\right) \cdot \left(-\sqrt{\frac{d}{\ell}}\right)}} \]
      4. sqr-neg52.5%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\color{blue}{\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{\ell}}}} \]
      5. add-sqr-sqrt52.5%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}} \]
      6. sqrt-div58.2%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}} \]
      7. frac-times58.3%

        \[\leadsto \color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{h} \cdot \sqrt{\ell}}} \]
      8. add-sqr-sqrt58.5%

        \[\leadsto \frac{\color{blue}{d}}{\sqrt{h} \cdot \sqrt{\ell}} \]
      9. sqrt-prod53.0%

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      10. *-commutative53.0%

        \[\leadsto \frac{d}{\sqrt{\color{blue}{\ell \cdot h}}} \]
    8. Applied egg-rr53.0%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 5.8 \cdot 10^{-176}:\\ \;\;\;\;\left(-d\right) \cdot {\left(\ell \cdot h\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 43.4% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt{\ell \cdot h}\\ \mathbf{if}\;\ell \leq 3.8 \cdot 10^{-177}:\\ \;\;\;\;\frac{-d}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{t\_0}\\ \end{array} \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (* l h)))) (if (<= l 3.8e-177) (/ (- d) t_0) (/ d t_0))))
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((l * h));
	double tmp;
	if (l <= 3.8e-177) {
		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((l * h))
    if (l <= 3.8d-177) 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((l * h));
	double tmp;
	if (l <= 3.8e-177) {
		tmp = -d / t_0;
	} else {
		tmp = d / t_0;
	}
	return tmp;
}
def code(d, h, l, M, D):
	t_0 = math.sqrt((l * h))
	tmp = 0
	if l <= 3.8e-177:
		tmp = -d / t_0
	else:
		tmp = d / t_0
	return tmp
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(l * h))
	tmp = 0.0
	if (l <= 3.8e-177)
		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((l * h));
	tmp = 0.0;
	if (l <= 3.8e-177)
		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[(l * h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, 3.8e-177], N[((-d) / t$95$0), $MachinePrecision], N[(d / t$95$0), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt{\ell \cdot h}\\
\mathbf{if}\;\ell \leq 3.8 \cdot 10^{-177}:\\
\;\;\;\;\frac{-d}{t\_0}\\

\mathbf{else}:\\
\;\;\;\;\frac{d}{t\_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 3.80000000000000004e-177

    1. Initial program 68.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. Simplified66.8%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}, -0.5 \cdot \frac{h}{\ell}, 1\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in l around -inf 0.0%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
    5. Step-by-step derivation
      1. *-commutative0.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{\frac{d}{\ell}}\right)} \]
      2. unpow20.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      3. rem-square-sqrt9.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{-1} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      4. mul-1-neg9.6%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    6. Simplified9.6%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    7. Step-by-step derivation
      1. distribute-rgt-neg-out9.6%

        \[\leadsto \color{blue}{-\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}} \]
      2. sqrt-div4.1%

        \[\leadsto -\color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \sqrt{\frac{d}{\ell}} \]
      3. sqrt-div2.1%

        \[\leadsto -\frac{\sqrt{d}}{\sqrt{h}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}} \]
      4. frac-times2.1%

        \[\leadsto -\color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{h} \cdot \sqrt{\ell}}} \]
      5. add-sqr-sqrt2.1%

        \[\leadsto -\frac{\color{blue}{d}}{\sqrt{h} \cdot \sqrt{\ell}} \]
      6. sqrt-prod40.2%

        \[\leadsto -\frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      7. *-commutative40.2%

        \[\leadsto -\frac{d}{\sqrt{\color{blue}{\ell \cdot h}}} \]
    8. Applied egg-rr40.2%

      \[\leadsto \color{blue}{-\frac{d}{\sqrt{\ell \cdot h}}} \]
    9. Step-by-step derivation
      1. distribute-neg-frac240.2%

        \[\leadsto \color{blue}{\frac{d}{-\sqrt{\ell \cdot h}}} \]
      2. *-commutative40.2%

        \[\leadsto \frac{d}{-\sqrt{\color{blue}{h \cdot \ell}}} \]
    10. Simplified40.2%

      \[\leadsto \color{blue}{\frac{d}{-\sqrt{h \cdot \ell}}} \]

    if 3.80000000000000004e-177 < l

    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. Simplified61.2%

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}, -0.5 \cdot \frac{h}{\ell}, 1\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in l around -inf 0.0%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
    5. Step-by-step derivation
      1. *-commutative0.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{\frac{d}{\ell}}\right)} \]
      2. unpow20.0%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      3. rem-square-sqrt7.2%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{-1} \cdot \sqrt{\frac{d}{\ell}}\right) \]
      4. mul-1-neg7.2%

        \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    6. Simplified7.2%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
    7. Step-by-step derivation
      1. sqrt-div5.7%

        \[\leadsto \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \left(-\sqrt{\frac{d}{\ell}}\right) \]
      2. add-sqr-sqrt3.0%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \color{blue}{\left(\sqrt{-\sqrt{\frac{d}{\ell}}} \cdot \sqrt{-\sqrt{\frac{d}{\ell}}}\right)} \]
      3. sqrt-unprod52.5%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \color{blue}{\sqrt{\left(-\sqrt{\frac{d}{\ell}}\right) \cdot \left(-\sqrt{\frac{d}{\ell}}\right)}} \]
      4. sqr-neg52.5%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\color{blue}{\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{\ell}}}} \]
      5. add-sqr-sqrt52.5%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}} \]
      6. sqrt-div58.2%

        \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}} \]
      7. frac-times58.3%

        \[\leadsto \color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{h} \cdot \sqrt{\ell}}} \]
      8. add-sqr-sqrt58.5%

        \[\leadsto \frac{\color{blue}{d}}{\sqrt{h} \cdot \sqrt{\ell}} \]
      9. sqrt-prod53.0%

        \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
      10. *-commutative53.0%

        \[\leadsto \frac{d}{\sqrt{\color{blue}{\ell \cdot h}}} \]
    8. Applied egg-rr53.0%

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.8 \cdot 10^{-177}:\\ \;\;\;\;\frac{-d}{\sqrt{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 27.0% accurate, 3.2× speedup?

\[\begin{array}{l} \\ \frac{d}{\sqrt{\ell \cdot h}} \end{array} \]
(FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
double code(double d, double h, double l, double M, double D) {
	return d / sqrt((l * h));
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    code = d / sqrt((l * h))
end function
public static double code(double d, double h, double l, double M, double D) {
	return d / Math.sqrt((l * h));
}
def code(d, h, l, M, D):
	return d / math.sqrt((l * h))
function code(d, h, l, M, D)
	return Float64(d / sqrt(Float64(l * h)))
end
function tmp = code(d, h, l, M, D)
	tmp = d / sqrt((l * h));
end
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{d}{\sqrt{\ell \cdot h}}
\end{array}
Derivation
  1. Initial program 65.7%

    \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
  2. Simplified64.2%

    \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}, -0.5 \cdot \frac{h}{\ell}, 1\right)\right)} \]
  3. Add Preprocessing
  4. Taylor expanded in l around -inf 0.0%

    \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(\sqrt{\frac{d}{\ell}} \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
  5. Step-by-step derivation
    1. *-commutative0.0%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{\frac{d}{\ell}}\right)} \]
    2. unpow20.0%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)} \cdot \sqrt{\frac{d}{\ell}}\right) \]
    3. rem-square-sqrt8.5%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\color{blue}{-1} \cdot \sqrt{\frac{d}{\ell}}\right) \]
    4. mul-1-neg8.5%

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
  6. Simplified8.5%

    \[\leadsto \sqrt{\frac{d}{h}} \cdot \color{blue}{\left(-\sqrt{\frac{d}{\ell}}\right)} \]
  7. Step-by-step derivation
    1. sqrt-div4.8%

      \[\leadsto \color{blue}{\frac{\sqrt{d}}{\sqrt{h}}} \cdot \left(-\sqrt{\frac{d}{\ell}}\right) \]
    2. add-sqr-sqrt1.4%

      \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \color{blue}{\left(\sqrt{-\sqrt{\frac{d}{\ell}}} \cdot \sqrt{-\sqrt{\frac{d}{\ell}}}\right)} \]
    3. sqrt-unprod25.5%

      \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \color{blue}{\sqrt{\left(-\sqrt{\frac{d}{\ell}}\right) \cdot \left(-\sqrt{\frac{d}{\ell}}\right)}} \]
    4. sqr-neg25.5%

      \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\color{blue}{\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{\ell}}}} \]
    5. add-sqr-sqrt25.5%

      \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\color{blue}{\frac{d}{\ell}}} \]
    6. sqrt-div29.1%

      \[\leadsto \frac{\sqrt{d}}{\sqrt{h}} \cdot \color{blue}{\frac{\sqrt{d}}{\sqrt{\ell}}} \]
    7. frac-times29.2%

      \[\leadsto \color{blue}{\frac{\sqrt{d} \cdot \sqrt{d}}{\sqrt{h} \cdot \sqrt{\ell}}} \]
    8. add-sqr-sqrt29.3%

      \[\leadsto \frac{\color{blue}{d}}{\sqrt{h} \cdot \sqrt{\ell}} \]
    9. sqrt-prod29.5%

      \[\leadsto \frac{d}{\color{blue}{\sqrt{h \cdot \ell}}} \]
    10. *-commutative29.5%

      \[\leadsto \frac{d}{\sqrt{\color{blue}{\ell \cdot h}}} \]
  8. Applied egg-rr29.5%

    \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
  9. Add Preprocessing

Reproduce

?
herbie shell --seed 2024156 
(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)))))