Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.9% → 81.6%
Time: 25.9s
Alternatives: 18
Speedup: 2.0×

Specification

?
\[\begin{array}{l} \\ \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
	return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k):
	return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\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 18 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: 54.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
	return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k):
	return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}

Alternative 1: 81.6% accurate, 0.6× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k_m \cdot \tan k_m\\ t_3 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k_m}{t_m}\right)\right)\\ t_4 := {\left(\sqrt[3]{\ell}\right)}^{2}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;k_m \leq 3.2 \cdot 10^{-87}:\\ \;\;\;\;{\left(\frac{t_4}{t_m \cdot {\left(\sqrt[3]{k_m}\right)}^{2}}\right)}^{3}\\ \mathbf{elif}\;k_m \leq 6.5 \cdot 10^{-51}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(\sqrt{t_2} \cdot t_3\right)\right)}^{2}}\\ \mathbf{elif}\;k_m \leq 1800000000:\\ \;\;\;\;{\left(\sqrt[3]{{\left(\frac{t_4}{t_m \cdot \sqrt[3]{{k_m}^{2}}}\right)}^{3}}\right)}^{3}\\ \mathbf{elif}\;k_m \leq 2.15 \cdot 10^{+150}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot {\sin k_m}^{2}}\\ \mathbf{elif}\;k_m \leq 1.25 \cdot 10^{+215}:\\ \;\;\;\;\frac{\frac{2}{t_2 \cdot {t_m}^{3}}}{\frac{t_3}{\ell}} \cdot \frac{\ell}{t_3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\ \end{array} \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (let* ((t_2 (* (sin k_m) (tan k_m)))
        (t_3 (hypot 1.0 (hypot 1.0 (/ k_m t_m))))
        (t_4 (pow (cbrt l) 2.0)))
   (*
    t_s
    (if (<= k_m 3.2e-87)
      (pow (/ t_4 (* t_m (pow (cbrt k_m) 2.0))) 3.0)
      (if (<= k_m 6.5e-51)
        (/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* (sqrt t_2) t_3)) 2.0))
        (if (<= k_m 1800000000.0)
          (pow (cbrt (pow (/ t_4 (* t_m (cbrt (pow k_m 2.0)))) 3.0)) 3.0)
          (if (<= k_m 2.15e+150)
            (*
             2.0
             (/
              (* (pow l 2.0) (cos k_m))
              (* (* t_m (pow k_m 2.0)) (pow (sin k_m) 2.0))))
            (if (<= k_m 1.25e+215)
              (* (/ (/ 2.0 (* t_2 (pow t_m 3.0))) (/ t_3 l)) (/ l t_3))
              (* 2.0 (/ (pow (* l (pow k_m -2.0)) 2.0) t_m))))))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = sin(k_m) * tan(k_m);
	double t_3 = hypot(1.0, hypot(1.0, (k_m / t_m)));
	double t_4 = pow(cbrt(l), 2.0);
	double tmp;
	if (k_m <= 3.2e-87) {
		tmp = pow((t_4 / (t_m * pow(cbrt(k_m), 2.0))), 3.0);
	} else if (k_m <= 6.5e-51) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (sqrt(t_2) * t_3)), 2.0);
	} else if (k_m <= 1800000000.0) {
		tmp = pow(cbrt(pow((t_4 / (t_m * cbrt(pow(k_m, 2.0)))), 3.0)), 3.0);
	} else if (k_m <= 2.15e+150) {
		tmp = 2.0 * ((pow(l, 2.0) * cos(k_m)) / ((t_m * pow(k_m, 2.0)) * pow(sin(k_m), 2.0)));
	} else if (k_m <= 1.25e+215) {
		tmp = ((2.0 / (t_2 * pow(t_m, 3.0))) / (t_3 / l)) * (l / t_3);
	} else {
		tmp = 2.0 * (pow((l * pow(k_m, -2.0)), 2.0) / t_m);
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = Math.sin(k_m) * Math.tan(k_m);
	double t_3 = Math.hypot(1.0, Math.hypot(1.0, (k_m / t_m)));
	double t_4 = Math.pow(Math.cbrt(l), 2.0);
	double tmp;
	if (k_m <= 3.2e-87) {
		tmp = Math.pow((t_4 / (t_m * Math.pow(Math.cbrt(k_m), 2.0))), 3.0);
	} else if (k_m <= 6.5e-51) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.sqrt(t_2) * t_3)), 2.0);
	} else if (k_m <= 1800000000.0) {
		tmp = Math.pow(Math.cbrt(Math.pow((t_4 / (t_m * Math.cbrt(Math.pow(k_m, 2.0)))), 3.0)), 3.0);
	} else if (k_m <= 2.15e+150) {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k_m)) / ((t_m * Math.pow(k_m, 2.0)) * Math.pow(Math.sin(k_m), 2.0)));
	} else if (k_m <= 1.25e+215) {
		tmp = ((2.0 / (t_2 * Math.pow(t_m, 3.0))) / (t_3 / l)) * (l / t_3);
	} else {
		tmp = 2.0 * (Math.pow((l * Math.pow(k_m, -2.0)), 2.0) / t_m);
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = Float64(sin(k_m) * tan(k_m))
	t_3 = hypot(1.0, hypot(1.0, Float64(k_m / t_m)))
	t_4 = cbrt(l) ^ 2.0
	tmp = 0.0
	if (k_m <= 3.2e-87)
		tmp = Float64(t_4 / Float64(t_m * (cbrt(k_m) ^ 2.0))) ^ 3.0;
	elseif (k_m <= 6.5e-51)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(sqrt(t_2) * t_3)) ^ 2.0));
	elseif (k_m <= 1800000000.0)
		tmp = cbrt((Float64(t_4 / Float64(t_m * cbrt((k_m ^ 2.0)))) ^ 3.0)) ^ 3.0;
	elseif (k_m <= 2.15e+150)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k_m)) / Float64(Float64(t_m * (k_m ^ 2.0)) * (sin(k_m) ^ 2.0))));
	elseif (k_m <= 1.25e+215)
		tmp = Float64(Float64(Float64(2.0 / Float64(t_2 * (t_m ^ 3.0))) / Float64(t_3 / l)) * Float64(l / t_3));
	else
		tmp = Float64(2.0 * Float64((Float64(l * (k_m ^ -2.0)) ^ 2.0) / t_m));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := Block[{t$95$2 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$4 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 3.2e-87], N[Power[N[(t$95$4 / N[(t$95$m * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 6.5e-51], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[t$95$2], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1800000000.0], N[Power[N[Power[N[Power[N[(t$95$4 / N[(t$95$m * N[Power[N[Power[k$95$m, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 2.15e+150], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1.25e+215], N[(N[(N[(2.0 / N[(t$95$2 * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$3 / l), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[(l * N[Power[k$95$m, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sin k_m \cdot \tan k_m\\
t_3 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k_m}{t_m}\right)\right)\\
t_4 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 3.2 \cdot 10^{-87}:\\
\;\;\;\;{\left(\frac{t_4}{t_m \cdot {\left(\sqrt[3]{k_m}\right)}^{2}}\right)}^{3}\\

\mathbf{elif}\;k_m \leq 6.5 \cdot 10^{-51}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(\sqrt{t_2} \cdot t_3\right)\right)}^{2}}\\

\mathbf{elif}\;k_m \leq 1800000000:\\
\;\;\;\;{\left(\sqrt[3]{{\left(\frac{t_4}{t_m \cdot \sqrt[3]{{k_m}^{2}}}\right)}^{3}}\right)}^{3}\\

\mathbf{elif}\;k_m \leq 2.15 \cdot 10^{+150}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot {\sin k_m}^{2}}\\

\mathbf{elif}\;k_m \leq 1.25 \cdot 10^{+215}:\\
\;\;\;\;\frac{\frac{2}{t_2 \cdot {t_m}^{3}}}{\frac{t_3}{\ell}} \cdot \frac{\ell}{t_3}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if k < 3.19999999999999979e-87

    1. Initial program 58.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified52.5%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 53.2%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative53.2%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified53.2%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt53.1%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow253.1%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div53.1%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow253.1%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod53.1%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow253.1%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod53.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow353.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube53.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow253.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod53.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow253.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div53.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow253.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod58.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow258.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr81.8%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus81.9%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval81.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified81.9%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]

    if 3.19999999999999979e-87 < k < 6.5000000000000003e-51

    1. Initial program 71.8%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt29.2%

        \[\leadsto \frac{2}{\left(\left(\color{blue}{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell}}\right)} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      2. pow229.2%

        \[\leadsto \frac{2}{\left(\left(\color{blue}{{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}^{2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      3. sqrt-div29.2%

        \[\leadsto \frac{2}{\left(\left({\color{blue}{\left(\frac{\sqrt{{t}^{3}}}{\sqrt{\ell \cdot \ell}}\right)}}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      4. sqrt-pow129.2%

        \[\leadsto \frac{2}{\left(\left({\left(\frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      5. metadata-eval29.2%

        \[\leadsto \frac{2}{\left(\left({\left(\frac{{t}^{\color{blue}{1.5}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      6. sqrt-prod15.1%

        \[\leadsto \frac{2}{\left(\left({\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      7. add-sqr-sqrt29.2%

        \[\leadsto \frac{2}{\left(\left({\left(\frac{{t}^{1.5}}{\color{blue}{\ell}}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    3. Applied egg-rr29.2%

      \[\leadsto \frac{2}{\left(\left(\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    4. Step-by-step derivation
      1. expm1-log1p-u29.2%

        \[\leadsto \frac{2}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left({\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)\right)}} \]
      2. expm1-udef15.9%

        \[\leadsto \frac{2}{\color{blue}{e^{\mathsf{log1p}\left(\left(\left({\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)} - 1}} \]
    5. Applied egg-rr27.7%

      \[\leadsto \frac{2}{\color{blue}{e^{\mathsf{log1p}\left({\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}\right)} - 1}} \]
    6. Step-by-step derivation
      1. expm1-def41.2%

        \[\leadsto \frac{2}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}\right)\right)}} \]
      2. expm1-log1p42.5%

        \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
      3. associate-*l*42.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\sqrt{\sin k \cdot \tan k} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}}^{2}} \]
    7. Simplified42.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\sqrt{\sin k \cdot \tan k} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}} \]

    if 6.5000000000000003e-51 < k < 1.8e9

    1. Initial program 64.6%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified64.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 73.5%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative73.5%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified73.5%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt73.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow273.4%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div73.5%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow273.5%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod73.6%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow273.6%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod73.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow373.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube73.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow273.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod73.5%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow273.5%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div73.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow273.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod82.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow282.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr82.0%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus82.0%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval82.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified82.0%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]
    10. Step-by-step derivation
      1. add-cbrt-cube82.0%

        \[\leadsto {\color{blue}{\left(\sqrt[3]{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right) \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}}\right)}}^{3} \]
      2. pow382.0%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}}}\right)}^{3} \]
      3. unpow282.0%

        \[\leadsto {\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{3}}\right)}^{3} \]
      4. cbrt-prod81.6%

        \[\leadsto {\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\sqrt[3]{k \cdot k}}}\right)}^{3}}\right)}^{3} \]
      5. unpow281.6%

        \[\leadsto {\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{{k}^{2}}}}\right)}^{3}}\right)}^{3} \]
    11. Applied egg-rr81.6%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}^{3}}\right)}}^{3} \]

    if 1.8e9 < k < 2.14999999999999999e150

    1. Initial program 44.5%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified44.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 94.9%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*94.9%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}} \]
    5. Simplified94.9%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}} \]

    if 2.14999999999999999e150 < k < 1.25e215

    1. Initial program 40.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified40.2%

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Step-by-step derivation
      1. associate-*r*53.2%

        \[\leadsto \frac{\color{blue}{\left(\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell\right) \cdot \ell}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. add-sqr-sqrt53.2%

        \[\leadsto \frac{\left(\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell\right) \cdot \ell}{\color{blue}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
      3. times-frac53.4%

        \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}} \cdot \frac{\ell}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
    4. Applied egg-rr60.3%

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-/l*73.0%

        \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)}}{\frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. *-commutative73.0%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}}}{\frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      3. associate-*r*73.0%

        \[\leadsto \frac{\frac{2}{\color{blue}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{\frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    6. Simplified73.0%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{\frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]

    if 1.25e215 < k

    1. Initial program 46.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified46.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 75.7%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Taylor expanded in k around 0 75.7%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. associate-/r*75.7%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    6. Simplified75.7%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u75.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
      2. expm1-udef75.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
      3. div-inv75.7%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
      4. pow-flip75.7%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
      5. metadata-eval75.7%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
    8. Applied egg-rr75.7%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
    9. Step-by-step derivation
      1. expm1-def75.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
      2. expm1-log1p75.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    10. Simplified75.7%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt75.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{\sqrt{{\ell}^{2} \cdot {k}^{-4}} \cdot \sqrt{{\ell}^{2} \cdot {k}^{-4}}}}{t} \]
      2. pow275.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\sqrt{{\ell}^{2} \cdot {k}^{-4}}\right)}^{2}}}{t} \]
      3. sqrt-prod75.7%

        \[\leadsto 2 \cdot \frac{{\color{blue}{\left(\sqrt{{\ell}^{2}} \cdot \sqrt{{k}^{-4}}\right)}}^{2}}{t} \]
      4. unpow275.7%

        \[\leadsto 2 \cdot \frac{{\left(\sqrt{\color{blue}{\ell \cdot \ell}} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      5. sqrt-prod33.6%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      6. add-sqr-sqrt76.0%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\ell} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      7. sqrt-pow176.0%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot \color{blue}{{k}^{\left(\frac{-4}{2}\right)}}\right)}^{2}}{t} \]
      8. metadata-eval76.0%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot {k}^{\color{blue}{-2}}\right)}^{2}}{t} \]
    12. Applied egg-rr76.0%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\ell \cdot {k}^{-2}\right)}^{2}}}{t} \]
  3. Recombined 6 regimes into one program.
  4. Final simplification81.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.2 \cdot 10^{-87}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}\\ \mathbf{elif}\;k \leq 6.5 \cdot 10^{-51}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\sqrt{\sin k \cdot \tan k} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 1800000000:\\ \;\;\;\;{\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}^{3}}\right)}^{3}\\ \mathbf{elif}\;k \leq 2.15 \cdot 10^{+150}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left(t \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \mathbf{elif}\;k \leq 1.25 \cdot 10^{+215}:\\ \;\;\;\;\frac{\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {t}^{3}}}{\frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\ \end{array} \]

Alternative 2: 82.0% accurate, 0.5× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k_m}{t_m}\right)\right)\\ t_3 := \sin k_m \cdot \tan k_m\\ t_s \cdot \begin{array}{l} \mathbf{if}\;k_m \leq 4.1 \cdot 10^{-167}:\\ \;\;\;\;{\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k_m} \cdot \sqrt{t_m}}\right)}^{2}\right)}^{3}\\ \mathbf{elif}\;k_m \leq 24000000000:\\ \;\;\;\;{\left(\frac{\sqrt{2}}{\left(\sqrt{t_3} \cdot \frac{{t_m}^{1.5}}{\ell}\right) \cdot t_2}\right)}^{2}\\ \mathbf{elif}\;k_m \leq 7.4 \cdot 10^{+149}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot {\sin k_m}^{2}}\\ \mathbf{elif}\;k_m \leq 1.75 \cdot 10^{+215}:\\ \;\;\;\;\frac{\frac{2}{t_3 \cdot {t_m}^{3}}}{\frac{t_2}{\ell}} \cdot \frac{\ell}{t_2}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\ \end{array} \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (let* ((t_2 (hypot 1.0 (hypot 1.0 (/ k_m t_m))))
        (t_3 (* (sin k_m) (tan k_m))))
   (*
    t_s
    (if (<= k_m 4.1e-167)
      (pow (pow (/ (cbrt l) (* (cbrt k_m) (sqrt t_m))) 2.0) 3.0)
      (if (<= k_m 24000000000.0)
        (pow (/ (sqrt 2.0) (* (* (sqrt t_3) (/ (pow t_m 1.5) l)) t_2)) 2.0)
        (if (<= k_m 7.4e+149)
          (*
           2.0
           (/
            (* (pow l 2.0) (cos k_m))
            (* (* t_m (pow k_m 2.0)) (pow (sin k_m) 2.0))))
          (if (<= k_m 1.75e+215)
            (* (/ (/ 2.0 (* t_3 (pow t_m 3.0))) (/ t_2 l)) (/ l t_2))
            (* 2.0 (/ (pow (* l (pow k_m -2.0)) 2.0) t_m)))))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = hypot(1.0, hypot(1.0, (k_m / t_m)));
	double t_3 = sin(k_m) * tan(k_m);
	double tmp;
	if (k_m <= 4.1e-167) {
		tmp = pow(pow((cbrt(l) / (cbrt(k_m) * sqrt(t_m))), 2.0), 3.0);
	} else if (k_m <= 24000000000.0) {
		tmp = pow((sqrt(2.0) / ((sqrt(t_3) * (pow(t_m, 1.5) / l)) * t_2)), 2.0);
	} else if (k_m <= 7.4e+149) {
		tmp = 2.0 * ((pow(l, 2.0) * cos(k_m)) / ((t_m * pow(k_m, 2.0)) * pow(sin(k_m), 2.0)));
	} else if (k_m <= 1.75e+215) {
		tmp = ((2.0 / (t_3 * pow(t_m, 3.0))) / (t_2 / l)) * (l / t_2);
	} else {
		tmp = 2.0 * (pow((l * pow(k_m, -2.0)), 2.0) / t_m);
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = Math.hypot(1.0, Math.hypot(1.0, (k_m / t_m)));
	double t_3 = Math.sin(k_m) * Math.tan(k_m);
	double tmp;
	if (k_m <= 4.1e-167) {
		tmp = Math.pow(Math.pow((Math.cbrt(l) / (Math.cbrt(k_m) * Math.sqrt(t_m))), 2.0), 3.0);
	} else if (k_m <= 24000000000.0) {
		tmp = Math.pow((Math.sqrt(2.0) / ((Math.sqrt(t_3) * (Math.pow(t_m, 1.5) / l)) * t_2)), 2.0);
	} else if (k_m <= 7.4e+149) {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k_m)) / ((t_m * Math.pow(k_m, 2.0)) * Math.pow(Math.sin(k_m), 2.0)));
	} else if (k_m <= 1.75e+215) {
		tmp = ((2.0 / (t_3 * Math.pow(t_m, 3.0))) / (t_2 / l)) * (l / t_2);
	} else {
		tmp = 2.0 * (Math.pow((l * Math.pow(k_m, -2.0)), 2.0) / t_m);
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = hypot(1.0, hypot(1.0, Float64(k_m / t_m)))
	t_3 = Float64(sin(k_m) * tan(k_m))
	tmp = 0.0
	if (k_m <= 4.1e-167)
		tmp = (Float64(cbrt(l) / Float64(cbrt(k_m) * sqrt(t_m))) ^ 2.0) ^ 3.0;
	elseif (k_m <= 24000000000.0)
		tmp = Float64(sqrt(2.0) / Float64(Float64(sqrt(t_3) * Float64((t_m ^ 1.5) / l)) * t_2)) ^ 2.0;
	elseif (k_m <= 7.4e+149)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k_m)) / Float64(Float64(t_m * (k_m ^ 2.0)) * (sin(k_m) ^ 2.0))));
	elseif (k_m <= 1.75e+215)
		tmp = Float64(Float64(Float64(2.0 / Float64(t_3 * (t_m ^ 3.0))) / Float64(t_2 / l)) * Float64(l / t_2));
	else
		tmp = Float64(2.0 * Float64((Float64(l * (k_m ^ -2.0)) ^ 2.0) / t_m));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := Block[{t$95$2 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 4.1e-167], N[Power[N[Power[N[(N[Power[l, 1/3], $MachinePrecision] / N[(N[Power[k$95$m, 1/3], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 24000000000.0], N[Power[N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[Sqrt[t$95$3], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[k$95$m, 7.4e+149], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1.75e+215], N[(N[(N[(2.0 / N[(t$95$3 * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 / l), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[(l * N[Power[k$95$m, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k_m}{t_m}\right)\right)\\
t_3 := \sin k_m \cdot \tan k_m\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 4.1 \cdot 10^{-167}:\\
\;\;\;\;{\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k_m} \cdot \sqrt{t_m}}\right)}^{2}\right)}^{3}\\

\mathbf{elif}\;k_m \leq 24000000000:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\left(\sqrt{t_3} \cdot \frac{{t_m}^{1.5}}{\ell}\right) \cdot t_2}\right)}^{2}\\

\mathbf{elif}\;k_m \leq 7.4 \cdot 10^{+149}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot {\sin k_m}^{2}}\\

\mathbf{elif}\;k_m \leq 1.75 \cdot 10^{+215}:\\
\;\;\;\;\frac{\frac{2}{t_3 \cdot {t_m}^{3}}}{\frac{t_2}{\ell}} \cdot \frac{\ell}{t_2}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if k < 4.10000000000000018e-167

    1. Initial program 58.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified51.8%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 51.9%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative51.9%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified51.9%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt51.9%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow251.9%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div51.9%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow251.9%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod51.9%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow251.9%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod51.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow351.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube51.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow251.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod51.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow251.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div51.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow251.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod56.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow256.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr80.7%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus80.7%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval80.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified80.7%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]
    10. Step-by-step derivation
      1. add-exp-log40.9%

        \[\leadsto {\left(\frac{{\color{blue}{\left(e^{\log \left(\sqrt[3]{\ell}\right)}\right)}}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3} \]
    11. Applied egg-rr40.9%

      \[\leadsto {\left(\frac{{\color{blue}{\left(e^{\log \left(\sqrt[3]{\ell}\right)}\right)}}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3} \]
    12. Step-by-step derivation
      1. rem-exp-log80.7%

        \[\leadsto {\left(\frac{{\color{blue}{\left(\sqrt[3]{\ell}\right)}}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3} \]
      2. associate-/r*80.7%

        \[\leadsto {\color{blue}{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{{\left(\sqrt[3]{k}\right)}^{2}}\right)}}^{3} \]
      3. unpow280.7%

        \[\leadsto {\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\color{blue}{\sqrt[3]{k} \cdot \sqrt[3]{k}}}\right)}^{3} \]
      4. cbrt-prod67.5%

        \[\leadsto {\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\color{blue}{\sqrt[3]{k \cdot k}}}\right)}^{3} \]
      5. unpow267.5%

        \[\leadsto {\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\color{blue}{{k}^{2}}}}\right)}^{3} \]
      6. associate-/r*67.6%

        \[\leadsto {\color{blue}{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}}^{3} \]
      7. expm1-log1p-u47.8%

        \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)\right)\right)}}^{3} \]
      8. expm1-udef44.9%

        \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)} - 1\right)}}^{3} \]
    13. Applied egg-rr35.0%

      \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k} \cdot \sqrt{t}}\right)}^{2}\right)} - 1\right)}}^{3} \]
    14. Step-by-step derivation
      1. expm1-def38.3%

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

        \[\leadsto {\color{blue}{\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k} \cdot \sqrt{t}}\right)}^{2}\right)}}^{3} \]
    15. Simplified38.4%

      \[\leadsto {\color{blue}{\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k} \cdot \sqrt{t}}\right)}^{2}\right)}}^{3} \]

    if 4.10000000000000018e-167 < k < 2.4e10

    1. Initial program 64.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified64.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Applied egg-rr46.8%

      \[\leadsto \color{blue}{{\left(\frac{\sqrt{2}}{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)}^{2}} \]

    if 2.4e10 < k < 7.39999999999999957e149

    1. Initial program 44.5%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified44.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 94.9%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*94.9%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}} \]
    5. Simplified94.9%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}} \]

    if 7.39999999999999957e149 < k < 1.74999999999999988e215

    1. Initial program 40.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified40.2%

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Step-by-step derivation
      1. associate-*r*53.2%

        \[\leadsto \frac{\color{blue}{\left(\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell\right) \cdot \ell}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. add-sqr-sqrt53.2%

        \[\leadsto \frac{\left(\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell\right) \cdot \ell}{\color{blue}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
      3. times-frac53.4%

        \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}} \cdot \frac{\ell}{\sqrt{2 + {\left(\frac{k}{t}\right)}^{2}}}} \]
    4. Applied egg-rr60.3%

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-/l*73.0%

        \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)}}{\frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      2. *-commutative73.0%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}}}{\frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      3. associate-*r*73.0%

        \[\leadsto \frac{\frac{2}{\color{blue}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}}{\frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    6. Simplified73.0%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{\frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]

    if 1.74999999999999988e215 < k

    1. Initial program 46.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified46.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 75.7%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Taylor expanded in k around 0 75.7%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. associate-/r*75.7%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    6. Simplified75.7%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u75.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
      2. expm1-udef75.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
      3. div-inv75.7%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
      4. pow-flip75.7%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
      5. metadata-eval75.7%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
    8. Applied egg-rr75.7%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
    9. Step-by-step derivation
      1. expm1-def75.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
      2. expm1-log1p75.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    10. Simplified75.7%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt75.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{\sqrt{{\ell}^{2} \cdot {k}^{-4}} \cdot \sqrt{{\ell}^{2} \cdot {k}^{-4}}}}{t} \]
      2. pow275.7%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\sqrt{{\ell}^{2} \cdot {k}^{-4}}\right)}^{2}}}{t} \]
      3. sqrt-prod75.7%

        \[\leadsto 2 \cdot \frac{{\color{blue}{\left(\sqrt{{\ell}^{2}} \cdot \sqrt{{k}^{-4}}\right)}}^{2}}{t} \]
      4. unpow275.7%

        \[\leadsto 2 \cdot \frac{{\left(\sqrt{\color{blue}{\ell \cdot \ell}} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      5. sqrt-prod33.6%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      6. add-sqr-sqrt76.0%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\ell} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      7. sqrt-pow176.0%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot \color{blue}{{k}^{\left(\frac{-4}{2}\right)}}\right)}^{2}}{t} \]
      8. metadata-eval76.0%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot {k}^{\color{blue}{-2}}\right)}^{2}}{t} \]
    12. Applied egg-rr76.0%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\ell \cdot {k}^{-2}\right)}^{2}}}{t} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification49.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 4.1 \cdot 10^{-167}:\\ \;\;\;\;{\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k} \cdot \sqrt{t}}\right)}^{2}\right)}^{3}\\ \mathbf{elif}\;k \leq 24000000000:\\ \;\;\;\;{\left(\frac{\sqrt{2}}{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)}^{2}\\ \mathbf{elif}\;k \leq 7.4 \cdot 10^{+149}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left(t \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \mathbf{elif}\;k \leq 1.75 \cdot 10^{+215}:\\ \;\;\;\;\frac{\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {t}^{3}}}{\frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\ \end{array} \]

Alternative 3: 80.5% accurate, 0.6× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;k_m \leq 5.2 \cdot 10^{-88}:\\ \;\;\;\;{\left(\frac{t_2}{t_m \cdot {\left(\sqrt[3]{k_m}\right)}^{2}}\right)}^{3}\\ \mathbf{elif}\;k_m \leq 1.65 \cdot 10^{-52}:\\ \;\;\;\;\frac{2}{{\left(\left(\sqrt{\sin k_m \cdot \tan k_m} \cdot \frac{{t_m}^{1.5}}{\ell}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k_m}{t_m}\right)\right)\right)}^{2}}\\ \mathbf{elif}\;k_m \leq 1800000000:\\ \;\;\;\;{\left(\sqrt[3]{{\left(\frac{t_2}{t_m \cdot \sqrt[3]{{k_m}^{2}}}\right)}^{3}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot {\sin k_m}^{2}}\\ \end{array} \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (let* ((t_2 (pow (cbrt l) 2.0)))
   (*
    t_s
    (if (<= k_m 5.2e-88)
      (pow (/ t_2 (* t_m (pow (cbrt k_m) 2.0))) 3.0)
      (if (<= k_m 1.65e-52)
        (/
         2.0
         (pow
          (*
           (* (sqrt (* (sin k_m) (tan k_m))) (/ (pow t_m 1.5) l))
           (hypot 1.0 (hypot 1.0 (/ k_m t_m))))
          2.0))
        (if (<= k_m 1800000000.0)
          (pow (cbrt (pow (/ t_2 (* t_m (cbrt (pow k_m 2.0)))) 3.0)) 3.0)
          (*
           2.0
           (/
            (* (pow l 2.0) (cos k_m))
            (* (* t_m (pow k_m 2.0)) (pow (sin k_m) 2.0))))))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = pow(cbrt(l), 2.0);
	double tmp;
	if (k_m <= 5.2e-88) {
		tmp = pow((t_2 / (t_m * pow(cbrt(k_m), 2.0))), 3.0);
	} else if (k_m <= 1.65e-52) {
		tmp = 2.0 / pow(((sqrt((sin(k_m) * tan(k_m))) * (pow(t_m, 1.5) / l)) * hypot(1.0, hypot(1.0, (k_m / t_m)))), 2.0);
	} else if (k_m <= 1800000000.0) {
		tmp = pow(cbrt(pow((t_2 / (t_m * cbrt(pow(k_m, 2.0)))), 3.0)), 3.0);
	} else {
		tmp = 2.0 * ((pow(l, 2.0) * cos(k_m)) / ((t_m * pow(k_m, 2.0)) * pow(sin(k_m), 2.0)));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = Math.pow(Math.cbrt(l), 2.0);
	double tmp;
	if (k_m <= 5.2e-88) {
		tmp = Math.pow((t_2 / (t_m * Math.pow(Math.cbrt(k_m), 2.0))), 3.0);
	} else if (k_m <= 1.65e-52) {
		tmp = 2.0 / Math.pow(((Math.sqrt((Math.sin(k_m) * Math.tan(k_m))) * (Math.pow(t_m, 1.5) / l)) * Math.hypot(1.0, Math.hypot(1.0, (k_m / t_m)))), 2.0);
	} else if (k_m <= 1800000000.0) {
		tmp = Math.pow(Math.cbrt(Math.pow((t_2 / (t_m * Math.cbrt(Math.pow(k_m, 2.0)))), 3.0)), 3.0);
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k_m)) / ((t_m * Math.pow(k_m, 2.0)) * Math.pow(Math.sin(k_m), 2.0)));
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = cbrt(l) ^ 2.0
	tmp = 0.0
	if (k_m <= 5.2e-88)
		tmp = Float64(t_2 / Float64(t_m * (cbrt(k_m) ^ 2.0))) ^ 3.0;
	elseif (k_m <= 1.65e-52)
		tmp = Float64(2.0 / (Float64(Float64(sqrt(Float64(sin(k_m) * tan(k_m))) * Float64((t_m ^ 1.5) / l)) * hypot(1.0, hypot(1.0, Float64(k_m / t_m)))) ^ 2.0));
	elseif (k_m <= 1800000000.0)
		tmp = cbrt((Float64(t_2 / Float64(t_m * cbrt((k_m ^ 2.0)))) ^ 3.0)) ^ 3.0;
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k_m)) / Float64(Float64(t_m * (k_m ^ 2.0)) * (sin(k_m) ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := Block[{t$95$2 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 5.2e-88], N[Power[N[(t$95$2 / N[(t$95$m * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 1.65e-52], N[(2.0 / N[Power[N[(N[(N[Sqrt[N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1800000000.0], N[Power[N[Power[N[Power[N[(t$95$2 / N[(t$95$m * N[Power[N[Power[k$95$m, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 5.2 \cdot 10^{-88}:\\
\;\;\;\;{\left(\frac{t_2}{t_m \cdot {\left(\sqrt[3]{k_m}\right)}^{2}}\right)}^{3}\\

\mathbf{elif}\;k_m \leq 1.65 \cdot 10^{-52}:\\
\;\;\;\;\frac{2}{{\left(\left(\sqrt{\sin k_m \cdot \tan k_m} \cdot \frac{{t_m}^{1.5}}{\ell}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k_m}{t_m}\right)\right)\right)}^{2}}\\

\mathbf{elif}\;k_m \leq 1800000000:\\
\;\;\;\;{\left(\sqrt[3]{{\left(\frac{t_2}{t_m \cdot \sqrt[3]{{k_m}^{2}}}\right)}^{3}}\right)}^{3}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot {\sin k_m}^{2}}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < 5.20000000000000027e-88

    1. Initial program 58.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified52.5%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 53.2%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative53.2%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified53.2%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt53.1%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow253.1%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div53.1%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow253.1%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod53.1%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow253.1%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod53.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow353.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube53.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow253.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod53.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow253.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div53.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow253.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod58.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow258.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr81.8%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus81.9%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval81.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified81.9%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]

    if 5.20000000000000027e-88 < k < 1.64999999999999998e-52

    1. Initial program 71.8%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt29.0%

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \cdot \sqrt{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}}} \]
      2. pow229.0%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\right)}^{2}}} \]
    3. Applied egg-rr42.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]

    if 1.64999999999999998e-52 < k < 1.8e9

    1. Initial program 64.6%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified64.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 73.5%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative73.5%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified73.5%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt73.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow273.4%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div73.5%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow273.5%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod73.6%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow273.6%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod73.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow373.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube73.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow273.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod73.5%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow273.5%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div73.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow273.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod82.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow282.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr82.0%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus82.0%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval82.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified82.0%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]
    10. Step-by-step derivation
      1. add-cbrt-cube82.0%

        \[\leadsto {\color{blue}{\left(\sqrt[3]{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right) \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}}\right)}}^{3} \]
      2. pow382.0%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}}}\right)}^{3} \]
      3. unpow282.0%

        \[\leadsto {\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{3}}\right)}^{3} \]
      4. cbrt-prod81.6%

        \[\leadsto {\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\sqrt[3]{k \cdot k}}}\right)}^{3}}\right)}^{3} \]
      5. unpow281.6%

        \[\leadsto {\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{{k}^{2}}}}\right)}^{3}}\right)}^{3} \]
    11. Applied egg-rr81.6%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}^{3}}\right)}}^{3} \]

    if 1.8e9 < k

    1. Initial program 43.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified43.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 75.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}} \]
    5. Simplified75.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 5.2 \cdot 10^{-88}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}\\ \mathbf{elif}\;k \leq 1.65 \cdot 10^{-52}:\\ \;\;\;\;\frac{2}{{\left(\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 1800000000:\\ \;\;\;\;{\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}^{3}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left(t \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \end{array} \]

Alternative 4: 80.6% accurate, 0.6× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;k_m \leq 6 \cdot 10^{-88}:\\ \;\;\;\;{\left(\frac{t_2}{t_m \cdot {\left(\sqrt[3]{k_m}\right)}^{2}}\right)}^{3}\\ \mathbf{elif}\;k_m \leq 7.4 \cdot 10^{-50}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(\sqrt{\sin k_m \cdot \tan k_m} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k_m}{t_m}\right)\right)\right)\right)}^{2}}\\ \mathbf{elif}\;k_m \leq 2900000000:\\ \;\;\;\;{\left(\sqrt[3]{{\left(\frac{t_2}{t_m \cdot \sqrt[3]{{k_m}^{2}}}\right)}^{3}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot {\sin k_m}^{2}}\\ \end{array} \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (let* ((t_2 (pow (cbrt l) 2.0)))
   (*
    t_s
    (if (<= k_m 6e-88)
      (pow (/ t_2 (* t_m (pow (cbrt k_m) 2.0))) 3.0)
      (if (<= k_m 7.4e-50)
        (/
         2.0
         (pow
          (*
           (/ (pow t_m 1.5) l)
           (*
            (sqrt (* (sin k_m) (tan k_m)))
            (hypot 1.0 (hypot 1.0 (/ k_m t_m)))))
          2.0))
        (if (<= k_m 2900000000.0)
          (pow (cbrt (pow (/ t_2 (* t_m (cbrt (pow k_m 2.0)))) 3.0)) 3.0)
          (*
           2.0
           (/
            (* (pow l 2.0) (cos k_m))
            (* (* t_m (pow k_m 2.0)) (pow (sin k_m) 2.0))))))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = pow(cbrt(l), 2.0);
	double tmp;
	if (k_m <= 6e-88) {
		tmp = pow((t_2 / (t_m * pow(cbrt(k_m), 2.0))), 3.0);
	} else if (k_m <= 7.4e-50) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (sqrt((sin(k_m) * tan(k_m))) * hypot(1.0, hypot(1.0, (k_m / t_m))))), 2.0);
	} else if (k_m <= 2900000000.0) {
		tmp = pow(cbrt(pow((t_2 / (t_m * cbrt(pow(k_m, 2.0)))), 3.0)), 3.0);
	} else {
		tmp = 2.0 * ((pow(l, 2.0) * cos(k_m)) / ((t_m * pow(k_m, 2.0)) * pow(sin(k_m), 2.0)));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = Math.pow(Math.cbrt(l), 2.0);
	double tmp;
	if (k_m <= 6e-88) {
		tmp = Math.pow((t_2 / (t_m * Math.pow(Math.cbrt(k_m), 2.0))), 3.0);
	} else if (k_m <= 7.4e-50) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.sqrt((Math.sin(k_m) * Math.tan(k_m))) * Math.hypot(1.0, Math.hypot(1.0, (k_m / t_m))))), 2.0);
	} else if (k_m <= 2900000000.0) {
		tmp = Math.pow(Math.cbrt(Math.pow((t_2 / (t_m * Math.cbrt(Math.pow(k_m, 2.0)))), 3.0)), 3.0);
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k_m)) / ((t_m * Math.pow(k_m, 2.0)) * Math.pow(Math.sin(k_m), 2.0)));
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = cbrt(l) ^ 2.0
	tmp = 0.0
	if (k_m <= 6e-88)
		tmp = Float64(t_2 / Float64(t_m * (cbrt(k_m) ^ 2.0))) ^ 3.0;
	elseif (k_m <= 7.4e-50)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(sqrt(Float64(sin(k_m) * tan(k_m))) * hypot(1.0, hypot(1.0, Float64(k_m / t_m))))) ^ 2.0));
	elseif (k_m <= 2900000000.0)
		tmp = cbrt((Float64(t_2 / Float64(t_m * cbrt((k_m ^ 2.0)))) ^ 3.0)) ^ 3.0;
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k_m)) / Float64(Float64(t_m * (k_m ^ 2.0)) * (sin(k_m) ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := Block[{t$95$2 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 6e-88], N[Power[N[(t$95$2 / N[(t$95$m * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 7.4e-50], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 2900000000.0], N[Power[N[Power[N[Power[N[(t$95$2 / N[(t$95$m * N[Power[N[Power[k$95$m, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 6 \cdot 10^{-88}:\\
\;\;\;\;{\left(\frac{t_2}{t_m \cdot {\left(\sqrt[3]{k_m}\right)}^{2}}\right)}^{3}\\

\mathbf{elif}\;k_m \leq 7.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(\sqrt{\sin k_m \cdot \tan k_m} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k_m}{t_m}\right)\right)\right)\right)}^{2}}\\

\mathbf{elif}\;k_m \leq 2900000000:\\
\;\;\;\;{\left(\sqrt[3]{{\left(\frac{t_2}{t_m \cdot \sqrt[3]{{k_m}^{2}}}\right)}^{3}}\right)}^{3}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot {\sin k_m}^{2}}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < 5.9999999999999999e-88

    1. Initial program 58.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified52.5%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 53.2%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative53.2%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified53.2%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt53.1%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow253.1%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div53.1%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow253.1%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod53.1%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow253.1%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod53.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow353.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube53.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow253.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod53.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow253.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div53.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow253.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod58.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow258.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr81.8%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus81.9%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval81.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified81.9%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]

    if 5.9999999999999999e-88 < k < 7.4000000000000002e-50

    1. Initial program 71.8%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Step-by-step derivation
      1. add-sqr-sqrt29.2%

        \[\leadsto \frac{2}{\left(\left(\color{blue}{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell}}\right)} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      2. pow229.2%

        \[\leadsto \frac{2}{\left(\left(\color{blue}{{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}^{2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      3. sqrt-div29.2%

        \[\leadsto \frac{2}{\left(\left({\color{blue}{\left(\frac{\sqrt{{t}^{3}}}{\sqrt{\ell \cdot \ell}}\right)}}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      4. sqrt-pow129.2%

        \[\leadsto \frac{2}{\left(\left({\left(\frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      5. metadata-eval29.2%

        \[\leadsto \frac{2}{\left(\left({\left(\frac{{t}^{\color{blue}{1.5}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      6. sqrt-prod15.1%

        \[\leadsto \frac{2}{\left(\left({\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      7. add-sqr-sqrt29.2%

        \[\leadsto \frac{2}{\left(\left({\left(\frac{{t}^{1.5}}{\color{blue}{\ell}}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    3. Applied egg-rr29.2%

      \[\leadsto \frac{2}{\left(\left(\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    4. Step-by-step derivation
      1. expm1-log1p-u29.2%

        \[\leadsto \frac{2}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left({\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)\right)}} \]
      2. expm1-udef15.9%

        \[\leadsto \frac{2}{\color{blue}{e^{\mathsf{log1p}\left(\left(\left({\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)} - 1}} \]
    5. Applied egg-rr27.7%

      \[\leadsto \frac{2}{\color{blue}{e^{\mathsf{log1p}\left({\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}\right)} - 1}} \]
    6. Step-by-step derivation
      1. expm1-def41.2%

        \[\leadsto \frac{2}{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}\right)\right)}} \]
      2. expm1-log1p42.5%

        \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
      3. associate-*l*42.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\sqrt{\sin k \cdot \tan k} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}}^{2}} \]
    7. Simplified42.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\sqrt{\sin k \cdot \tan k} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}} \]

    if 7.4000000000000002e-50 < k < 2.9e9

    1. Initial program 64.6%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified64.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 73.5%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative73.5%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified73.5%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt73.4%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow273.4%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div73.5%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow273.5%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod73.6%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow273.6%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod73.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow373.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube73.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow273.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod73.5%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow273.5%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div73.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow273.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod82.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow282.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr82.0%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus82.0%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval82.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified82.0%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]
    10. Step-by-step derivation
      1. add-cbrt-cube82.0%

        \[\leadsto {\color{blue}{\left(\sqrt[3]{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right) \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}}\right)}}^{3} \]
      2. pow382.0%

        \[\leadsto {\left(\sqrt[3]{\color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}}}\right)}^{3} \]
      3. unpow282.0%

        \[\leadsto {\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{3}}\right)}^{3} \]
      4. cbrt-prod81.6%

        \[\leadsto {\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\sqrt[3]{k \cdot k}}}\right)}^{3}}\right)}^{3} \]
      5. unpow281.6%

        \[\leadsto {\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{{k}^{2}}}}\right)}^{3}}\right)}^{3} \]
    11. Applied egg-rr81.6%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}^{3}}\right)}}^{3} \]

    if 2.9e9 < k

    1. Initial program 43.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified43.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 75.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}} \]
    5. Simplified75.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 6 \cdot 10^{-88}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}\\ \mathbf{elif}\;k \leq 7.4 \cdot 10^{-50}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\sqrt{\sin k \cdot \tan k} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 2900000000:\\ \;\;\;\;{\left(\sqrt[3]{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}^{3}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left(t \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \end{array} \]

Alternative 5: 80.2% accurate, 0.8× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;k_m \leq 12500000000:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m \cdot {\left(\sqrt[3]{k_m}\right)}^{2}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot {\sin k_m}^{2}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 12500000000.0)
    (pow (/ (pow (cbrt l) 2.0) (* t_m (pow (cbrt k_m) 2.0))) 3.0)
    (*
     2.0
     (/
      (* (pow l 2.0) (cos k_m))
      (* (* t_m (pow k_m 2.0)) (pow (sin k_m) 2.0)))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 12500000000.0) {
		tmp = pow((pow(cbrt(l), 2.0) / (t_m * pow(cbrt(k_m), 2.0))), 3.0);
	} else {
		tmp = 2.0 * ((pow(l, 2.0) * cos(k_m)) / ((t_m * pow(k_m, 2.0)) * pow(sin(k_m), 2.0)));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 12500000000.0) {
		tmp = Math.pow((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.pow(Math.cbrt(k_m), 2.0))), 3.0);
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k_m)) / ((t_m * Math.pow(k_m, 2.0)) * Math.pow(Math.sin(k_m), 2.0)));
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 12500000000.0)
		tmp = Float64((cbrt(l) ^ 2.0) / Float64(t_m * (cbrt(k_m) ^ 2.0))) ^ 3.0;
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k_m)) / Float64(Float64(t_m * (k_m ^ 2.0)) * (sin(k_m) ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 12500000000.0], N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 12500000000:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m \cdot {\left(\sqrt[3]{k_m}\right)}^{2}}\right)}^{3}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot {\sin k_m}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.25e10

    1. Initial program 59.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified53.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 55.1%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative55.1%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified55.1%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt55.0%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow255.0%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div55.0%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow255.0%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod55.0%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow255.0%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod54.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow354.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube54.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow254.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod54.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow254.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div55.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow255.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod60.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow260.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr82.4%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus82.4%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval82.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified82.4%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]

    if 1.25e10 < k

    1. Initial program 43.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified43.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 75.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}} \]
    5. Simplified75.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 12500000000:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left(t \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \end{array} \]

Alternative 6: 80.3% accurate, 0.8× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;k_m \leq 1800000000:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m \cdot {\left(\sqrt[3]{k_m}\right)}^{2}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(k_m \cdot 2\right)\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 1800000000.0)
    (pow (/ (pow (cbrt l) 2.0) (* t_m (pow (cbrt k_m) 2.0))) 3.0)
    (*
     2.0
     (/
      (* (pow l 2.0) (cos k_m))
      (* (* t_m (pow k_m 2.0)) (+ 0.5 (* -0.5 (cos (* k_m 2.0))))))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 1800000000.0) {
		tmp = pow((pow(cbrt(l), 2.0) / (t_m * pow(cbrt(k_m), 2.0))), 3.0);
	} else {
		tmp = 2.0 * ((pow(l, 2.0) * cos(k_m)) / ((t_m * pow(k_m, 2.0)) * (0.5 + (-0.5 * cos((k_m * 2.0))))));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 1800000000.0) {
		tmp = Math.pow((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.pow(Math.cbrt(k_m), 2.0))), 3.0);
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k_m)) / ((t_m * Math.pow(k_m, 2.0)) * (0.5 + (-0.5 * Math.cos((k_m * 2.0))))));
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 1800000000.0)
		tmp = Float64((cbrt(l) ^ 2.0) / Float64(t_m * (cbrt(k_m) ^ 2.0))) ^ 3.0;
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k_m)) / Float64(Float64(t_m * (k_m ^ 2.0)) * Float64(0.5 + Float64(-0.5 * cos(Float64(k_m * 2.0)))))));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 1800000000.0], N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(0.5 + N[(-0.5 * N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 1800000000:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m \cdot {\left(\sqrt[3]{k_m}\right)}^{2}}\right)}^{3}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(k_m \cdot 2\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.8e9

    1. Initial program 59.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified53.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 55.1%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative55.1%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified55.1%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt55.0%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow255.0%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div55.0%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow255.0%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod55.0%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow255.0%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod54.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow354.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube54.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow254.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod54.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow254.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div55.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow255.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod60.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow260.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr82.4%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus82.4%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval82.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified82.4%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]

    if 1.8e9 < k

    1. Initial program 43.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified43.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 75.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. unpow275.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(\sin k \cdot \sin k\right)}\right)} \]
      2. sin-mult75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\frac{\cos \left(k - k\right) - \cos \left(k + k\right)}{2}}\right)} \]
    5. Applied egg-rr75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\frac{\cos \left(k - k\right) - \cos \left(k + k\right)}{2}}\right)} \]
    6. Step-by-step derivation
      1. div-sub75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(\frac{\cos \left(k - k\right)}{2} - \frac{\cos \left(k + k\right)}{2}\right)}\right)} \]
      2. +-inverses75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\frac{\cos \color{blue}{0}}{2} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      3. cos-075.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\frac{\color{blue}{1}}{2} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      4. metadata-eval75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\color{blue}{0.5} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      5. count-275.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \color{blue}{\left(2 \cdot k\right)}}{2}\right)\right)} \]
      6. *-commutative75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \color{blue}{\left(k \cdot 2\right)}}{2}\right)\right)} \]
    7. Simplified75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(0.5 - \frac{\cos \left(k \cdot 2\right)}{2}\right)}\right)} \]
    8. Taylor expanded in k around inf 75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{{k}^{2} \cdot \left(t \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \]
      2. cancel-sign-sub-inv75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot \color{blue}{\left(0.5 + \left(-0.5\right) \cdot \cos \left(2 \cdot k\right)\right)}} \]
      3. metadata-eval75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot \left(0.5 + \color{blue}{-0.5} \cdot \cos \left(2 \cdot k\right)\right)} \]
    10. Simplified75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification80.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1800000000:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left(t \cdot {k}^{2}\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(k \cdot 2\right)\right)}\\ \end{array} \]

Alternative 7: 80.3% accurate, 0.8× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;k_m \leq 1800000000:\\ \;\;\;\;{\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k_m} \cdot \sqrt{t_m}}\right)}^{2}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(k_m \cdot 2\right)\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 1800000000.0)
    (pow (pow (/ (cbrt l) (* (cbrt k_m) (sqrt t_m))) 2.0) 3.0)
    (*
     2.0
     (/
      (* (pow l 2.0) (cos k_m))
      (* (* t_m (pow k_m 2.0)) (+ 0.5 (* -0.5 (cos (* k_m 2.0))))))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 1800000000.0) {
		tmp = pow(pow((cbrt(l) / (cbrt(k_m) * sqrt(t_m))), 2.0), 3.0);
	} else {
		tmp = 2.0 * ((pow(l, 2.0) * cos(k_m)) / ((t_m * pow(k_m, 2.0)) * (0.5 + (-0.5 * cos((k_m * 2.0))))));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 1800000000.0) {
		tmp = Math.pow(Math.pow((Math.cbrt(l) / (Math.cbrt(k_m) * Math.sqrt(t_m))), 2.0), 3.0);
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k_m)) / ((t_m * Math.pow(k_m, 2.0)) * (0.5 + (-0.5 * Math.cos((k_m * 2.0))))));
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 1800000000.0)
		tmp = (Float64(cbrt(l) / Float64(cbrt(k_m) * sqrt(t_m))) ^ 2.0) ^ 3.0;
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k_m)) / Float64(Float64(t_m * (k_m ^ 2.0)) * Float64(0.5 + Float64(-0.5 * cos(Float64(k_m * 2.0)))))));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 1800000000.0], N[Power[N[Power[N[(N[Power[l, 1/3], $MachinePrecision] / N[(N[Power[k$95$m, 1/3], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 3.0], $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(0.5 + N[(-0.5 * N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 1800000000:\\
\;\;\;\;{\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k_m} \cdot \sqrt{t_m}}\right)}^{2}\right)}^{3}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(k_m \cdot 2\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.8e9

    1. Initial program 59.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified53.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 55.1%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative55.1%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified55.1%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt55.0%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow255.0%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div55.0%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow255.0%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod55.0%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow255.0%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod54.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow354.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube54.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow254.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod54.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow254.9%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div55.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow255.0%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod60.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow260.8%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr82.4%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus82.4%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval82.4%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified82.4%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]
    10. Step-by-step derivation
      1. add-exp-log42.1%

        \[\leadsto {\left(\frac{{\color{blue}{\left(e^{\log \left(\sqrt[3]{\ell}\right)}\right)}}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3} \]
    11. Applied egg-rr42.1%

      \[\leadsto {\left(\frac{{\color{blue}{\left(e^{\log \left(\sqrt[3]{\ell}\right)}\right)}}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3} \]
    12. Step-by-step derivation
      1. rem-exp-log82.4%

        \[\leadsto {\left(\frac{{\color{blue}{\left(\sqrt[3]{\ell}\right)}}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3} \]
      2. associate-/r*82.4%

        \[\leadsto {\color{blue}{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{{\left(\sqrt[3]{k}\right)}^{2}}\right)}}^{3} \]
      3. unpow282.4%

        \[\leadsto {\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\color{blue}{\sqrt[3]{k} \cdot \sqrt[3]{k}}}\right)}^{3} \]
      4. cbrt-prod71.5%

        \[\leadsto {\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\color{blue}{\sqrt[3]{k \cdot k}}}\right)}^{3} \]
      5. unpow271.5%

        \[\leadsto {\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}{\sqrt[3]{\color{blue}{{k}^{2}}}}\right)}^{3} \]
      6. associate-/r*71.5%

        \[\leadsto {\color{blue}{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}}^{3} \]
      7. expm1-log1p-u52.5%

        \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)\right)\right)}}^{3} \]
      8. expm1-udef48.3%

        \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)} - 1\right)}}^{3} \]
    13. Applied egg-rr35.5%

      \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k} \cdot \sqrt{t}}\right)}^{2}\right)} - 1\right)}}^{3} \]
    14. Step-by-step derivation
      1. expm1-def39.1%

        \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k} \cdot \sqrt{t}}\right)}^{2}\right)\right)\right)}}^{3} \]
      2. expm1-log1p39.3%

        \[\leadsto {\color{blue}{\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k} \cdot \sqrt{t}}\right)}^{2}\right)}}^{3} \]
    15. Simplified39.3%

      \[\leadsto {\color{blue}{\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k} \cdot \sqrt{t}}\right)}^{2}\right)}}^{3} \]

    if 1.8e9 < k

    1. Initial program 43.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified43.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 75.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. unpow275.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(\sin k \cdot \sin k\right)}\right)} \]
      2. sin-mult75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\frac{\cos \left(k - k\right) - \cos \left(k + k\right)}{2}}\right)} \]
    5. Applied egg-rr75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\frac{\cos \left(k - k\right) - \cos \left(k + k\right)}{2}}\right)} \]
    6. Step-by-step derivation
      1. div-sub75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(\frac{\cos \left(k - k\right)}{2} - \frac{\cos \left(k + k\right)}{2}\right)}\right)} \]
      2. +-inverses75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\frac{\cos \color{blue}{0}}{2} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      3. cos-075.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\frac{\color{blue}{1}}{2} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      4. metadata-eval75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\color{blue}{0.5} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      5. count-275.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \color{blue}{\left(2 \cdot k\right)}}{2}\right)\right)} \]
      6. *-commutative75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \color{blue}{\left(k \cdot 2\right)}}{2}\right)\right)} \]
    7. Simplified75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(0.5 - \frac{\cos \left(k \cdot 2\right)}{2}\right)}\right)} \]
    8. Taylor expanded in k around inf 75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{{k}^{2} \cdot \left(t \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \]
      2. cancel-sign-sub-inv75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot \color{blue}{\left(0.5 + \left(-0.5\right) \cdot \cos \left(2 \cdot k\right)\right)}} \]
      3. metadata-eval75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot \left(0.5 + \color{blue}{-0.5} \cdot \cos \left(2 \cdot k\right)\right)} \]
    10. Simplified75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification47.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1800000000:\\ \;\;\;\;{\left({\left(\frac{\sqrt[3]{\ell}}{\sqrt[3]{k} \cdot \sqrt{t}}\right)}^{2}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left(t \cdot {k}^{2}\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(k \cdot 2\right)\right)}\\ \end{array} \]

Alternative 8: 76.8% accurate, 1.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m \cdot {k_m}^{0.6666666666666666}}\right)}^{3}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;k_m \leq 1.5 \cdot 10^{-185}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k_m \leq 8.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{2}{{\left(k_m \cdot \frac{{t_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k_m}{t_m}\right)}^{2}\right)\right)}\\ \mathbf{elif}\;k_m \leq 1800000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k_m}^{2}} \cdot \frac{\cos k_m}{t_m \cdot \left(0.5 - 0.5 \cdot \cos \left(k_m \cdot 2\right)\right)}\right)\\ \end{array} \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (let* ((t_2
         (pow
          (/ (pow (cbrt l) 2.0) (* t_m (pow k_m 0.6666666666666666)))
          3.0)))
   (*
    t_s
    (if (<= k_m 1.5e-185)
      t_2
      (if (<= k_m 8.2e-53)
        (/
         2.0
         (*
          (pow (* k_m (/ (pow t_m 1.5) l)) 2.0)
          (+ 1.0 (+ 1.0 (pow (/ k_m t_m) 2.0)))))
        (if (<= k_m 1800000000.0)
          t_2
          (*
           2.0
           (*
            (/ (pow l 2.0) (pow k_m 2.0))
            (/ (cos k_m) (* t_m (- 0.5 (* 0.5 (cos (* k_m 2.0))))))))))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = pow((pow(cbrt(l), 2.0) / (t_m * pow(k_m, 0.6666666666666666))), 3.0);
	double tmp;
	if (k_m <= 1.5e-185) {
		tmp = t_2;
	} else if (k_m <= 8.2e-53) {
		tmp = 2.0 / (pow((k_m * (pow(t_m, 1.5) / l)), 2.0) * (1.0 + (1.0 + pow((k_m / t_m), 2.0))));
	} else if (k_m <= 1800000000.0) {
		tmp = t_2;
	} else {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k_m, 2.0)) * (cos(k_m) / (t_m * (0.5 - (0.5 * cos((k_m * 2.0)))))));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = Math.pow((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.pow(k_m, 0.6666666666666666))), 3.0);
	double tmp;
	if (k_m <= 1.5e-185) {
		tmp = t_2;
	} else if (k_m <= 8.2e-53) {
		tmp = 2.0 / (Math.pow((k_m * (Math.pow(t_m, 1.5) / l)), 2.0) * (1.0 + (1.0 + Math.pow((k_m / t_m), 2.0))));
	} else if (k_m <= 1800000000.0) {
		tmp = t_2;
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t_m * (0.5 - (0.5 * Math.cos((k_m * 2.0)))))));
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = Float64((cbrt(l) ^ 2.0) / Float64(t_m * (k_m ^ 0.6666666666666666))) ^ 3.0
	tmp = 0.0
	if (k_m <= 1.5e-185)
		tmp = t_2;
	elseif (k_m <= 8.2e-53)
		tmp = Float64(2.0 / Float64((Float64(k_m * Float64((t_m ^ 1.5) / l)) ^ 2.0) * Float64(1.0 + Float64(1.0 + (Float64(k_m / t_m) ^ 2.0)))));
	elseif (k_m <= 1800000000.0)
		tmp = t_2;
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t_m * Float64(0.5 - Float64(0.5 * cos(Float64(k_m * 2.0))))))));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := Block[{t$95$2 = N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k$95$m, 0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 1.5e-185], t$95$2, If[LessEqual[k$95$m, 8.2e-53], N[(2.0 / N[(N[Power[N[(k$95$m * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k$95$m / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1800000000.0], t$95$2, N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k$95$m], $MachinePrecision] / N[(t$95$m * N[(0.5 - N[(0.5 * N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m \cdot {k_m}^{0.6666666666666666}}\right)}^{3}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 1.5 \cdot 10^{-185}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;k_m \leq 8.2 \cdot 10^{-53}:\\
\;\;\;\;\frac{2}{{\left(k_m \cdot \frac{{t_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k_m}{t_m}\right)}^{2}\right)\right)}\\

\mathbf{elif}\;k_m \leq 1800000000:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k_m}^{2}} \cdot \frac{\cos k_m}{t_m \cdot \left(0.5 - 0.5 \cdot \cos \left(k_m \cdot 2\right)\right)}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 1.50000000000000015e-185 or 8.2000000000000001e-53 < k < 1.8e9

    1. Initial program 59.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified53.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 53.8%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative53.8%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified53.8%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt53.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow253.7%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div53.7%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow253.7%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod53.7%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow253.7%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod53.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow353.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube53.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow253.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod53.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow253.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div53.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow253.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod58.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow258.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr80.3%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus80.3%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval80.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified80.3%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]
    10. Step-by-step derivation
      1. expm1-log1p-u57.4%

        \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)\right)\right)}}^{3} \]
      2. expm1-udef52.0%

        \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)} - 1\right)}}^{3} \]
      3. unpow252.0%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)} - 1\right)}^{3} \]
      4. cbrt-prod46.4%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\sqrt[3]{k \cdot k}}}\right)} - 1\right)}^{3} \]
      5. unpow246.4%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{{k}^{2}}}}\right)} - 1\right)}^{3} \]
    11. Applied egg-rr46.4%

      \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)} - 1\right)}}^{3} \]
    12. Step-by-step derivation
      1. expm1-def49.2%

        \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)\right)\right)}}^{3} \]
      2. expm1-log1p69.3%

        \[\leadsto {\color{blue}{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}}^{3} \]
    13. Simplified69.3%

      \[\leadsto {\color{blue}{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}}^{3} \]
    14. Step-by-step derivation
      1. pow1/368.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left({k}^{2}\right)}^{0.3333333333333333}}}\right)}^{3} \]
      2. pow-pow21.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{k}^{\left(2 \cdot 0.3333333333333333\right)}}}\right)}^{3} \]
      3. metadata-eval21.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {k}^{\color{blue}{0.6666666666666666}}}\right)}^{3} \]
    15. Applied egg-rr21.1%

      \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{k}^{0.6666666666666666}}}\right)}^{3} \]

    if 1.50000000000000015e-185 < k < 8.2000000000000001e-53

    1. Initial program 63.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r*59.8%

        \[\leadsto \frac{2}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      2. add-sqr-sqrt33.7%

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)}\right)} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      3. pow233.7%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      4. *-commutative33.7%

        \[\leadsto \frac{2}{{\left(\sqrt{\color{blue}{\left(\sin k \cdot \tan k\right) \cdot \frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      5. sqrt-prod33.7%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      6. sqrt-div37.2%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \color{blue}{\frac{\sqrt{{t}^{3}}}{\sqrt{\ell \cdot \ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      7. sqrt-pow144.7%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      8. metadata-eval44.7%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{\color{blue}{1.5}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      9. sqrt-prod29.5%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      10. add-sqr-sqrt55.5%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\color{blue}{\ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    3. Applied egg-rr55.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    4. Step-by-step derivation
      1. *-commutative55.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    5. Simplified55.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    6. Taylor expanded in k around 0 59.0%

      \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \color{blue}{k}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]

    if 1.8e9 < k

    1. Initial program 43.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified43.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 75.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. unpow275.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(\sin k \cdot \sin k\right)}\right)} \]
      2. sin-mult75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\frac{\cos \left(k - k\right) - \cos \left(k + k\right)}{2}}\right)} \]
    5. Applied egg-rr75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\frac{\cos \left(k - k\right) - \cos \left(k + k\right)}{2}}\right)} \]
    6. Step-by-step derivation
      1. div-sub75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(\frac{\cos \left(k - k\right)}{2} - \frac{\cos \left(k + k\right)}{2}\right)}\right)} \]
      2. +-inverses75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\frac{\cos \color{blue}{0}}{2} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      3. cos-075.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\frac{\color{blue}{1}}{2} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      4. metadata-eval75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\color{blue}{0.5} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      5. count-275.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \color{blue}{\left(2 \cdot k\right)}}{2}\right)\right)} \]
      6. *-commutative75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \color{blue}{\left(k \cdot 2\right)}}{2}\right)\right)} \]
    7. Simplified75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(0.5 - \frac{\cos \left(k \cdot 2\right)}{2}\right)}\right)} \]
    8. Step-by-step derivation
      1. times-frac70.3%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot \left(0.5 - \frac{\cos \left(k \cdot 2\right)}{2}\right)}\right)} \]
      2. div-inv70.3%

        \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot \left(0.5 - \color{blue}{\cos \left(k \cdot 2\right) \cdot \frac{1}{2}}\right)}\right) \]
      3. *-commutative70.3%

        \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot \left(0.5 - \cos \color{blue}{\left(2 \cdot k\right)} \cdot \frac{1}{2}\right)}\right) \]
      4. metadata-eval70.3%

        \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot \left(0.5 - \cos \left(2 \cdot k\right) \cdot \color{blue}{0.5}\right)}\right) \]
    9. Applied egg-rr70.3%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot \left(0.5 - \cos \left(2 \cdot k\right) \cdot 0.5\right)}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification36.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.5 \cdot 10^{-185}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {k}^{0.6666666666666666}}\right)}^{3}\\ \mathbf{elif}\;k \leq 8.2 \cdot 10^{-53}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}\\ \mathbf{elif}\;k \leq 1800000000:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {k}^{0.6666666666666666}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot \left(0.5 - 0.5 \cdot \cos \left(k \cdot 2\right)\right)}\right)\\ \end{array} \]

Alternative 9: 77.7% accurate, 1.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m \cdot {k_m}^{0.6666666666666666}}\right)}^{3}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;k_m \leq 1.3 \cdot 10^{-185}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k_m \leq 1.4 \cdot 10^{-50}:\\ \;\;\;\;\frac{2}{{\left(k_m \cdot \frac{{t_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k_m}{t_m}\right)}^{2}\right)\right)}\\ \mathbf{elif}\;k_m \leq 1800000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(k_m \cdot 2\right)\right)}\\ \end{array} \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (let* ((t_2
         (pow
          (/ (pow (cbrt l) 2.0) (* t_m (pow k_m 0.6666666666666666)))
          3.0)))
   (*
    t_s
    (if (<= k_m 1.3e-185)
      t_2
      (if (<= k_m 1.4e-50)
        (/
         2.0
         (*
          (pow (* k_m (/ (pow t_m 1.5) l)) 2.0)
          (+ 1.0 (+ 1.0 (pow (/ k_m t_m) 2.0)))))
        (if (<= k_m 1800000000.0)
          t_2
          (*
           2.0
           (/
            (* (pow l 2.0) (cos k_m))
            (*
             (* t_m (pow k_m 2.0))
             (+ 0.5 (* -0.5 (cos (* k_m 2.0)))))))))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = pow((pow(cbrt(l), 2.0) / (t_m * pow(k_m, 0.6666666666666666))), 3.0);
	double tmp;
	if (k_m <= 1.3e-185) {
		tmp = t_2;
	} else if (k_m <= 1.4e-50) {
		tmp = 2.0 / (pow((k_m * (pow(t_m, 1.5) / l)), 2.0) * (1.0 + (1.0 + pow((k_m / t_m), 2.0))));
	} else if (k_m <= 1800000000.0) {
		tmp = t_2;
	} else {
		tmp = 2.0 * ((pow(l, 2.0) * cos(k_m)) / ((t_m * pow(k_m, 2.0)) * (0.5 + (-0.5 * cos((k_m * 2.0))))));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = Math.pow((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.pow(k_m, 0.6666666666666666))), 3.0);
	double tmp;
	if (k_m <= 1.3e-185) {
		tmp = t_2;
	} else if (k_m <= 1.4e-50) {
		tmp = 2.0 / (Math.pow((k_m * (Math.pow(t_m, 1.5) / l)), 2.0) * (1.0 + (1.0 + Math.pow((k_m / t_m), 2.0))));
	} else if (k_m <= 1800000000.0) {
		tmp = t_2;
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k_m)) / ((t_m * Math.pow(k_m, 2.0)) * (0.5 + (-0.5 * Math.cos((k_m * 2.0))))));
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = Float64((cbrt(l) ^ 2.0) / Float64(t_m * (k_m ^ 0.6666666666666666))) ^ 3.0
	tmp = 0.0
	if (k_m <= 1.3e-185)
		tmp = t_2;
	elseif (k_m <= 1.4e-50)
		tmp = Float64(2.0 / Float64((Float64(k_m * Float64((t_m ^ 1.5) / l)) ^ 2.0) * Float64(1.0 + Float64(1.0 + (Float64(k_m / t_m) ^ 2.0)))));
	elseif (k_m <= 1800000000.0)
		tmp = t_2;
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k_m)) / Float64(Float64(t_m * (k_m ^ 2.0)) * Float64(0.5 + Float64(-0.5 * cos(Float64(k_m * 2.0)))))));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := Block[{t$95$2 = N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k$95$m, 0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 1.3e-185], t$95$2, If[LessEqual[k$95$m, 1.4e-50], N[(2.0 / N[(N[Power[N[(k$95$m * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k$95$m / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1800000000.0], t$95$2, N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(0.5 + N[(-0.5 * N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m \cdot {k_m}^{0.6666666666666666}}\right)}^{3}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 1.3 \cdot 10^{-185}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;k_m \leq 1.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{2}{{\left(k_m \cdot \frac{{t_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k_m}{t_m}\right)}^{2}\right)\right)}\\

\mathbf{elif}\;k_m \leq 1800000000:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k_m}{\left(t_m \cdot {k_m}^{2}\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(k_m \cdot 2\right)\right)}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 1.29999999999999992e-185 or 1.3999999999999999e-50 < k < 1.8e9

    1. Initial program 59.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified53.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 53.8%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative53.8%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified53.8%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt53.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow253.7%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div53.7%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow253.7%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod53.7%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow253.7%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod53.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow353.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube53.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow253.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod53.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow253.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div53.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow253.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod58.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow258.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr80.3%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus80.3%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval80.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified80.3%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]
    10. Step-by-step derivation
      1. expm1-log1p-u57.4%

        \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)\right)\right)}}^{3} \]
      2. expm1-udef52.0%

        \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)} - 1\right)}}^{3} \]
      3. unpow252.0%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)} - 1\right)}^{3} \]
      4. cbrt-prod46.4%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\sqrt[3]{k \cdot k}}}\right)} - 1\right)}^{3} \]
      5. unpow246.4%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{{k}^{2}}}}\right)} - 1\right)}^{3} \]
    11. Applied egg-rr46.4%

      \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)} - 1\right)}}^{3} \]
    12. Step-by-step derivation
      1. expm1-def49.2%

        \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)\right)\right)}}^{3} \]
      2. expm1-log1p69.3%

        \[\leadsto {\color{blue}{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}}^{3} \]
    13. Simplified69.3%

      \[\leadsto {\color{blue}{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}}^{3} \]
    14. Step-by-step derivation
      1. pow1/368.7%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left({k}^{2}\right)}^{0.3333333333333333}}}\right)}^{3} \]
      2. pow-pow21.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{k}^{\left(2 \cdot 0.3333333333333333\right)}}}\right)}^{3} \]
      3. metadata-eval21.1%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {k}^{\color{blue}{0.6666666666666666}}}\right)}^{3} \]
    15. Applied egg-rr21.1%

      \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{k}^{0.6666666666666666}}}\right)}^{3} \]

    if 1.29999999999999992e-185 < k < 1.3999999999999999e-50

    1. Initial program 63.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r*59.8%

        \[\leadsto \frac{2}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      2. add-sqr-sqrt33.7%

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)}\right)} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      3. pow233.7%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      4. *-commutative33.7%

        \[\leadsto \frac{2}{{\left(\sqrt{\color{blue}{\left(\sin k \cdot \tan k\right) \cdot \frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      5. sqrt-prod33.7%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      6. sqrt-div37.2%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \color{blue}{\frac{\sqrt{{t}^{3}}}{\sqrt{\ell \cdot \ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      7. sqrt-pow144.7%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      8. metadata-eval44.7%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{\color{blue}{1.5}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      9. sqrt-prod29.5%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      10. add-sqr-sqrt55.5%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\color{blue}{\ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    3. Applied egg-rr55.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    4. Step-by-step derivation
      1. *-commutative55.5%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    5. Simplified55.5%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    6. Taylor expanded in k around 0 59.0%

      \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \color{blue}{k}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]

    if 1.8e9 < k

    1. Initial program 43.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified43.9%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 75.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. unpow275.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(\sin k \cdot \sin k\right)}\right)} \]
      2. sin-mult75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\frac{\cos \left(k - k\right) - \cos \left(k + k\right)}{2}}\right)} \]
    5. Applied egg-rr75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\frac{\cos \left(k - k\right) - \cos \left(k + k\right)}{2}}\right)} \]
    6. Step-by-step derivation
      1. div-sub75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(\frac{\cos \left(k - k\right)}{2} - \frac{\cos \left(k + k\right)}{2}\right)}\right)} \]
      2. +-inverses75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\frac{\cos \color{blue}{0}}{2} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      3. cos-075.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\frac{\color{blue}{1}}{2} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      4. metadata-eval75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(\color{blue}{0.5} - \frac{\cos \left(k + k\right)}{2}\right)\right)} \]
      5. count-275.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \color{blue}{\left(2 \cdot k\right)}}{2}\right)\right)} \]
      6. *-commutative75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \left(0.5 - \frac{\cos \color{blue}{\left(k \cdot 2\right)}}{2}\right)\right)} \]
    7. Simplified75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \color{blue}{\left(0.5 - \frac{\cos \left(k \cdot 2\right)}{2}\right)}\right)} \]
    8. Taylor expanded in k around inf 75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{{k}^{2} \cdot \left(t \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)\right)}} \]
    9. Step-by-step derivation
      1. associate-*r*75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \]
      2. cancel-sign-sub-inv75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot \color{blue}{\left(0.5 + \left(-0.5\right) \cdot \cos \left(2 \cdot k\right)\right)}} \]
      3. metadata-eval75.8%

        \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left({k}^{2} \cdot t\right) \cdot \left(0.5 + \color{blue}{-0.5} \cdot \cos \left(2 \cdot k\right)\right)} \]
    10. Simplified75.8%

      \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\color{blue}{\left({k}^{2} \cdot t\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification37.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.3 \cdot 10^{-185}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {k}^{0.6666666666666666}}\right)}^{3}\\ \mathbf{elif}\;k \leq 1.4 \cdot 10^{-50}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}\\ \mathbf{elif}\;k \leq 1800000000:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {k}^{0.6666666666666666}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{\left(t \cdot {k}^{2}\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(k \cdot 2\right)\right)}\\ \end{array} \]

Alternative 10: 76.4% accurate, 1.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 5 \cdot 10^{-113}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\ \mathbf{elif}\;t_m \leq 1.05 \cdot 10^{+155}:\\ \;\;\;\;\frac{2}{{\left(k_m \cdot \frac{{t_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k_m}{t_m}\right)}^{2}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m \cdot {k_m}^{0.6666666666666666}}\right)}^{3}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 5e-113)
    (* 2.0 (/ (pow (* l (pow k_m -2.0)) 2.0) t_m))
    (if (<= t_m 1.05e+155)
      (/
       2.0
       (*
        (pow (* k_m (/ (pow t_m 1.5) l)) 2.0)
        (+ 1.0 (+ 1.0 (pow (/ k_m t_m) 2.0)))))
      (pow (/ (pow (cbrt l) 2.0) (* t_m (pow k_m 0.6666666666666666))) 3.0)))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (t_m <= 5e-113) {
		tmp = 2.0 * (pow((l * pow(k_m, -2.0)), 2.0) / t_m);
	} else if (t_m <= 1.05e+155) {
		tmp = 2.0 / (pow((k_m * (pow(t_m, 1.5) / l)), 2.0) * (1.0 + (1.0 + pow((k_m / t_m), 2.0))));
	} else {
		tmp = pow((pow(cbrt(l), 2.0) / (t_m * pow(k_m, 0.6666666666666666))), 3.0);
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (t_m <= 5e-113) {
		tmp = 2.0 * (Math.pow((l * Math.pow(k_m, -2.0)), 2.0) / t_m);
	} else if (t_m <= 1.05e+155) {
		tmp = 2.0 / (Math.pow((k_m * (Math.pow(t_m, 1.5) / l)), 2.0) * (1.0 + (1.0 + Math.pow((k_m / t_m), 2.0))));
	} else {
		tmp = Math.pow((Math.pow(Math.cbrt(l), 2.0) / (t_m * Math.pow(k_m, 0.6666666666666666))), 3.0);
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (t_m <= 5e-113)
		tmp = Float64(2.0 * Float64((Float64(l * (k_m ^ -2.0)) ^ 2.0) / t_m));
	elseif (t_m <= 1.05e+155)
		tmp = Float64(2.0 / Float64((Float64(k_m * Float64((t_m ^ 1.5) / l)) ^ 2.0) * Float64(1.0 + Float64(1.0 + (Float64(k_m / t_m) ^ 2.0)))));
	else
		tmp = Float64((cbrt(l) ^ 2.0) / Float64(t_m * (k_m ^ 0.6666666666666666))) ^ 3.0;
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 5e-113], N[(2.0 * N[(N[Power[N[(l * N[Power[k$95$m, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+155], N[(2.0 / N[(N[Power[N[(k$95$m * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k$95$m / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k$95$m, 0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5 \cdot 10^{-113}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\

\mathbf{elif}\;t_m \leq 1.05 \cdot 10^{+155}:\\
\;\;\;\;\frac{2}{{\left(k_m \cdot \frac{{t_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k_m}{t_m}\right)}^{2}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m \cdot {k_m}^{0.6666666666666666}}\right)}^{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 4.9999999999999997e-113

    1. Initial program 52.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified48.1%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 64.6%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Taylor expanded in k around 0 52.9%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. associate-/r*53.5%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    6. Simplified53.5%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u53.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
      2. expm1-udef53.2%

        \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
      3. div-inv53.2%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
      4. pow-flip53.2%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
      5. metadata-eval53.2%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
    8. Applied egg-rr53.2%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
    9. Step-by-step derivation
      1. expm1-def53.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
      2. expm1-log1p53.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    10. Simplified53.5%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt53.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\sqrt{{\ell}^{2} \cdot {k}^{-4}} \cdot \sqrt{{\ell}^{2} \cdot {k}^{-4}}}}{t} \]
      2. pow253.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\sqrt{{\ell}^{2} \cdot {k}^{-4}}\right)}^{2}}}{t} \]
      3. sqrt-prod53.5%

        \[\leadsto 2 \cdot \frac{{\color{blue}{\left(\sqrt{{\ell}^{2}} \cdot \sqrt{{k}^{-4}}\right)}}^{2}}{t} \]
      4. unpow253.5%

        \[\leadsto 2 \cdot \frac{{\left(\sqrt{\color{blue}{\ell \cdot \ell}} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      5. sqrt-prod31.8%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      6. add-sqr-sqrt59.5%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\ell} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      7. sqrt-pow160.2%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot \color{blue}{{k}^{\left(\frac{-4}{2}\right)}}\right)}^{2}}{t} \]
      8. metadata-eval60.2%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot {k}^{\color{blue}{-2}}\right)}^{2}}{t} \]
    12. Applied egg-rr60.2%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\ell \cdot {k}^{-2}\right)}^{2}}}{t} \]

    if 4.9999999999999997e-113 < t < 1.05e155

    1. Initial program 59.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r*59.5%

        \[\leadsto \frac{2}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      2. add-sqr-sqrt38.1%

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)}\right)} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      3. pow238.1%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      4. *-commutative38.1%

        \[\leadsto \frac{2}{{\left(\sqrt{\color{blue}{\left(\sin k \cdot \tan k\right) \cdot \frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      5. sqrt-prod38.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      6. sqrt-div41.2%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \color{blue}{\frac{\sqrt{{t}^{3}}}{\sqrt{\ell \cdot \ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      7. sqrt-pow155.9%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      8. metadata-eval55.9%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{\color{blue}{1.5}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      9. sqrt-prod34.4%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      10. add-sqr-sqrt62.2%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\color{blue}{\ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    3. Applied egg-rr62.2%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    4. Step-by-step derivation
      1. *-commutative62.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    5. Simplified62.2%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    6. Taylor expanded in k around 0 82.8%

      \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \color{blue}{k}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]

    if 1.05e155 < t

    1. Initial program 74.5%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified57.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 57.3%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative57.3%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified57.3%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    6. Step-by-step derivation
      1. add-cube-cbrt57.3%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right) \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}} \]
      2. pow257.3%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}}\right)}^{2}} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      3. cbrt-div57.3%

        \[\leadsto {\color{blue}{\left(\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      4. pow257.3%

        \[\leadsto {\left(\frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      5. cbrt-prod57.3%

        \[\leadsto {\left(\frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      6. pow257.3%

        \[\leadsto {\left(\frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      7. cbrt-prod57.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{\sqrt[3]{{t}^{3}} \cdot \sqrt[3]{{k}^{2}}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      8. unpow357.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      9. add-cbrt-cube57.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\color{blue}{t} \cdot \sqrt[3]{{k}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      10. unpow257.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{k \cdot k}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      11. cbrt-prod57.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      12. pow257.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left(\sqrt[3]{k}\right)}^{2}}}\right)}^{2} \cdot \sqrt[3]{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
      13. cbrt-div57.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{{\ell}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}}} \]
      14. pow257.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      15. cbrt-prod61.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
      16. pow261.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}{\sqrt[3]{{t}^{3} \cdot {k}^{2}}} \]
    7. Applied egg-rr94.5%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{2} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. pow-plus94.5%

        \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\left(2 + 1\right)}} \]
      2. metadata-eval94.5%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{\color{blue}{3}} \]
    9. Simplified94.5%

      \[\leadsto \color{blue}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}} \]
    10. Step-by-step derivation
      1. expm1-log1p-u94.1%

        \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)\right)\right)}}^{3} \]
      2. expm1-udef86.7%

        \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k}\right)}^{2}}\right)} - 1\right)}}^{3} \]
      3. unpow286.7%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\left(\sqrt[3]{k} \cdot \sqrt[3]{k}\right)}}\right)} - 1\right)}^{3} \]
      4. cbrt-prod66.4%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{\sqrt[3]{k \cdot k}}}\right)} - 1\right)}^{3} \]
      5. unpow266.4%

        \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{\color{blue}{{k}^{2}}}}\right)} - 1\right)}^{3} \]
    11. Applied egg-rr66.4%

      \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)} - 1\right)}}^{3} \]
    12. Step-by-step derivation
      1. expm1-def66.3%

        \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)\right)\right)}}^{3} \]
      2. expm1-log1p66.3%

        \[\leadsto {\color{blue}{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}}^{3} \]
    13. Simplified66.3%

      \[\leadsto {\color{blue}{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \sqrt[3]{{k}^{2}}}\right)}}^{3} \]
    14. Step-by-step derivation
      1. pow1/366.3%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{\left({k}^{2}\right)}^{0.3333333333333333}}}\right)}^{3} \]
      2. pow-pow36.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{k}^{\left(2 \cdot 0.3333333333333333\right)}}}\right)}^{3} \]
      3. metadata-eval36.6%

        \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {k}^{\color{blue}{0.6666666666666666}}}\right)}^{3} \]
    15. Applied egg-rr36.6%

      \[\leadsto {\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot \color{blue}{{k}^{0.6666666666666666}}}\right)}^{3} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5 \cdot 10^{-113}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{+155}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {k}^{0.6666666666666666}}\right)}^{3}\\ \end{array} \]

Alternative 11: 73.6% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 3.2 \cdot 10^{-113}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k_m \cdot \frac{{t_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k_m}{t_m}\right)}^{2}\right)\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.2e-113)
    (* 2.0 (/ (pow (* l (pow k_m -2.0)) 2.0) t_m))
    (/
     2.0
     (*
      (pow (* k_m (/ (pow t_m 1.5) l)) 2.0)
      (+ 1.0 (+ 1.0 (pow (/ k_m t_m) 2.0))))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (t_m <= 3.2e-113) {
		tmp = 2.0 * (pow((l * pow(k_m, -2.0)), 2.0) / t_m);
	} else {
		tmp = 2.0 / (pow((k_m * (pow(t_m, 1.5) / l)), 2.0) * (1.0 + (1.0 + pow((k_m / t_m), 2.0))));
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (t_m <= 3.2d-113) then
        tmp = 2.0d0 * (((l * (k_m ** (-2.0d0))) ** 2.0d0) / t_m)
    else
        tmp = 2.0d0 / (((k_m * ((t_m ** 1.5d0) / l)) ** 2.0d0) * (1.0d0 + (1.0d0 + ((k_m / t_m) ** 2.0d0))))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (t_m <= 3.2e-113) {
		tmp = 2.0 * (Math.pow((l * Math.pow(k_m, -2.0)), 2.0) / t_m);
	} else {
		tmp = 2.0 / (Math.pow((k_m * (Math.pow(t_m, 1.5) / l)), 2.0) * (1.0 + (1.0 + Math.pow((k_m / t_m), 2.0))));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if t_m <= 3.2e-113:
		tmp = 2.0 * (math.pow((l * math.pow(k_m, -2.0)), 2.0) / t_m)
	else:
		tmp = 2.0 / (math.pow((k_m * (math.pow(t_m, 1.5) / l)), 2.0) * (1.0 + (1.0 + math.pow((k_m / t_m), 2.0))))
	return t_s * tmp
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (t_m <= 3.2e-113)
		tmp = Float64(2.0 * Float64((Float64(l * (k_m ^ -2.0)) ^ 2.0) / t_m));
	else
		tmp = Float64(2.0 / Float64((Float64(k_m * Float64((t_m ^ 1.5) / l)) ^ 2.0) * Float64(1.0 + Float64(1.0 + (Float64(k_m / t_m) ^ 2.0)))));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (t_m <= 3.2e-113)
		tmp = 2.0 * (((l * (k_m ^ -2.0)) ^ 2.0) / t_m);
	else
		tmp = 2.0 / (((k_m * ((t_m ^ 1.5) / l)) ^ 2.0) * (1.0 + (1.0 + ((k_m / t_m) ^ 2.0))));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 3.2e-113], N[(2.0 * N[(N[Power[N[(l * N[Power[k$95$m, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k$95$m * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k$95$m / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 3.2 \cdot 10^{-113}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(k_m \cdot \frac{{t_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k_m}{t_m}\right)}^{2}\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.2000000000000002e-113

    1. Initial program 52.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified48.1%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 64.6%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Taylor expanded in k around 0 52.9%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. associate-/r*53.5%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    6. Simplified53.5%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u53.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
      2. expm1-udef53.2%

        \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
      3. div-inv53.2%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
      4. pow-flip53.2%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
      5. metadata-eval53.2%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
    8. Applied egg-rr53.2%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
    9. Step-by-step derivation
      1. expm1-def53.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
      2. expm1-log1p53.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    10. Simplified53.5%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt53.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\sqrt{{\ell}^{2} \cdot {k}^{-4}} \cdot \sqrt{{\ell}^{2} \cdot {k}^{-4}}}}{t} \]
      2. pow253.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\sqrt{{\ell}^{2} \cdot {k}^{-4}}\right)}^{2}}}{t} \]
      3. sqrt-prod53.5%

        \[\leadsto 2 \cdot \frac{{\color{blue}{\left(\sqrt{{\ell}^{2}} \cdot \sqrt{{k}^{-4}}\right)}}^{2}}{t} \]
      4. unpow253.5%

        \[\leadsto 2 \cdot \frac{{\left(\sqrt{\color{blue}{\ell \cdot \ell}} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      5. sqrt-prod31.8%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      6. add-sqr-sqrt59.5%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\ell} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      7. sqrt-pow160.2%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot \color{blue}{{k}^{\left(\frac{-4}{2}\right)}}\right)}^{2}}{t} \]
      8. metadata-eval60.2%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot {k}^{\color{blue}{-2}}\right)}^{2}}{t} \]
    12. Applied egg-rr60.2%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\ell \cdot {k}^{-2}\right)}^{2}}}{t} \]

    if 3.2000000000000002e-113 < t

    1. Initial program 64.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Step-by-step derivation
      1. associate-*r*58.9%

        \[\leadsto \frac{2}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      2. add-sqr-sqrt37.7%

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)}\right)} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      3. pow237.7%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      4. *-commutative37.7%

        \[\leadsto \frac{2}{{\left(\sqrt{\color{blue}{\left(\sin k \cdot \tan k\right) \cdot \frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      5. sqrt-prod37.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\frac{{t}^{3}}{\ell \cdot \ell}}\right)}}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      6. sqrt-div39.9%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \color{blue}{\frac{\sqrt{{t}^{3}}}{\sqrt{\ell \cdot \ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      7. sqrt-pow150.4%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      8. metadata-eval50.4%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{\color{blue}{1.5}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      9. sqrt-prod31.5%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      10. add-sqr-sqrt55.0%

        \[\leadsto \frac{2}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\color{blue}{\ell}}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    3. Applied egg-rr55.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    4. Step-by-step derivation
      1. *-commutative55.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    5. Simplified55.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    6. Taylor expanded in k around 0 81.7%

      \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \color{blue}{k}\right)}^{2} \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.2 \cdot 10^{-113}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}\\ \end{array} \]

Alternative 12: 57.6% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 3.8 \cdot 10^{-150}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\ \mathbf{elif}\;\ell \leq 3.9 \cdot 10^{+150}:\\ \;\;\;\;\frac{2}{2 \cdot \frac{{k_m}^{2} \cdot {t_m}^{3}}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{\sqrt{\frac{t_m}{{k_m}^{-4}}}}\right)}^{2}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= l 3.8e-150)
    (* 2.0 (/ (pow (* l (pow k_m -2.0)) 2.0) t_m))
    (if (<= l 3.9e+150)
      (/ 2.0 (* 2.0 (/ (* (pow k_m 2.0) (pow t_m 3.0)) (pow l 2.0))))
      (* 2.0 (pow (/ l (sqrt (/ t_m (pow k_m -4.0)))) 2.0))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (l <= 3.8e-150) {
		tmp = 2.0 * (pow((l * pow(k_m, -2.0)), 2.0) / t_m);
	} else if (l <= 3.9e+150) {
		tmp = 2.0 / (2.0 * ((pow(k_m, 2.0) * pow(t_m, 3.0)) / pow(l, 2.0)));
	} else {
		tmp = 2.0 * pow((l / sqrt((t_m / pow(k_m, -4.0)))), 2.0);
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (l <= 3.8d-150) then
        tmp = 2.0d0 * (((l * (k_m ** (-2.0d0))) ** 2.0d0) / t_m)
    else if (l <= 3.9d+150) then
        tmp = 2.0d0 / (2.0d0 * (((k_m ** 2.0d0) * (t_m ** 3.0d0)) / (l ** 2.0d0)))
    else
        tmp = 2.0d0 * ((l / sqrt((t_m / (k_m ** (-4.0d0))))) ** 2.0d0)
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (l <= 3.8e-150) {
		tmp = 2.0 * (Math.pow((l * Math.pow(k_m, -2.0)), 2.0) / t_m);
	} else if (l <= 3.9e+150) {
		tmp = 2.0 / (2.0 * ((Math.pow(k_m, 2.0) * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 * Math.pow((l / Math.sqrt((t_m / Math.pow(k_m, -4.0)))), 2.0);
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if l <= 3.8e-150:
		tmp = 2.0 * (math.pow((l * math.pow(k_m, -2.0)), 2.0) / t_m)
	elif l <= 3.9e+150:
		tmp = 2.0 / (2.0 * ((math.pow(k_m, 2.0) * math.pow(t_m, 3.0)) / math.pow(l, 2.0)))
	else:
		tmp = 2.0 * math.pow((l / math.sqrt((t_m / math.pow(k_m, -4.0)))), 2.0)
	return t_s * tmp
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (l <= 3.8e-150)
		tmp = Float64(2.0 * Float64((Float64(l * (k_m ^ -2.0)) ^ 2.0) / t_m));
	elseif (l <= 3.9e+150)
		tmp = Float64(2.0 / Float64(2.0 * Float64(Float64((k_m ^ 2.0) * (t_m ^ 3.0)) / (l ^ 2.0))));
	else
		tmp = Float64(2.0 * (Float64(l / sqrt(Float64(t_m / (k_m ^ -4.0)))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (l <= 3.8e-150)
		tmp = 2.0 * (((l * (k_m ^ -2.0)) ^ 2.0) / t_m);
	elseif (l <= 3.9e+150)
		tmp = 2.0 / (2.0 * (((k_m ^ 2.0) * (t_m ^ 3.0)) / (l ^ 2.0)));
	else
		tmp = 2.0 * ((l / sqrt((t_m / (k_m ^ -4.0)))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * If[LessEqual[l, 3.8e-150], N[(2.0 * N[(N[Power[N[(l * N[Power[k$95$m, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.9e+150], N[(2.0 / N[(2.0 * N[(N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(l / N[Sqrt[N[(t$95$m / N[Power[k$95$m, -4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 3.8 \cdot 10^{-150}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\

\mathbf{elif}\;\ell \leq 3.9 \cdot 10^{+150}:\\
\;\;\;\;\frac{2}{2 \cdot \frac{{k_m}^{2} \cdot {t_m}^{3}}{{\ell}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{\sqrt{\frac{t_m}{{k_m}^{-4}}}}\right)}^{2}\\


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

    1. Initial program 54.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified50.2%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 61.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Taylor expanded in k around 0 55.2%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. associate-/r*55.9%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    6. Simplified55.9%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u55.8%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
      2. expm1-udef56.1%

        \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
      3. div-inv56.1%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
      4. pow-flip56.1%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
      5. metadata-eval56.1%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
    8. Applied egg-rr56.1%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
    9. Step-by-step derivation
      1. expm1-def55.8%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
      2. expm1-log1p55.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    10. Simplified55.9%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt55.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{\sqrt{{\ell}^{2} \cdot {k}^{-4}} \cdot \sqrt{{\ell}^{2} \cdot {k}^{-4}}}}{t} \]
      2. pow255.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\sqrt{{\ell}^{2} \cdot {k}^{-4}}\right)}^{2}}}{t} \]
      3. sqrt-prod55.9%

        \[\leadsto 2 \cdot \frac{{\color{blue}{\left(\sqrt{{\ell}^{2}} \cdot \sqrt{{k}^{-4}}\right)}}^{2}}{t} \]
      4. unpow255.9%

        \[\leadsto 2 \cdot \frac{{\left(\sqrt{\color{blue}{\ell \cdot \ell}} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      5. sqrt-prod18.9%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      6. add-sqr-sqrt62.6%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\ell} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      7. sqrt-pow163.4%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot \color{blue}{{k}^{\left(\frac{-4}{2}\right)}}\right)}^{2}}{t} \]
      8. metadata-eval63.4%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot {k}^{\color{blue}{-2}}\right)}^{2}}{t} \]
    12. Applied egg-rr63.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\ell \cdot {k}^{-2}\right)}^{2}}}{t} \]

    if 3.7999999999999998e-150 < l < 3.89999999999999991e150

    1. Initial program 70.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Taylor expanded in k around 0 60.4%

      \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]

    if 3.89999999999999991e150 < l

    1. Initial program 34.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified34.6%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 62.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Taylor expanded in k around 0 59.5%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. associate-/r*59.5%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    6. Simplified59.5%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
      2. expm1-udef59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
      3. div-inv59.5%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
      4. pow-flip59.5%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
      5. metadata-eval59.5%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
    8. Applied egg-rr59.5%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
    9. Step-by-step derivation
      1. expm1-def59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
      2. expm1-log1p59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    10. Simplified59.5%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    11. Step-by-step derivation
      1. associate-/l*59.5%

        \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}} \]
      2. add-sqr-sqrt21.9%

        \[\leadsto 2 \cdot \color{blue}{\left(\sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}} \cdot \sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}}\right)} \]
      3. sqrt-div21.9%

        \[\leadsto 2 \cdot \left(\color{blue}{\frac{\sqrt{{\ell}^{2}}}{\sqrt{\frac{t}{{k}^{-4}}}}} \cdot \sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}}\right) \]
      4. unpow221.9%

        \[\leadsto 2 \cdot \left(\frac{\sqrt{\color{blue}{\ell \cdot \ell}}}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}}\right) \]
      5. sqrt-prod21.9%

        \[\leadsto 2 \cdot \left(\frac{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}}\right) \]
      6. add-sqr-sqrt21.9%

        \[\leadsto 2 \cdot \left(\frac{\color{blue}{\ell}}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}}\right) \]
      7. sqrt-div21.9%

        \[\leadsto 2 \cdot \left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \color{blue}{\frac{\sqrt{{\ell}^{2}}}{\sqrt{\frac{t}{{k}^{-4}}}}}\right) \]
      8. unpow221.9%

        \[\leadsto 2 \cdot \left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \frac{\sqrt{\color{blue}{\ell \cdot \ell}}}{\sqrt{\frac{t}{{k}^{-4}}}}\right) \]
      9. sqrt-prod25.3%

        \[\leadsto 2 \cdot \left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \frac{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}{\sqrt{\frac{t}{{k}^{-4}}}}\right) \]
      10. add-sqr-sqrt25.3%

        \[\leadsto 2 \cdot \left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \frac{\color{blue}{\ell}}{\sqrt{\frac{t}{{k}^{-4}}}}\right) \]
    12. Applied egg-rr25.3%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}}\right)} \]
    13. Step-by-step derivation
      1. unpow225.3%

        \[\leadsto 2 \cdot \color{blue}{{\left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}}\right)}^{2}} \]
    14. Simplified25.3%

      \[\leadsto 2 \cdot \color{blue}{{\left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}}\right)}^{2}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.8 \cdot 10^{-150}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\ \mathbf{elif}\;\ell \leq 3.9 \cdot 10^{+150}:\\ \;\;\;\;\frac{2}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}}\right)}^{2}\\ \end{array} \]

Alternative 13: 57.6% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 2.9 \cdot 10^{-150}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\ \mathbf{elif}\;\ell \leq 7.7 \cdot 10^{+149}:\\ \;\;\;\;\frac{{\ell}^{2}}{{k_m}^{2} \cdot {t_m}^{3}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{\sqrt{\frac{t_m}{{k_m}^{-4}}}}\right)}^{2}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= l 2.9e-150)
    (* 2.0 (/ (pow (* l (pow k_m -2.0)) 2.0) t_m))
    (if (<= l 7.7e+149)
      (/ (pow l 2.0) (* (pow k_m 2.0) (pow t_m 3.0)))
      (* 2.0 (pow (/ l (sqrt (/ t_m (pow k_m -4.0)))) 2.0))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (l <= 2.9e-150) {
		tmp = 2.0 * (pow((l * pow(k_m, -2.0)), 2.0) / t_m);
	} else if (l <= 7.7e+149) {
		tmp = pow(l, 2.0) / (pow(k_m, 2.0) * pow(t_m, 3.0));
	} else {
		tmp = 2.0 * pow((l / sqrt((t_m / pow(k_m, -4.0)))), 2.0);
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (l <= 2.9d-150) then
        tmp = 2.0d0 * (((l * (k_m ** (-2.0d0))) ** 2.0d0) / t_m)
    else if (l <= 7.7d+149) then
        tmp = (l ** 2.0d0) / ((k_m ** 2.0d0) * (t_m ** 3.0d0))
    else
        tmp = 2.0d0 * ((l / sqrt((t_m / (k_m ** (-4.0d0))))) ** 2.0d0)
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (l <= 2.9e-150) {
		tmp = 2.0 * (Math.pow((l * Math.pow(k_m, -2.0)), 2.0) / t_m);
	} else if (l <= 7.7e+149) {
		tmp = Math.pow(l, 2.0) / (Math.pow(k_m, 2.0) * Math.pow(t_m, 3.0));
	} else {
		tmp = 2.0 * Math.pow((l / Math.sqrt((t_m / Math.pow(k_m, -4.0)))), 2.0);
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if l <= 2.9e-150:
		tmp = 2.0 * (math.pow((l * math.pow(k_m, -2.0)), 2.0) / t_m)
	elif l <= 7.7e+149:
		tmp = math.pow(l, 2.0) / (math.pow(k_m, 2.0) * math.pow(t_m, 3.0))
	else:
		tmp = 2.0 * math.pow((l / math.sqrt((t_m / math.pow(k_m, -4.0)))), 2.0)
	return t_s * tmp
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (l <= 2.9e-150)
		tmp = Float64(2.0 * Float64((Float64(l * (k_m ^ -2.0)) ^ 2.0) / t_m));
	elseif (l <= 7.7e+149)
		tmp = Float64((l ^ 2.0) / Float64((k_m ^ 2.0) * (t_m ^ 3.0)));
	else
		tmp = Float64(2.0 * (Float64(l / sqrt(Float64(t_m / (k_m ^ -4.0)))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (l <= 2.9e-150)
		tmp = 2.0 * (((l * (k_m ^ -2.0)) ^ 2.0) / t_m);
	elseif (l <= 7.7e+149)
		tmp = (l ^ 2.0) / ((k_m ^ 2.0) * (t_m ^ 3.0));
	else
		tmp = 2.0 * ((l / sqrt((t_m / (k_m ^ -4.0)))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * If[LessEqual[l, 2.9e-150], N[(2.0 * N[(N[Power[N[(l * N[Power[k$95$m, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 7.7e+149], N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(l / N[Sqrt[N[(t$95$m / N[Power[k$95$m, -4.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 2.9 \cdot 10^{-150}:\\
\;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\\

\mathbf{elif}\;\ell \leq 7.7 \cdot 10^{+149}:\\
\;\;\;\;\frac{{\ell}^{2}}{{k_m}^{2} \cdot {t_m}^{3}}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{\sqrt{\frac{t_m}{{k_m}^{-4}}}}\right)}^{2}\\


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

    1. Initial program 54.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified50.2%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 61.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Taylor expanded in k around 0 55.2%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. associate-/r*55.9%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    6. Simplified55.9%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u55.8%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
      2. expm1-udef56.1%

        \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
      3. div-inv56.1%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
      4. pow-flip56.1%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
      5. metadata-eval56.1%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
    8. Applied egg-rr56.1%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
    9. Step-by-step derivation
      1. expm1-def55.8%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
      2. expm1-log1p55.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    10. Simplified55.9%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt55.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{\sqrt{{\ell}^{2} \cdot {k}^{-4}} \cdot \sqrt{{\ell}^{2} \cdot {k}^{-4}}}}{t} \]
      2. pow255.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\sqrt{{\ell}^{2} \cdot {k}^{-4}}\right)}^{2}}}{t} \]
      3. sqrt-prod55.9%

        \[\leadsto 2 \cdot \frac{{\color{blue}{\left(\sqrt{{\ell}^{2}} \cdot \sqrt{{k}^{-4}}\right)}}^{2}}{t} \]
      4. unpow255.9%

        \[\leadsto 2 \cdot \frac{{\left(\sqrt{\color{blue}{\ell \cdot \ell}} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      5. sqrt-prod18.9%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      6. add-sqr-sqrt62.6%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\ell} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      7. sqrt-pow163.4%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot \color{blue}{{k}^{\left(\frac{-4}{2}\right)}}\right)}^{2}}{t} \]
      8. metadata-eval63.4%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot {k}^{\color{blue}{-2}}\right)}^{2}}{t} \]
    12. Applied egg-rr63.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\ell \cdot {k}^{-2}\right)}^{2}}}{t} \]

    if 2.8999999999999998e-150 < l < 7.69999999999999998e149

    1. Initial program 70.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified62.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 60.3%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative60.3%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified60.3%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]

    if 7.69999999999999998e149 < l

    1. Initial program 34.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified34.6%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 62.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Taylor expanded in k around 0 59.5%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. associate-/r*59.5%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    6. Simplified59.5%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
      2. expm1-udef59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
      3. div-inv59.5%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
      4. pow-flip59.5%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
      5. metadata-eval59.5%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
    8. Applied egg-rr59.5%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
    9. Step-by-step derivation
      1. expm1-def59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
      2. expm1-log1p59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    10. Simplified59.5%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    11. Step-by-step derivation
      1. associate-/l*59.5%

        \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}} \]
      2. add-sqr-sqrt21.9%

        \[\leadsto 2 \cdot \color{blue}{\left(\sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}} \cdot \sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}}\right)} \]
      3. sqrt-div21.9%

        \[\leadsto 2 \cdot \left(\color{blue}{\frac{\sqrt{{\ell}^{2}}}{\sqrt{\frac{t}{{k}^{-4}}}}} \cdot \sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}}\right) \]
      4. unpow221.9%

        \[\leadsto 2 \cdot \left(\frac{\sqrt{\color{blue}{\ell \cdot \ell}}}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}}\right) \]
      5. sqrt-prod21.9%

        \[\leadsto 2 \cdot \left(\frac{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}}\right) \]
      6. add-sqr-sqrt21.9%

        \[\leadsto 2 \cdot \left(\frac{\color{blue}{\ell}}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \sqrt{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}}\right) \]
      7. sqrt-div21.9%

        \[\leadsto 2 \cdot \left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \color{blue}{\frac{\sqrt{{\ell}^{2}}}{\sqrt{\frac{t}{{k}^{-4}}}}}\right) \]
      8. unpow221.9%

        \[\leadsto 2 \cdot \left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \frac{\sqrt{\color{blue}{\ell \cdot \ell}}}{\sqrt{\frac{t}{{k}^{-4}}}}\right) \]
      9. sqrt-prod25.3%

        \[\leadsto 2 \cdot \left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \frac{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}{\sqrt{\frac{t}{{k}^{-4}}}}\right) \]
      10. add-sqr-sqrt25.3%

        \[\leadsto 2 \cdot \left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \frac{\color{blue}{\ell}}{\sqrt{\frac{t}{{k}^{-4}}}}\right) \]
    12. Applied egg-rr25.3%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}} \cdot \frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}}\right)} \]
    13. Step-by-step derivation
      1. unpow225.3%

        \[\leadsto 2 \cdot \color{blue}{{\left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}}\right)}^{2}} \]
    14. Simplified25.3%

      \[\leadsto 2 \cdot \color{blue}{{\left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}}\right)}^{2}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.9 \cdot 10^{-150}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\ \mathbf{elif}\;\ell \leq 7.7 \cdot 10^{+149}:\\ \;\;\;\;\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{\sqrt{\frac{t}{{k}^{-4}}}}\right)}^{2}\\ \end{array} \]

Alternative 14: 57.5% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \ell \cdot {k_m}^{-2}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 8.2 \cdot 10^{-150}:\\ \;\;\;\;2 \cdot \frac{{t_2}^{2}}{t_m}\\ \mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+150}:\\ \;\;\;\;\frac{{\ell}^{2}}{{k_m}^{2} \cdot {t_m}^{3}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_2 \cdot \frac{t_2}{t_m}\right)\\ \end{array} \end{array} \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (let* ((t_2 (* l (pow k_m -2.0))))
   (*
    t_s
    (if (<= l 8.2e-150)
      (* 2.0 (/ (pow t_2 2.0) t_m))
      (if (<= l 4.8e+150)
        (/ (pow l 2.0) (* (pow k_m 2.0) (pow t_m 3.0)))
        (* 2.0 (* t_2 (/ t_2 t_m))))))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = l * pow(k_m, -2.0);
	double tmp;
	if (l <= 8.2e-150) {
		tmp = 2.0 * (pow(t_2, 2.0) / t_m);
	} else if (l <= 4.8e+150) {
		tmp = pow(l, 2.0) / (pow(k_m, 2.0) * pow(t_m, 3.0));
	} else {
		tmp = 2.0 * (t_2 * (t_2 / t_m));
	}
	return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: t_2
    real(8) :: tmp
    t_2 = l * (k_m ** (-2.0d0))
    if (l <= 8.2d-150) then
        tmp = 2.0d0 * ((t_2 ** 2.0d0) / t_m)
    else if (l <= 4.8d+150) then
        tmp = (l ** 2.0d0) / ((k_m ** 2.0d0) * (t_m ** 3.0d0))
    else
        tmp = 2.0d0 * (t_2 * (t_2 / t_m))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = l * Math.pow(k_m, -2.0);
	double tmp;
	if (l <= 8.2e-150) {
		tmp = 2.0 * (Math.pow(t_2, 2.0) / t_m);
	} else if (l <= 4.8e+150) {
		tmp = Math.pow(l, 2.0) / (Math.pow(k_m, 2.0) * Math.pow(t_m, 3.0));
	} else {
		tmp = 2.0 * (t_2 * (t_2 / t_m));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	t_2 = l * math.pow(k_m, -2.0)
	tmp = 0
	if l <= 8.2e-150:
		tmp = 2.0 * (math.pow(t_2, 2.0) / t_m)
	elif l <= 4.8e+150:
		tmp = math.pow(l, 2.0) / (math.pow(k_m, 2.0) * math.pow(t_m, 3.0))
	else:
		tmp = 2.0 * (t_2 * (t_2 / t_m))
	return t_s * tmp
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = Float64(l * (k_m ^ -2.0))
	tmp = 0.0
	if (l <= 8.2e-150)
		tmp = Float64(2.0 * Float64((t_2 ^ 2.0) / t_m));
	elseif (l <= 4.8e+150)
		tmp = Float64((l ^ 2.0) / Float64((k_m ^ 2.0) * (t_m ^ 3.0)));
	else
		tmp = Float64(2.0 * Float64(t_2 * Float64(t_2 / t_m)));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	t_2 = l * (k_m ^ -2.0);
	tmp = 0.0;
	if (l <= 8.2e-150)
		tmp = 2.0 * ((t_2 ^ 2.0) / t_m);
	elseif (l <= 4.8e+150)
		tmp = (l ^ 2.0) / ((k_m ^ 2.0) * (t_m ^ 3.0));
	else
		tmp = 2.0 * (t_2 * (t_2 / t_m));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := Block[{t$95$2 = N[(l * N[Power[k$95$m, -2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[l, 8.2e-150], N[(2.0 * N[(N[Power[t$95$2, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.8e+150], N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$2 * N[(t$95$2 / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \ell \cdot {k_m}^{-2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 8.2 \cdot 10^{-150}:\\
\;\;\;\;2 \cdot \frac{{t_2}^{2}}{t_m}\\

\mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+150}:\\
\;\;\;\;\frac{{\ell}^{2}}{{k_m}^{2} \cdot {t_m}^{3}}\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_2 \cdot \frac{t_2}{t_m}\right)\\


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

    1. Initial program 54.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified50.2%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 61.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Taylor expanded in k around 0 55.2%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. associate-/r*55.9%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    6. Simplified55.9%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u55.8%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
      2. expm1-udef56.1%

        \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
      3. div-inv56.1%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
      4. pow-flip56.1%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
      5. metadata-eval56.1%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
    8. Applied egg-rr56.1%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
    9. Step-by-step derivation
      1. expm1-def55.8%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
      2. expm1-log1p55.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    10. Simplified55.9%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt55.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{\sqrt{{\ell}^{2} \cdot {k}^{-4}} \cdot \sqrt{{\ell}^{2} \cdot {k}^{-4}}}}{t} \]
      2. pow255.9%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\sqrt{{\ell}^{2} \cdot {k}^{-4}}\right)}^{2}}}{t} \]
      3. sqrt-prod55.9%

        \[\leadsto 2 \cdot \frac{{\color{blue}{\left(\sqrt{{\ell}^{2}} \cdot \sqrt{{k}^{-4}}\right)}}^{2}}{t} \]
      4. unpow255.9%

        \[\leadsto 2 \cdot \frac{{\left(\sqrt{\color{blue}{\ell \cdot \ell}} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      5. sqrt-prod18.9%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      6. add-sqr-sqrt62.6%

        \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\ell} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
      7. sqrt-pow163.4%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot \color{blue}{{k}^{\left(\frac{-4}{2}\right)}}\right)}^{2}}{t} \]
      8. metadata-eval63.4%

        \[\leadsto 2 \cdot \frac{{\left(\ell \cdot {k}^{\color{blue}{-2}}\right)}^{2}}{t} \]
    12. Applied egg-rr63.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\ell \cdot {k}^{-2}\right)}^{2}}}{t} \]

    if 8.1999999999999997e-150 < l < 4.80000000000000005e150

    1. Initial program 70.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified62.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in k around 0 60.3%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. *-commutative60.3%

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
    5. Simplified60.3%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]

    if 4.80000000000000005e150 < l

    1. Initial program 34.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified34.6%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Taylor expanded in t around 0 62.8%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Taylor expanded in k around 0 59.5%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. associate-/r*59.5%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    6. Simplified59.5%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
      2. expm1-udef59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
      3. div-inv59.5%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
      4. pow-flip59.5%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
      5. metadata-eval59.5%

        \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
    8. Applied egg-rr59.5%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
    9. Step-by-step derivation
      1. expm1-def59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
      2. expm1-log1p59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    10. Simplified59.5%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt59.5%

        \[\leadsto 2 \cdot \frac{\color{blue}{\sqrt{{\ell}^{2} \cdot {k}^{-4}} \cdot \sqrt{{\ell}^{2} \cdot {k}^{-4}}}}{t} \]
      2. *-un-lft-identity59.5%

        \[\leadsto 2 \cdot \frac{\sqrt{{\ell}^{2} \cdot {k}^{-4}} \cdot \sqrt{{\ell}^{2} \cdot {k}^{-4}}}{\color{blue}{1 \cdot t}} \]
      3. times-frac59.5%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{\sqrt{{\ell}^{2} \cdot {k}^{-4}}}{1} \cdot \frac{\sqrt{{\ell}^{2} \cdot {k}^{-4}}}{t}\right)} \]
      4. sqrt-prod59.5%

        \[\leadsto 2 \cdot \left(\frac{\color{blue}{\sqrt{{\ell}^{2}} \cdot \sqrt{{k}^{-4}}}}{1} \cdot \frac{\sqrt{{\ell}^{2} \cdot {k}^{-4}}}{t}\right) \]
      5. unpow259.5%

        \[\leadsto 2 \cdot \left(\frac{\sqrt{\color{blue}{\ell \cdot \ell}} \cdot \sqrt{{k}^{-4}}}{1} \cdot \frac{\sqrt{{\ell}^{2} \cdot {k}^{-4}}}{t}\right) \]
      6. sqrt-prod59.5%

        \[\leadsto 2 \cdot \left(\frac{\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{{k}^{-4}}}{1} \cdot \frac{\sqrt{{\ell}^{2} \cdot {k}^{-4}}}{t}\right) \]
      7. add-sqr-sqrt59.5%

        \[\leadsto 2 \cdot \left(\frac{\color{blue}{\ell} \cdot \sqrt{{k}^{-4}}}{1} \cdot \frac{\sqrt{{\ell}^{2} \cdot {k}^{-4}}}{t}\right) \]
      8. sqrt-pow159.5%

        \[\leadsto 2 \cdot \left(\frac{\ell \cdot \color{blue}{{k}^{\left(\frac{-4}{2}\right)}}}{1} \cdot \frac{\sqrt{{\ell}^{2} \cdot {k}^{-4}}}{t}\right) \]
      9. metadata-eval59.5%

        \[\leadsto 2 \cdot \left(\frac{\ell \cdot {k}^{\color{blue}{-2}}}{1} \cdot \frac{\sqrt{{\ell}^{2} \cdot {k}^{-4}}}{t}\right) \]
      10. sqrt-prod59.5%

        \[\leadsto 2 \cdot \left(\frac{\ell \cdot {k}^{-2}}{1} \cdot \frac{\color{blue}{\sqrt{{\ell}^{2}} \cdot \sqrt{{k}^{-4}}}}{t}\right) \]
      11. unpow259.5%

        \[\leadsto 2 \cdot \left(\frac{\ell \cdot {k}^{-2}}{1} \cdot \frac{\sqrt{\color{blue}{\ell \cdot \ell}} \cdot \sqrt{{k}^{-4}}}{t}\right) \]
      12. sqrt-prod66.3%

        \[\leadsto 2 \cdot \left(\frac{\ell \cdot {k}^{-2}}{1} \cdot \frac{\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{{k}^{-4}}}{t}\right) \]
      13. add-sqr-sqrt66.3%

        \[\leadsto 2 \cdot \left(\frac{\ell \cdot {k}^{-2}}{1} \cdot \frac{\color{blue}{\ell} \cdot \sqrt{{k}^{-4}}}{t}\right) \]
      14. sqrt-pow166.4%

        \[\leadsto 2 \cdot \left(\frac{\ell \cdot {k}^{-2}}{1} \cdot \frac{\ell \cdot \color{blue}{{k}^{\left(\frac{-4}{2}\right)}}}{t}\right) \]
      15. metadata-eval66.4%

        \[\leadsto 2 \cdot \left(\frac{\ell \cdot {k}^{-2}}{1} \cdot \frac{\ell \cdot {k}^{\color{blue}{-2}}}{t}\right) \]
    12. Applied egg-rr66.4%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell \cdot {k}^{-2}}{1} \cdot \frac{\ell \cdot {k}^{-2}}{t}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 8.2 \cdot 10^{-150}:\\ \;\;\;\;2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t}\\ \mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+150}:\\ \;\;\;\;\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\ell \cdot {k}^{-2}\right) \cdot \frac{\ell \cdot {k}^{-2}}{t}\right)\\ \end{array} \]

Alternative 15: 51.9% accurate, 2.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(2 \cdot \left({\ell}^{2} \cdot \frac{{k_m}^{-4}}{t_m}\right)\right) \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* 2.0 (* (pow l 2.0) (/ (pow k_m -4.0) t_m)))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 * (pow(l, 2.0) * (pow(k_m, -4.0) / t_m)));
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * (2.0d0 * ((l ** 2.0d0) * ((k_m ** (-4.0d0)) / t_m)))
end function
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 * (Math.pow(l, 2.0) * (Math.pow(k_m, -4.0) / t_m)));
}
k_m = math.fabs(k)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * (2.0 * (math.pow(l, 2.0) * (math.pow(k_m, -4.0) / t_m)))
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(2.0 * Float64((l ^ 2.0) * Float64((k_m ^ -4.0) / t_m))))
end
k_m = abs(k);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * (2.0 * ((l ^ 2.0) * ((k_m ^ -4.0) / t_m)));
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k$95$m, -4.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(2 \cdot \left({\ell}^{2} \cdot \frac{{k_m}^{-4}}{t_m}\right)\right)
\end{array}
Derivation
  1. Initial program 56.2%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified51.7%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
  3. Taylor expanded in t around 0 61.9%

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
  4. Taylor expanded in k around 0 53.0%

    \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  5. Step-by-step derivation
    1. associate-/r*53.4%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  6. Simplified53.4%

    \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  7. Step-by-step derivation
    1. expm1-log1p-u53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
    2. expm1-udef53.6%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
    3. div-inv53.6%

      \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
    4. pow-flip53.6%

      \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
    5. metadata-eval53.6%

      \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
  8. Applied egg-rr53.6%

    \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
  9. Step-by-step derivation
    1. expm1-def53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
    2. expm1-log1p53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
  10. Simplified53.4%

    \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
  11. Taylor expanded in l around 0 53.0%

    \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  12. Step-by-step derivation
    1. *-commutative53.0%

      \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    2. rem-exp-log41.6%

      \[\leadsto 2 \cdot \color{blue}{e^{\log \left(\frac{{\ell}^{2}}{t \cdot {k}^{4}}\right)}} \]
    3. associate-/r*41.8%

      \[\leadsto 2 \cdot e^{\log \color{blue}{\left(\frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}\right)}} \]
    4. log-div38.8%

      \[\leadsto 2 \cdot e^{\color{blue}{\log \left(\frac{{\ell}^{2}}{t}\right) - \log \left({k}^{4}\right)}} \]
    5. log-pow22.6%

      \[\leadsto 2 \cdot e^{\log \left(\frac{{\ell}^{2}}{t}\right) - \color{blue}{4 \cdot \log k}} \]
    6. cancel-sign-sub-inv22.6%

      \[\leadsto 2 \cdot e^{\color{blue}{\log \left(\frac{{\ell}^{2}}{t}\right) + \left(-4\right) \cdot \log k}} \]
    7. metadata-eval22.6%

      \[\leadsto 2 \cdot e^{\log \left(\frac{{\ell}^{2}}{t}\right) + \color{blue}{-4} \cdot \log k} \]
    8. log-pow38.8%

      \[\leadsto 2 \cdot e^{\log \left(\frac{{\ell}^{2}}{t}\right) + \color{blue}{\log \left({k}^{-4}\right)}} \]
    9. log-prod41.8%

      \[\leadsto 2 \cdot e^{\color{blue}{\log \left(\frac{{\ell}^{2}}{t} \cdot {k}^{-4}\right)}} \]
    10. associate-/r/41.6%

      \[\leadsto 2 \cdot e^{\log \color{blue}{\left(\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}\right)}} \]
    11. rem-exp-log53.0%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{\frac{t}{{k}^{-4}}}} \]
    12. associate-/r/53.6%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{t} \cdot {k}^{-4}\right)} \]
    13. *-commutative53.6%

      \[\leadsto 2 \cdot \color{blue}{\left({k}^{-4} \cdot \frac{{\ell}^{2}}{t}\right)} \]
    14. associate-*r/53.4%

      \[\leadsto 2 \cdot \color{blue}{\frac{{k}^{-4} \cdot {\ell}^{2}}{t}} \]
    15. *-commutative53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
    16. associate-*r/53.0%

      \[\leadsto 2 \cdot \color{blue}{\left({\ell}^{2} \cdot \frac{{k}^{-4}}{t}\right)} \]
  13. Simplified53.0%

    \[\leadsto 2 \cdot \color{blue}{\left({\ell}^{2} \cdot \frac{{k}^{-4}}{t}\right)} \]
  14. Final simplification53.0%

    \[\leadsto 2 \cdot \left({\ell}^{2} \cdot \frac{{k}^{-4}}{t}\right) \]

Alternative 16: 52.1% accurate, 2.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(2 \cdot \frac{{\ell}^{2} \cdot {k_m}^{-4}}{t_m}\right) \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* 2.0 (/ (* (pow l 2.0) (pow k_m -4.0)) t_m))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 * ((pow(l, 2.0) * pow(k_m, -4.0)) / t_m));
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * (2.0d0 * (((l ** 2.0d0) * (k_m ** (-4.0d0))) / t_m))
end function
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 * ((Math.pow(l, 2.0) * Math.pow(k_m, -4.0)) / t_m));
}
k_m = math.fabs(k)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * (2.0 * ((math.pow(l, 2.0) * math.pow(k_m, -4.0)) / t_m))
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) * (k_m ^ -4.0)) / t_m)))
end
k_m = abs(k);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * (2.0 * (((l ^ 2.0) * (k_m ^ -4.0)) / t_m));
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k$95$m, -4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(2 \cdot \frac{{\ell}^{2} \cdot {k_m}^{-4}}{t_m}\right)
\end{array}
Derivation
  1. Initial program 56.2%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified51.7%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
  3. Taylor expanded in t around 0 61.9%

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
  4. Taylor expanded in k around 0 53.0%

    \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  5. Step-by-step derivation
    1. associate-/r*53.4%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  6. Simplified53.4%

    \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  7. Step-by-step derivation
    1. expm1-log1p-u53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
    2. expm1-udef53.6%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
    3. div-inv53.6%

      \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
    4. pow-flip53.6%

      \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
    5. metadata-eval53.6%

      \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
  8. Applied egg-rr53.6%

    \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
  9. Step-by-step derivation
    1. expm1-def53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
    2. expm1-log1p53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
  10. Simplified53.4%

    \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
  11. Final simplification53.4%

    \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t} \]

Alternative 17: 52.6% accurate, 2.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{t_m}}{{k_m}^{4}}\right) \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* 2.0 (/ (/ (pow l 2.0) t_m) (pow k_m 4.0)))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 * ((pow(l, 2.0) / t_m) / pow(k_m, 4.0)));
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * (2.0d0 * (((l ** 2.0d0) / t_m) / (k_m ** 4.0d0)))
end function
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 * ((Math.pow(l, 2.0) / t_m) / Math.pow(k_m, 4.0)));
}
k_m = math.fabs(k)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * (2.0 * ((math.pow(l, 2.0) / t_m) / math.pow(k_m, 4.0)))
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k_m ^ 4.0))))
end
k_m = abs(k);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * (2.0 * (((l ^ 2.0) / t_m) / (k_m ^ 4.0)));
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{t_m}}{{k_m}^{4}}\right)
\end{array}
Derivation
  1. Initial program 56.2%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified51.7%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
  3. Taylor expanded in t around 0 61.9%

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
  4. Taylor expanded in k around 0 53.0%

    \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  5. Step-by-step derivation
    1. associate-/r*53.4%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  6. Simplified53.4%

    \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  7. Taylor expanded in l around 0 53.0%

    \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  8. Step-by-step derivation
    1. *-commutative53.0%

      \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    2. associate-/r*53.6%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
  9. Simplified53.6%

    \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
  10. Final simplification53.6%

    \[\leadsto 2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}} \]

Alternative 18: 56.8% accurate, 2.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\right) \end{array} \]
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* 2.0 (/ (pow (* l (pow k_m -2.0)) 2.0) t_m))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 * (pow((l * pow(k_m, -2.0)), 2.0) / t_m));
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * (2.0d0 * (((l * (k_m ** (-2.0d0))) ** 2.0d0) / t_m))
end function
k_m = Math.abs(k);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 * (Math.pow((l * Math.pow(k_m, -2.0)), 2.0) / t_m));
}
k_m = math.fabs(k)
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * (2.0 * (math.pow((l * math.pow(k_m, -2.0)), 2.0) / t_m))
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(2.0 * Float64((Float64(l * (k_m ^ -2.0)) ^ 2.0) / t_m)))
end
k_m = abs(k);
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * (2.0 * (((l * (k_m ^ -2.0)) ^ 2.0) / t_m));
end
k_m = N[Abs[k], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(2.0 * N[(N[Power[N[(l * N[Power[k$95$m, -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(2 \cdot \frac{{\left(\ell \cdot {k_m}^{-2}\right)}^{2}}{t_m}\right)
\end{array}
Derivation
  1. Initial program 56.2%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified51.7%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
  3. Taylor expanded in t around 0 61.9%

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
  4. Taylor expanded in k around 0 53.0%

    \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  5. Step-by-step derivation
    1. associate-/r*53.4%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  6. Simplified53.4%

    \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  7. Step-by-step derivation
    1. expm1-log1p-u53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)\right)}}{t} \]
    2. expm1-udef53.6%

      \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{4}}\right)} - 1}}{t} \]
    3. div-inv53.6%

      \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left(\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}\right)} - 1}{t} \]
    4. pow-flip53.6%

      \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right)} - 1}{t} \]
    5. metadata-eval53.6%

      \[\leadsto 2 \cdot \frac{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{\color{blue}{-4}}\right)} - 1}{t} \]
  8. Applied egg-rr53.6%

    \[\leadsto 2 \cdot \frac{\color{blue}{e^{\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)} - 1}}{t} \]
  9. Step-by-step derivation
    1. expm1-def53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\ell}^{2} \cdot {k}^{-4}\right)\right)}}{t} \]
    2. expm1-log1p53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
  10. Simplified53.4%

    \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot {k}^{-4}}}{t} \]
  11. Step-by-step derivation
    1. add-sqr-sqrt53.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{\sqrt{{\ell}^{2} \cdot {k}^{-4}} \cdot \sqrt{{\ell}^{2} \cdot {k}^{-4}}}}{t} \]
    2. pow253.4%

      \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\sqrt{{\ell}^{2} \cdot {k}^{-4}}\right)}^{2}}}{t} \]
    3. sqrt-prod53.4%

      \[\leadsto 2 \cdot \frac{{\color{blue}{\left(\sqrt{{\ell}^{2}} \cdot \sqrt{{k}^{-4}}\right)}}^{2}}{t} \]
    4. unpow253.4%

      \[\leadsto 2 \cdot \frac{{\left(\sqrt{\color{blue}{\ell \cdot \ell}} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
    5. sqrt-prod32.0%

      \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
    6. add-sqr-sqrt58.3%

      \[\leadsto 2 \cdot \frac{{\left(\color{blue}{\ell} \cdot \sqrt{{k}^{-4}}\right)}^{2}}{t} \]
    7. sqrt-pow158.8%

      \[\leadsto 2 \cdot \frac{{\left(\ell \cdot \color{blue}{{k}^{\left(\frac{-4}{2}\right)}}\right)}^{2}}{t} \]
    8. metadata-eval58.8%

      \[\leadsto 2 \cdot \frac{{\left(\ell \cdot {k}^{\color{blue}{-2}}\right)}^{2}}{t} \]
  12. Applied egg-rr58.8%

    \[\leadsto 2 \cdot \frac{\color{blue}{{\left(\ell \cdot {k}^{-2}\right)}^{2}}}{t} \]
  13. Final simplification58.8%

    \[\leadsto 2 \cdot \frac{{\left(\ell \cdot {k}^{-2}\right)}^{2}}{t} \]

Reproduce

?
herbie shell --seed 2023318 
(FPCore (t l k)
  :name "Toniolo and Linder, Equation (10+)"
  :precision binary64
  (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))