Toniolo and Linder, Equation (10+)

Percentage Accurate: 55.2% → 86.2%
Time: 29.9s
Alternatives: 17
Speedup: 1.4×

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 17 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: 55.2% 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: 86.2% accurate, 0.5× speedup?

\[\begin{array}{l} 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.8 \cdot 10^{-144}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(\left(t_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}\right)}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.8e-144)
    (*
     2.0
     (* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) (pow (sin k) 2.0))))
    (/
     2.0
     (pow
      (*
       (* (* t_m (pow (cbrt l) -2.0)) (cbrt (sin k)))
       (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
      3.0)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.8e-144) {
		tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / pow(sin(k), 2.0)));
	} else {
		tmp = 2.0 / pow((((t_m * pow(cbrt(l), -2.0)) * cbrt(sin(k))) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0))))), 3.0);
	}
	return t_s * tmp;
}
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) {
	double tmp;
	if (t_m <= 3.8e-144) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
	} else {
		tmp = 2.0 / Math.pow((((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt(Math.sin(k))) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))))), 3.0);
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 3.8e-144)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / (sin(k) ^ 2.0))));
	else
		tmp = Float64(2.0 / (Float64(Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(sin(k))) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))) ^ 3.0));
	end
	return Float64(t_s * tmp)
end
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_] := N[(t$95$s * If[LessEqual[t$95$m, 3.8e-144], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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.8 \cdot 10^{-144}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\left(t_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}\right)}^{3}}\\


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

    1. Initial program 48.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. Simplified44.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 63.0%

      \[\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*63.0%

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

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

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

    if 3.79999999999999993e-144 < t

    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-*l*63.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{-t}\right)}^{2}}\right) \cdot \tan k + 1 \cdot \tan k\right)} \]
      11. distribute-rgt-in71.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\frac{\color{blue}{\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{1.5}}{\ell}}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    6. Step-by-step derivation
      1. add-cube-cbrt79.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\color{blue}{\left({\left(\frac{t}{\sqrt[3]{\ell}}\right)}^{2} \cdot \frac{\frac{t}{\sqrt[3]{\ell}}}{\ell}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
      13. /-rgt-identity83.0%

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

      \[\leadsto \frac{2}{\left(\color{blue}{\left({\left(\frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{2} \cdot \frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    8. Step-by-step derivation
      1. add-cube-cbrt86.2%

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3}} \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. add-cube-cbrt90.8%

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

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

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

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

Alternative 2: 82.3% accurate, 0.6× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 4.2 \cdot 10^{-143}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.2e-143)
    (*
     2.0
     (* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) (pow (sin k) 2.0))))
    (/
     2.0
     (*
      (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
      (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.2e-143) {
		tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / pow(sin(k), 2.0)));
	} else {
		tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0));
	}
	return t_s * tmp;
}
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) {
	double tmp;
	if (t_m <= 4.2e-143) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
	} else {
		tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 4.2e-143)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / (sin(k) ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0)));
	end
	return Float64(t_s * tmp)
end
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_] := N[(t$95$s * If[LessEqual[t$95$m, 4.2e-143], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4.2 \cdot 10^{-143}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\


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

    1. Initial program 48.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. Simplified44.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 63.0%

      \[\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*63.0%

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

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

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

    if 4.2000000000000002e-143 < t

    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-*l*63.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{-t}\right)}^{2}}\right) \cdot \tan k + 1 \cdot \tan k\right)} \]
      11. distribute-rgt-in71.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\frac{\color{blue}{\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{1.5}}{\ell}}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    6. Step-by-step derivation
      1. add-cube-cbrt79.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\color{blue}{\left({\left(\frac{t}{\sqrt[3]{\ell}}\right)}^{2} \cdot \frac{\frac{t}{\sqrt[3]{\ell}}}{\ell}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
      13. /-rgt-identity83.0%

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

      \[\leadsto \frac{2}{\left(\color{blue}{\left({\left(\frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{2} \cdot \frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    8. Step-by-step derivation
      1. add-cube-cbrt86.2%

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

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

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

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

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

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

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

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

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

Alternative 3: 71.9% accurate, 0.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1550000:\\ \;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{t_m \cdot {k}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1550000.0)
    (/
     2.0
     (* (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0) (* 2.0 k)))
    (*
     2.0
     (* (/ (pow l 2.0) (* t_m (pow k 2.0))) (/ (cos k) (pow (sin k) 2.0)))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1550000.0) {
		tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 * ((pow(l, 2.0) / (t_m * pow(k, 2.0))) * (cos(k) / pow(sin(k), 2.0)));
	}
	return t_s * tmp;
}
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) {
	double tmp;
	if (k <= 1550000.0) {
		tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) / (t_m * Math.pow(k, 2.0))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 1550000.0)
		tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k)));
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / Float64(t_m * (k ^ 2.0))) * Float64(cos(k) / (sin(k) ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
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_] := N[(t$95$s * If[LessEqual[k, 1550000.0], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\frac{\color{blue}{\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{1.5}}{\ell}}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    6. Step-by-step derivation
      1. add-cube-cbrt31.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\color{blue}{\left({\left(\frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{2} \cdot \frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    8. Step-by-step derivation
      1. add-cube-cbrt71.5%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \color{blue}{\left(2 \cdot k\right)}} \]
    11. Step-by-step derivation
      1. *-commutative73.6%

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

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

    if 1.55e6 < k

    1. Initial program 50.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.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 73.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*73.8%

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

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

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

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

Alternative 4: 71.9% accurate, 0.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 3600000:\\ \;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t_m \cdot {\sin k}^{2}\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 3600000.0)
    (/
     2.0
     (* (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0) (* 2.0 k)))
    (*
     2.0
     (/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 3600000.0) {
		tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0))));
	}
	return t_s * tmp;
}
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) {
	double tmp;
	if (k <= 3600000.0) {
		tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 3600000.0)
		tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k)));
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))));
	end
	return Float64(t_s * tmp)
end
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_] := N[(t$95$s * If[LessEqual[k, 3600000.0], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\frac{\color{blue}{\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{1.5}}{\ell}}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    6. Step-by-step derivation
      1. add-cube-cbrt31.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\color{blue}{\left({\left(\frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{2} \cdot \frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    8. Step-by-step derivation
      1. add-cube-cbrt71.5%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \color{blue}{\left(2 \cdot k\right)}} \]
    11. Step-by-step derivation
      1. *-commutative73.6%

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

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

    if 3.6e6 < k

    1. Initial program 50.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.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 73.9%

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

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

Alternative 5: 71.9% accurate, 0.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 3650000:\\ \;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{\frac{1 - \cos \left(2 \cdot k\right)}{2}}{\cos k}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 3650000.0)
    (/
     2.0
     (* (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0) (* 2.0 k)))
    (/
     2.0
     (*
      (/ (* t_m (pow k 2.0)) (pow l 2.0))
      (/ (/ (- 1.0 (cos (* 2.0 k))) 2.0) (cos k)))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 3650000.0) {
		tmp = 2.0 / (pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (((1.0 - cos((2.0 * k))) / 2.0) / cos(k)));
	}
	return t_s * tmp;
}
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) {
	double tmp;
	if (k <= 3650000.0) {
		tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k));
	} else {
		tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (((1.0 - Math.cos((2.0 * k))) / 2.0) / Math.cos(k)));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 3650000.0)
		tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k)));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64(Float64(Float64(1.0 - cos(Float64(2.0 * k))) / 2.0) / cos(k))));
	end
	return Float64(t_s * tmp)
end
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_] := N[(t$95$s * If[LessEqual[k, 3650000.0], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 - N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\frac{\color{blue}{\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{1.5}}{\ell}}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    6. Step-by-step derivation
      1. add-cube-cbrt31.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\color{blue}{\left({\left(\frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{2} \cdot \frac{\frac{t}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \]
    8. Step-by-step derivation
      1. add-cube-cbrt71.5%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \color{blue}{\left(2 \cdot k\right)}} \]
    11. Step-by-step derivation
      1. *-commutative73.6%

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

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

    if 3.65e6 < k

    1. Initial program 50.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. Taylor expanded in t around 0 73.9%

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    4. Simplified73.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    5. Step-by-step derivation
      1. unpow273.7%

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{\color{blue}{\sin k \cdot \sin k}}{\cos k}} \]
      2. sin-mult73.7%

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

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

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

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

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

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

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

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

Alternative 6: 58.3% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 1.15 \cdot 10^{-95}:\\ \;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\ \mathbf{elif}\;t_m \leq 2.5 \cdot 10^{+101}:\\ \;\;\;\;\left(\frac{2}{\tan k} \cdot \frac{\ell}{\sin k \cdot {t_m}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.15e-95)
    (/ 2.0 (* t_m (exp (+ (* 4.0 (log k)) (* -2.0 (log l))))))
    (if (<= t_m 2.5e+101)
      (*
       (* (/ 2.0 (tan k)) (/ l (* (sin k) (pow t_m 3.0))))
       (/ l (+ 2.0 (pow (/ k t_m) 2.0))))
      (/ (pow l 2.0) (pow (* t_m (pow (cbrt k) 2.0)) 3.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 1.15e-95) {
		tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
	} else if (t_m <= 2.5e+101) {
		tmp = ((2.0 / tan(k)) * (l / (sin(k) * pow(t_m, 3.0)))) * (l / (2.0 + pow((k / t_m), 2.0)));
	} else {
		tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
	}
	return t_s * tmp;
}
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) {
	double tmp;
	if (t_m <= 1.15e-95) {
		tmp = 2.0 / (t_m * Math.exp(((4.0 * Math.log(k)) + (-2.0 * Math.log(l)))));
	} else if (t_m <= 2.5e+101) {
		tmp = ((2.0 / Math.tan(k)) * (l / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
	} else {
		tmp = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 1.15e-95)
		tmp = Float64(2.0 / Float64(t_m * exp(Float64(Float64(4.0 * log(k)) + Float64(-2.0 * log(l))))));
	elseif (t_m <= 2.5e+101)
		tmp = Float64(Float64(Float64(2.0 / tan(k)) * Float64(l / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))));
	else
		tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0));
	end
	return Float64(t_s * tmp)
end
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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.15e-95], N[(2.0 / N[(t$95$m * N[Exp[N[(N[(4.0 * N[Log[k], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.5e+101], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.15 \cdot 10^{-95}:\\
\;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\

\mathbf{elif}\;t_m \leq 2.5 \cdot 10^{+101}:\\
\;\;\;\;\left(\frac{2}{\tan k} \cdot \frac{\ell}{\sin k \cdot {t_m}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\

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


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

    1. Initial program 46.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. Taylor expanded in t around 0 61.8%

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    4. Simplified62.9%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    5. Taylor expanded in k around 0 50.4%

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{\frac{{\ell}^{2}}{t}}}} \]
      2. associate-/r/50.4%

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

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

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

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

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

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

        \[\leadsto \frac{2}{\log \color{blue}{\left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)} \cdot t} \]
    9. Applied egg-rr51.6%

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)} \cdot t} \]
    10. Step-by-step derivation
      1. pow-exp49.0%

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

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

        \[\leadsto \frac{2}{\left(\color{blue}{e^{\log k \cdot 4}} \cdot {\ell}^{-2}\right) \cdot t} \]
      4. pow-to-exp14.0%

        \[\leadsto \frac{2}{\left(e^{\log k \cdot 4} \cdot \color{blue}{e^{\log \ell \cdot -2}}\right) \cdot t} \]
      5. prod-exp15.7%

        \[\leadsto \frac{2}{\color{blue}{e^{\log k \cdot 4 + \log \ell \cdot -2}} \cdot t} \]
      6. rem-log-exp15.2%

        \[\leadsto \frac{2}{e^{\color{blue}{\log \left(e^{\log k \cdot 4}\right)} + \log \ell \cdot -2} \cdot t} \]
      7. pow-to-exp26.8%

        \[\leadsto \frac{2}{e^{\log \color{blue}{\left({k}^{4}\right)} + \log \ell \cdot -2} \cdot t} \]
      8. log-pow15.7%

        \[\leadsto \frac{2}{e^{\color{blue}{4 \cdot \log k} + \log \ell \cdot -2} \cdot t} \]
      9. rem-log-exp14.1%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \color{blue}{\log \left(e^{\log \ell \cdot -2}\right)}} \cdot t} \]
      10. pow-to-exp27.1%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \log \color{blue}{\left({\ell}^{-2}\right)}} \cdot t} \]
      11. log-pow15.7%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \color{blue}{-2 \cdot \log \ell}} \cdot t} \]
    11. Applied egg-rr15.7%

      \[\leadsto \frac{2}{\color{blue}{e^{4 \cdot \log k + -2 \cdot \log \ell}} \cdot t} \]

    if 1.15e-95 < t < 2.49999999999999994e101

    1. Initial program 84.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. Simplified86.5%

      \[\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*88.8%

        \[\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. *-un-lft-identity88.8%

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

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

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    5. Step-by-step derivation
      1. /-rgt-identity90.9%

        \[\leadsto \color{blue}{\left(\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. associate-*l/90.9%

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

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

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

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

    if 2.49999999999999994e101 < t

    1. Initial program 49.1%

      \[\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. Simplified36.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 36.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.15 \cdot 10^{-95}:\\ \;\;\;\;\frac{2}{t \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+101}:\\ \;\;\;\;\left(\frac{2}{\tan k} \cdot \frac{\ell}{\sin k \cdot {t}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \]

Alternative 7: 76.3% accurate, 1.0× speedup?

\[\begin{array}{l} 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.2 \cdot 10^{-79}:\\ \;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{\frac{1 - \cos \left(2 \cdot k\right)}{2}}{\cos k}}\\ \mathbf{elif}\;t_m \leq 2.5 \cdot 10^{+101}:\\ \;\;\;\;\left(\frac{2}{\tan k} \cdot \frac{\ell}{\sin k \cdot {t_m}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 5.2e-79)
    (/
     2.0
     (*
      (/ (* t_m (pow k 2.0)) (pow l 2.0))
      (/ (/ (- 1.0 (cos (* 2.0 k))) 2.0) (cos k))))
    (if (<= t_m 2.5e+101)
      (*
       (* (/ 2.0 (tan k)) (/ l (* (sin k) (pow t_m 3.0))))
       (/ l (+ 2.0 (pow (/ k t_m) 2.0))))
      (/ (pow l 2.0) (pow (* t_m (pow (cbrt k) 2.0)) 3.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 5.2e-79) {
		tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (((1.0 - cos((2.0 * k))) / 2.0) / cos(k)));
	} else if (t_m <= 2.5e+101) {
		tmp = ((2.0 / tan(k)) * (l / (sin(k) * pow(t_m, 3.0)))) * (l / (2.0 + pow((k / t_m), 2.0)));
	} else {
		tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
	}
	return t_s * tmp;
}
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) {
	double tmp;
	if (t_m <= 5.2e-79) {
		tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (((1.0 - Math.cos((2.0 * k))) / 2.0) / Math.cos(k)));
	} else if (t_m <= 2.5e+101) {
		tmp = ((2.0 / Math.tan(k)) * (l / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
	} else {
		tmp = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 5.2e-79)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64(Float64(Float64(1.0 - cos(Float64(2.0 * k))) / 2.0) / cos(k))));
	elseif (t_m <= 2.5e+101)
		tmp = Float64(Float64(Float64(2.0 / tan(k)) * Float64(l / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))));
	else
		tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0));
	end
	return Float64(t_s * tmp)
end
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_] := N[(t$95$s * If[LessEqual[t$95$m, 5.2e-79], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(1.0 - N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.5e+101], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
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.2 \cdot 10^{-79}:\\
\;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{\frac{1 - \cos \left(2 \cdot k\right)}{2}}{\cos k}}\\

\mathbf{elif}\;t_m \leq 2.5 \cdot 10^{+101}:\\
\;\;\;\;\left(\frac{2}{\tan k} \cdot \frac{\ell}{\sin k \cdot {t_m}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\

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


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

    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. Taylor expanded in t around 0 62.0%

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    4. Simplified63.1%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    5. Step-by-step derivation
      1. unpow263.1%

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{\color{blue}{\sin k \cdot \sin k}}{\cos k}} \]
      2. sin-mult59.0%

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

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

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

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

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

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

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

    if 5.19999999999999987e-79 < t < 2.49999999999999994e101

    1. Initial program 84.1%

      \[\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. Simplified86.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*88.5%

        \[\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. *-un-lft-identity88.5%

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

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

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    5. Step-by-step derivation
      1. /-rgt-identity90.7%

        \[\leadsto \color{blue}{\left(\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \ell\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. associate-*l/90.7%

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

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

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

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

    if 2.49999999999999994e101 < t

    1. Initial program 49.1%

      \[\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. Simplified36.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 36.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.2 \cdot 10^{-79}:\\ \;\;\;\;\frac{2}{\frac{t \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{\frac{1 - \cos \left(2 \cdot k\right)}{2}}{\cos k}}\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+101}:\\ \;\;\;\;\left(\frac{2}{\tan k} \cdot \frac{\ell}{\sin k \cdot {t}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \]

Alternative 8: 67.7% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 1.6 \cdot 10^{-17}:\\ \;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{k}^{2}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.6e-17)
    (/ 2.0 (* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow k 2.0) (cos k))))
    (/ (pow l 2.0) (pow (* t_m (pow (cbrt k) 2.0)) 3.0)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 1.6e-17) {
		tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(k, 2.0) / cos(k)));
	} else {
		tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
	}
	return t_s * tmp;
}
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) {
	double tmp;
	if (t_m <= 1.6e-17) {
		tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(k, 2.0) / Math.cos(k)));
	} else {
		tmp = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 1.6e-17)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((k ^ 2.0) / cos(k))));
	else
		tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0));
	end
	return Float64(t_s * tmp)
end
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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.6e-17], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.6 \cdot 10^{-17}:\\
\;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{k}^{2}}{\cos k}}\\

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


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

    1. Initial program 49.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. Taylor expanded in t around 0 63.8%

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    4. Simplified64.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    5. Taylor expanded in k around 0 59.0%

      \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{\color{blue}{{k}^{2}}}{\cos k}} \]

    if 1.6000000000000001e-17 < t

    1. Initial program 64.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. Simplified56.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 k around 0 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 49.5% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 4 \cdot 10^{-61}:\\ \;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4e-61)
    (/ 2.0 (* t_m (exp (+ (* 4.0 (log k)) (* -2.0 (log l))))))
    (/ (pow l 2.0) (pow (* t_m (pow (cbrt k) 2.0)) 3.0)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4e-61) {
		tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
	} else {
		tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
	}
	return t_s * tmp;
}
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) {
	double tmp;
	if (t_m <= 4e-61) {
		tmp = 2.0 / (t_m * Math.exp(((4.0 * Math.log(k)) + (-2.0 * Math.log(l)))));
	} else {
		tmp = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 4e-61)
		tmp = Float64(2.0 / Float64(t_m * exp(Float64(Float64(4.0 * log(k)) + Float64(-2.0 * log(l))))));
	else
		tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0));
	end
	return Float64(t_s * tmp)
end
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_] := N[(t$95$s * If[LessEqual[t$95$m, 4e-61], N[(2.0 / N[(t$95$m * N[Exp[N[(N[(4.0 * N[Log[k], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4 \cdot 10^{-61}:\\
\;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\

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


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

    1. Initial program 47.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. Taylor expanded in t around 0 62.6%

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    4. Simplified63.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    5. Taylor expanded in k around 0 51.0%

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{\frac{{\ell}^{2}}{t}}}} \]
      2. associate-/r/51.0%

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{k}^{4} \cdot {\ell}^{-2}}\right)} \cdot t} \]
      5. exp-prod52.1%

        \[\leadsto \frac{2}{\log \color{blue}{\left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)} \cdot t} \]
    9. Applied egg-rr52.1%

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)} \cdot t} \]
    10. Step-by-step derivation
      1. pow-exp49.6%

        \[\leadsto \frac{2}{\log \color{blue}{\left(e^{{k}^{4} \cdot {\ell}^{-2}}\right)} \cdot t} \]
      2. rem-log-exp51.0%

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

        \[\leadsto \frac{2}{\left(\color{blue}{e^{\log k \cdot 4}} \cdot {\ell}^{-2}\right) \cdot t} \]
      4. pow-to-exp15.4%

        \[\leadsto \frac{2}{\left(e^{\log k \cdot 4} \cdot \color{blue}{e^{\log \ell \cdot -2}}\right) \cdot t} \]
      5. prod-exp17.0%

        \[\leadsto \frac{2}{\color{blue}{e^{\log k \cdot 4 + \log \ell \cdot -2}} \cdot t} \]
      6. rem-log-exp16.5%

        \[\leadsto \frac{2}{e^{\color{blue}{\log \left(e^{\log k \cdot 4}\right)} + \log \ell \cdot -2} \cdot t} \]
      7. pow-to-exp27.8%

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

        \[\leadsto \frac{2}{e^{\color{blue}{4 \cdot \log k} + \log \ell \cdot -2} \cdot t} \]
      9. rem-log-exp15.4%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \color{blue}{\log \left(e^{\log \ell \cdot -2}\right)}} \cdot t} \]
      10. pow-to-exp28.2%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \log \color{blue}{\left({\ell}^{-2}\right)}} \cdot t} \]
      11. log-pow17.0%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \color{blue}{-2 \cdot \log \ell}} \cdot t} \]
    11. Applied egg-rr17.0%

      \[\leadsto \frac{2}{\color{blue}{e^{4 \cdot \log k + -2 \cdot \log \ell}} \cdot t} \]

    if 4.0000000000000002e-61 < t

    1. Initial program 67.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. Simplified60.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 k around 0 61.4%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4 \cdot 10^{-61}:\\ \;\;\;\;\frac{2}{t \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \]

Alternative 10: 45.4% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 1.2 \cdot 10^{-62}:\\ \;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{\tan k \cdot \left(k \cdot {t_m}^{3}\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.2e-62)
    (/ 2.0 (* t_m (exp (+ (* 4.0 (log k)) (* -2.0 (log l))))))
    (/
     (* (/ 2.0 (* (tan k) (* k (pow t_m 3.0)))) (* l l))
     (+ 2.0 (pow (/ k t_m) 2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 1.2e-62) {
		tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
	} else {
		tmp = ((2.0 / (tan(k) * (k * pow(t_m, 3.0)))) * (l * l)) / (2.0 + pow((k / t_m), 2.0));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 1.2d-62) then
        tmp = 2.0d0 / (t_m * exp(((4.0d0 * log(k)) + ((-2.0d0) * log(l)))))
    else
        tmp = ((2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))) * (l * l)) / (2.0d0 + ((k / t_m) ** 2.0d0))
    end if
    code = t_s * tmp
end function
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) {
	double tmp;
	if (t_m <= 1.2e-62) {
		tmp = 2.0 / (t_m * Math.exp(((4.0 * Math.log(k)) + (-2.0 * Math.log(l)))));
	} else {
		tmp = ((2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))) * (l * l)) / (2.0 + Math.pow((k / t_m), 2.0));
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 1.2e-62:
		tmp = 2.0 / (t_m * math.exp(((4.0 * math.log(k)) + (-2.0 * math.log(l)))))
	else:
		tmp = ((2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0)))) * (l * l)) / (2.0 + math.pow((k / t_m), 2.0))
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 1.2e-62)
		tmp = Float64(2.0 / Float64(t_m * exp(Float64(Float64(4.0 * log(k)) + Float64(-2.0 * log(l))))));
	else
		tmp = Float64(Float64(Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0)))) * Float64(l * l)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 1.2e-62)
		tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
	else
		tmp = ((2.0 / (tan(k) * (k * (t_m ^ 3.0)))) * (l * l)) / (2.0 + ((k / t_m) ^ 2.0));
	end
	tmp_2 = t_s * tmp;
end
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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.2e-62], N[(2.0 / N[(t$95$m * N[Exp[N[(N[(4.0 * N[Log[k], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.2 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(k \cdot {t_m}^{3}\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\


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

    1. Initial program 47.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. Taylor expanded in t around 0 62.6%

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    4. Simplified63.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    5. Taylor expanded in k around 0 51.0%

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{\frac{{\ell}^{2}}{t}}}} \]
      2. associate-/r/51.0%

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{k}^{4} \cdot {\ell}^{-2}}\right)} \cdot t} \]
      5. exp-prod52.1%

        \[\leadsto \frac{2}{\log \color{blue}{\left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)} \cdot t} \]
    9. Applied egg-rr52.1%

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)} \cdot t} \]
    10. Step-by-step derivation
      1. pow-exp49.6%

        \[\leadsto \frac{2}{\log \color{blue}{\left(e^{{k}^{4} \cdot {\ell}^{-2}}\right)} \cdot t} \]
      2. rem-log-exp51.0%

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

        \[\leadsto \frac{2}{\left(\color{blue}{e^{\log k \cdot 4}} \cdot {\ell}^{-2}\right) \cdot t} \]
      4. pow-to-exp15.4%

        \[\leadsto \frac{2}{\left(e^{\log k \cdot 4} \cdot \color{blue}{e^{\log \ell \cdot -2}}\right) \cdot t} \]
      5. prod-exp17.0%

        \[\leadsto \frac{2}{\color{blue}{e^{\log k \cdot 4 + \log \ell \cdot -2}} \cdot t} \]
      6. rem-log-exp16.5%

        \[\leadsto \frac{2}{e^{\color{blue}{\log \left(e^{\log k \cdot 4}\right)} + \log \ell \cdot -2} \cdot t} \]
      7. pow-to-exp27.8%

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

        \[\leadsto \frac{2}{e^{\color{blue}{4 \cdot \log k} + \log \ell \cdot -2} \cdot t} \]
      9. rem-log-exp15.4%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \color{blue}{\log \left(e^{\log \ell \cdot -2}\right)}} \cdot t} \]
      10. pow-to-exp28.2%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \log \color{blue}{\left({\ell}^{-2}\right)}} \cdot t} \]
      11. log-pow17.0%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \color{blue}{-2 \cdot \log \ell}} \cdot t} \]
    11. Applied egg-rr17.0%

      \[\leadsto \frac{2}{\color{blue}{e^{4 \cdot \log k + -2 \cdot \log \ell}} \cdot t} \]

    if 1.19999999999999992e-62 < t

    1. Initial program 67.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. Simplified68.6%

      \[\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. Taylor expanded in k around 0 68.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.2 \cdot 10^{-62}:\\ \;\;\;\;\frac{2}{t \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{\tan k \cdot \left(k \cdot {t}^{3}\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \end{array} \]

Alternative 11: 41.3% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 1.02 \cdot 10^{-60}:\\ \;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{2} \cdot {t_m}^{3}}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.02e-60)
    (/ 2.0 (* t_m (exp (+ (* 4.0 (log k)) (* -2.0 (log l))))))
    (/
     (* (* l l) (/ 2.0 (* (pow k 2.0) (pow t_m 3.0))))
     (+ 2.0 (pow (/ k t_m) 2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 1.02e-60) {
		tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
	} else {
		tmp = ((l * l) * (2.0 / (pow(k, 2.0) * pow(t_m, 3.0)))) / (2.0 + pow((k / t_m), 2.0));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 1.02d-60) then
        tmp = 2.0d0 / (t_m * exp(((4.0d0 * log(k)) + ((-2.0d0) * log(l)))))
    else
        tmp = ((l * l) * (2.0d0 / ((k ** 2.0d0) * (t_m ** 3.0d0)))) / (2.0d0 + ((k / t_m) ** 2.0d0))
    end if
    code = t_s * tmp
end function
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) {
	double tmp;
	if (t_m <= 1.02e-60) {
		tmp = 2.0 / (t_m * Math.exp(((4.0 * Math.log(k)) + (-2.0 * Math.log(l)))));
	} else {
		tmp = ((l * l) * (2.0 / (Math.pow(k, 2.0) * Math.pow(t_m, 3.0)))) / (2.0 + Math.pow((k / t_m), 2.0));
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 1.02e-60:
		tmp = 2.0 / (t_m * math.exp(((4.0 * math.log(k)) + (-2.0 * math.log(l)))))
	else:
		tmp = ((l * l) * (2.0 / (math.pow(k, 2.0) * math.pow(t_m, 3.0)))) / (2.0 + math.pow((k / t_m), 2.0))
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 1.02e-60)
		tmp = Float64(2.0 / Float64(t_m * exp(Float64(Float64(4.0 * log(k)) + Float64(-2.0 * log(l))))));
	else
		tmp = Float64(Float64(Float64(l * l) * Float64(2.0 / Float64((k ^ 2.0) * (t_m ^ 3.0)))) / Float64(2.0 + (Float64(k / t_m) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 1.02e-60)
		tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
	else
		tmp = ((l * l) * (2.0 / ((k ^ 2.0) * (t_m ^ 3.0)))) / (2.0 + ((k / t_m) ^ 2.0));
	end
	tmp_2 = t_s * tmp;
end
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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.02e-60], N[(2.0 / N[(t$95$m * N[Exp[N[(N[(4.0 * N[Log[k], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.02 \cdot 10^{-60}:\\
\;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{2} \cdot {t_m}^{3}}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\


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

    1. Initial program 47.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. Taylor expanded in t around 0 62.6%

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    4. Simplified63.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    5. Taylor expanded in k around 0 51.0%

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{\frac{{\ell}^{2}}{t}}}} \]
      2. associate-/r/51.0%

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{k}^{4} \cdot {\ell}^{-2}}\right)} \cdot t} \]
      5. exp-prod52.1%

        \[\leadsto \frac{2}{\log \color{blue}{\left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)} \cdot t} \]
    9. Applied egg-rr52.1%

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)} \cdot t} \]
    10. Step-by-step derivation
      1. pow-exp49.6%

        \[\leadsto \frac{2}{\log \color{blue}{\left(e^{{k}^{4} \cdot {\ell}^{-2}}\right)} \cdot t} \]
      2. rem-log-exp51.0%

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

        \[\leadsto \frac{2}{\left(\color{blue}{e^{\log k \cdot 4}} \cdot {\ell}^{-2}\right) \cdot t} \]
      4. pow-to-exp15.4%

        \[\leadsto \frac{2}{\left(e^{\log k \cdot 4} \cdot \color{blue}{e^{\log \ell \cdot -2}}\right) \cdot t} \]
      5. prod-exp17.0%

        \[\leadsto \frac{2}{\color{blue}{e^{\log k \cdot 4 + \log \ell \cdot -2}} \cdot t} \]
      6. rem-log-exp16.5%

        \[\leadsto \frac{2}{e^{\color{blue}{\log \left(e^{\log k \cdot 4}\right)} + \log \ell \cdot -2} \cdot t} \]
      7. pow-to-exp27.8%

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

        \[\leadsto \frac{2}{e^{\color{blue}{4 \cdot \log k} + \log \ell \cdot -2} \cdot t} \]
      9. rem-log-exp15.4%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \color{blue}{\log \left(e^{\log \ell \cdot -2}\right)}} \cdot t} \]
      10. pow-to-exp28.2%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \log \color{blue}{\left({\ell}^{-2}\right)}} \cdot t} \]
      11. log-pow17.0%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \color{blue}{-2 \cdot \log \ell}} \cdot t} \]
    11. Applied egg-rr17.0%

      \[\leadsto \frac{2}{\color{blue}{e^{4 \cdot \log k + -2 \cdot \log \ell}} \cdot t} \]

    if 1.01999999999999994e-60 < t

    1. Initial program 67.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. Simplified68.6%

      \[\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. Taylor expanded in k around 0 61.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.02 \cdot 10^{-60}:\\ \;\;\;\;\frac{2}{t \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{2} \cdot {t}^{3}}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \end{array} \]

Alternative 12: 41.1% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 1.3 \cdot 10^{-60}:\\ \;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{k}^{2} \cdot {t_m}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.3e-60)
    (/ 2.0 (* t_m (exp (+ (* 4.0 (log k)) (* -2.0 (log l))))))
    (/ (pow l 2.0) (* (pow k 2.0) (pow t_m 3.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 1.3e-60) {
		tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
	} else {
		tmp = pow(l, 2.0) / (pow(k, 2.0) * pow(t_m, 3.0));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 1.3d-60) then
        tmp = 2.0d0 / (t_m * exp(((4.0d0 * log(k)) + ((-2.0d0) * log(l)))))
    else
        tmp = (l ** 2.0d0) / ((k ** 2.0d0) * (t_m ** 3.0d0))
    end if
    code = t_s * tmp
end function
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) {
	double tmp;
	if (t_m <= 1.3e-60) {
		tmp = 2.0 / (t_m * Math.exp(((4.0 * Math.log(k)) + (-2.0 * Math.log(l)))));
	} else {
		tmp = Math.pow(l, 2.0) / (Math.pow(k, 2.0) * Math.pow(t_m, 3.0));
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 1.3e-60:
		tmp = 2.0 / (t_m * math.exp(((4.0 * math.log(k)) + (-2.0 * math.log(l)))))
	else:
		tmp = math.pow(l, 2.0) / (math.pow(k, 2.0) * math.pow(t_m, 3.0))
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 1.3e-60)
		tmp = Float64(2.0 / Float64(t_m * exp(Float64(Float64(4.0 * log(k)) + Float64(-2.0 * log(l))))));
	else
		tmp = Float64((l ^ 2.0) / Float64((k ^ 2.0) * (t_m ^ 3.0)));
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 1.3e-60)
		tmp = 2.0 / (t_m * exp(((4.0 * log(k)) + (-2.0 * log(l)))));
	else
		tmp = (l ^ 2.0) / ((k ^ 2.0) * (t_m ^ 3.0));
	end
	tmp_2 = t_s * tmp;
end
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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.3e-60], N[(2.0 / N[(t$95$m * N[Exp[N[(N[(4.0 * N[Log[k], $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.3 \cdot 10^{-60}:\\
\;\;\;\;\frac{2}{t_m \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{k}^{2} \cdot {t_m}^{3}}\\


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

    1. Initial program 47.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. Taylor expanded in t around 0 62.6%

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    4. Simplified63.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    5. Taylor expanded in k around 0 51.0%

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{\frac{{\ell}^{2}}{t}}}} \]
      2. associate-/r/51.0%

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{k}^{4} \cdot {\ell}^{-2}}\right)} \cdot t} \]
      5. exp-prod52.1%

        \[\leadsto \frac{2}{\log \color{blue}{\left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)} \cdot t} \]
    9. Applied egg-rr52.1%

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)} \cdot t} \]
    10. Step-by-step derivation
      1. pow-exp49.6%

        \[\leadsto \frac{2}{\log \color{blue}{\left(e^{{k}^{4} \cdot {\ell}^{-2}}\right)} \cdot t} \]
      2. rem-log-exp51.0%

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

        \[\leadsto \frac{2}{\left(\color{blue}{e^{\log k \cdot 4}} \cdot {\ell}^{-2}\right) \cdot t} \]
      4. pow-to-exp15.4%

        \[\leadsto \frac{2}{\left(e^{\log k \cdot 4} \cdot \color{blue}{e^{\log \ell \cdot -2}}\right) \cdot t} \]
      5. prod-exp17.0%

        \[\leadsto \frac{2}{\color{blue}{e^{\log k \cdot 4 + \log \ell \cdot -2}} \cdot t} \]
      6. rem-log-exp16.5%

        \[\leadsto \frac{2}{e^{\color{blue}{\log \left(e^{\log k \cdot 4}\right)} + \log \ell \cdot -2} \cdot t} \]
      7. pow-to-exp27.8%

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

        \[\leadsto \frac{2}{e^{\color{blue}{4 \cdot \log k} + \log \ell \cdot -2} \cdot t} \]
      9. rem-log-exp15.4%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \color{blue}{\log \left(e^{\log \ell \cdot -2}\right)}} \cdot t} \]
      10. pow-to-exp28.2%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \log \color{blue}{\left({\ell}^{-2}\right)}} \cdot t} \]
      11. log-pow17.0%

        \[\leadsto \frac{2}{e^{4 \cdot \log k + \color{blue}{-2 \cdot \log \ell}} \cdot t} \]
    11. Applied egg-rr17.0%

      \[\leadsto \frac{2}{\color{blue}{e^{4 \cdot \log k + -2 \cdot \log \ell}} \cdot t} \]

    if 1.2999999999999999e-60 < t

    1. Initial program 67.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. Simplified60.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 k around 0 61.4%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification29.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.3 \cdot 10^{-60}:\\ \;\;\;\;\frac{2}{t \cdot e^{4 \cdot \log k + -2 \cdot \log \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}\\ \end{array} \]

Alternative 13: 57.4% accurate, 1.4× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 4 \cdot 10^{-16}:\\ \;\;\;\;\frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \left(t_m \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{k}^{2} \cdot {t_m}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4e-16)
    (/ 2.0 (* (/ (pow k 3.0) (pow l 2.0)) (* t_m k)))
    (/ (pow l 2.0) (* (pow k 2.0) (pow t_m 3.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4e-16) {
		tmp = 2.0 / ((pow(k, 3.0) / pow(l, 2.0)) * (t_m * k));
	} else {
		tmp = pow(l, 2.0) / (pow(k, 2.0) * pow(t_m, 3.0));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 4d-16) then
        tmp = 2.0d0 / (((k ** 3.0d0) / (l ** 2.0d0)) * (t_m * k))
    else
        tmp = (l ** 2.0d0) / ((k ** 2.0d0) * (t_m ** 3.0d0))
    end if
    code = t_s * tmp
end function
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) {
	double tmp;
	if (t_m <= 4e-16) {
		tmp = 2.0 / ((Math.pow(k, 3.0) / Math.pow(l, 2.0)) * (t_m * k));
	} else {
		tmp = Math.pow(l, 2.0) / (Math.pow(k, 2.0) * Math.pow(t_m, 3.0));
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 4e-16:
		tmp = 2.0 / ((math.pow(k, 3.0) / math.pow(l, 2.0)) * (t_m * k))
	else:
		tmp = math.pow(l, 2.0) / (math.pow(k, 2.0) * math.pow(t_m, 3.0))
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 4e-16)
		tmp = Float64(2.0 / Float64(Float64((k ^ 3.0) / (l ^ 2.0)) * Float64(t_m * k)));
	else
		tmp = Float64((l ^ 2.0) / Float64((k ^ 2.0) * (t_m ^ 3.0)));
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 4e-16)
		tmp = 2.0 / (((k ^ 3.0) / (l ^ 2.0)) * (t_m * k));
	else
		tmp = (l ^ 2.0) / ((k ^ 2.0) * (t_m ^ 3.0));
	end
	tmp_2 = t_s * tmp;
end
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_] := N[(t$95$s * If[LessEqual[t$95$m, 4e-16], N[(2.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4 \cdot 10^{-16}:\\
\;\;\;\;\frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \left(t_m \cdot k\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{k}^{2} \cdot {t_m}^{3}}\\


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

    1. Initial program 49.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. Taylor expanded in k around 0 48.5%

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}}} \]
      2. associate-/l*53.4%

        \[\leadsto \frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \color{blue}{\frac{t}{\frac{\cos k}{\sin k}}}} \]
    7. Simplified53.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \frac{t}{\frac{\cos k}{\sin k}}}} \]
    8. Taylor expanded in k around 0 52.9%

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

    if 3.9999999999999999e-16 < t

    1. Initial program 64.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. Simplified56.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 k around 0 57.6%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification54.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4 \cdot 10^{-16}:\\ \;\;\;\;\frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \left(t \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}\\ \end{array} \]

Alternative 14: 52.0% accurate, 2.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \left(t_m \cdot k\right)} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (/ (pow k 3.0) (pow l 2.0)) (* t_m k)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((pow(k, 3.0) / pow(l, 2.0)) * (t_m * k)));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / (((k ** 3.0d0) / (l ** 2.0d0)) * (t_m * k)))
end function
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) {
	return t_s * (2.0 / ((Math.pow(k, 3.0) / Math.pow(l, 2.0)) * (t_m * k)));
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / ((math.pow(k, 3.0) / math.pow(l, 2.0)) * (t_m * k)))
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(Float64((k ^ 3.0) / (l ^ 2.0)) * Float64(t_m * k))))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / (((k ^ 3.0) / (l ^ 2.0)) * (t_m * k)));
end
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_] := N[(t$95$s * N[(2.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \left(t_m \cdot k\right)}
\end{array}
Derivation
  1. Initial program 53.1%

    \[\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 52.7%

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

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

      \[\leadsto \frac{2}{\left(\frac{k \cdot \left(\color{blue}{{t}^{2}} \cdot t\right)}{{\ell}^{2}} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  4. Applied egg-rr52.7%

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

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}}} \]
    2. associate-/l*52.0%

      \[\leadsto \frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \color{blue}{\frac{t}{\frac{\cos k}{\sin k}}}} \]
  7. Simplified52.0%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \frac{t}{\frac{\cos k}{\sin k}}}} \]
  8. Taylor expanded in k around 0 51.6%

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

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

Alternative 15: 51.5% accurate, 2.0× speedup?

\[\begin{array}{l} 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}^{4}}\right) \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* 2.0 (/ (/ (pow l 2.0) t_m) (pow k 4.0)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * ((pow(l, 2.0) / t_m) / pow(k, 4.0)));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * (((l ** 2.0d0) / t_m) / (k ** 4.0d0)))
end function
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) {
	return t_s * (2.0 * ((Math.pow(l, 2.0) / t_m) / Math.pow(k, 4.0)));
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 * ((math.pow(l, 2.0) / t_m) / math.pow(k, 4.0)))
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) / t_m) / (k ^ 4.0))))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * (((l ^ 2.0) / t_m) / (k ^ 4.0)));
end
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_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
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}^{4}}\right)
\end{array}
Derivation
  1. Initial program 53.1%

    \[\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 52.7%

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

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

      \[\leadsto \frac{2}{\left(\frac{k \cdot \left(\color{blue}{{t}^{2}} \cdot t\right)}{{\ell}^{2}} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  4. Applied egg-rr52.7%

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

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \frac{t \cdot \sin k}{\cos k}}} \]
    2. associate-/l*52.0%

      \[\leadsto \frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \color{blue}{\frac{t}{\frac{\cos k}{\sin k}}}} \]
  7. Simplified52.0%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \frac{t}{\frac{\cos k}{\sin k}}}} \]
  8. Taylor expanded in k around 0 51.5%

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  9. Step-by-step derivation
    1. associate-/l/51.4%

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

    \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
  11. Final simplification51.4%

    \[\leadsto 2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}} \]

Alternative 16: 50.9% accurate, 2.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{t_m \cdot {k}^{4}}\right) \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0))));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0))))
end function
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) {
	return t_s * (2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0))));
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))))
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))));
end
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_] := N[(t$95$s * N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{t_m \cdot {k}^{4}}\right)
\end{array}
Derivation
  1. Initial program 53.1%

    \[\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 t around 0 59.9%

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

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
  4. Simplified60.7%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
  5. Taylor expanded in k around 0 51.5%

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{\frac{{\ell}^{2}}{t}}}} \]
    2. associate-/r/51.5%

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

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
  8. Taylor expanded in k around 0 51.5%

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  9. Final simplification51.5%

    \[\leadsto 2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}} \]

Alternative 17: 51.1% accurate, 2.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \frac{2}{t_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* t_m (* (pow k 4.0) (pow l -2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (t_m * (pow(k, 4.0) * pow(l, -2.0))));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / (t_m * ((k ** 4.0d0) * (l ** (-2.0d0)))))
end function
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) {
	return t_s * (2.0 / (t_m * (Math.pow(k, 4.0) * Math.pow(l, -2.0))));
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / (t_m * (math.pow(k, 4.0) * math.pow(l, -2.0))))
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(t_m * Float64((k ^ 4.0) * (l ^ -2.0)))))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / (t_m * ((k ^ 4.0) * (l ^ -2.0))));
end
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_] := N[(t$95$s * N[(2.0 / N[(t$95$m * N[(N[Power[k, 4.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \frac{2}{t_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}
\end{array}
Derivation
  1. Initial program 53.1%

    \[\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 t around 0 59.9%

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

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
  4. Simplified60.7%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
  5. Taylor expanded in k around 0 51.5%

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{\frac{{\ell}^{2}}{t}}}} \]
    2. associate-/r/51.5%

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

?
herbie shell --seed 2023319 
(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))))