Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.2% → 83.0%
Time: 18.2s
Alternatives: 21
Speedup: 24.8×

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

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

Initial Program: 54.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: 83.0% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.8 \cdot 10^{-191}:\\ \;\;\;\;\frac{2}{{\left(t\_2 \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_2 \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} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (* t_m (pow (cbrt l) -2.0))))
   (*
    t_s
    (if (<= t_m 2.8e-191)
      (/ 2.0 (pow (* t_2 (cbrt (* 2.0 (pow k 2.0)))) 3.0))
      (/
       2.0
       (pow
        (*
         (* t_2 (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 t_2 = t_m * pow(cbrt(l), -2.0);
	double tmp;
	if (t_m <= 2.8e-191) {
		tmp = 2.0 / pow((t_2 * cbrt((2.0 * pow(k, 2.0)))), 3.0);
	} else {
		tmp = 2.0 / pow(((t_2 * 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 t_2 = t_m * Math.pow(Math.cbrt(l), -2.0);
	double tmp;
	if (t_m <= 2.8e-191) {
		tmp = 2.0 / Math.pow((t_2 * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 3.0);
	} else {
		tmp = 2.0 / Math.pow(((t_2 * 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)
	t_2 = Float64(t_m * (cbrt(l) ^ -2.0))
	tmp = 0.0
	if (t_m <= 2.8e-191)
		tmp = Float64(2.0 / (Float64(t_2 * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 3.0));
	else
		tmp = Float64(2.0 / (Float64(Float64(t_2 * 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_] := Block[{t$95$2 = N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.8e-191], N[(2.0 / N[Power[N[(t$95$2 * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$2 * 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)

\\
\begin{array}{l}
t_2 := t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.8 \cdot 10^{-191}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_2 \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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.80000000000000012e-191

    1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.80000000000000012e-191 < t

    1. Initial program 65.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. Simplified65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\color{blue}{\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}} \]
    11. Simplified90.8%

      \[\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. Add Preprocessing

Alternative 2: 75.9% 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}\;k \leq 1.95 \cdot 10^{-164}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)}\right)}^{3}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.95e-164)
    (/
     2.0
     (pow
      (* (* t_m (pow (cbrt l) -2.0)) (* (pow (cbrt k) 2.0) (cbrt 2.0)))
      3.0))
    (/
     2.0
     (pow
      (*
       (/ t_m (pow (cbrt l) 2.0))
       (cbrt (* (sin k) (* (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 (k <= 1.95e-164) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (pow(cbrt(k), 2.0) * cbrt(2.0))), 3.0);
	} else {
		tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * cbrt((sin(k) * (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 (k <= 1.95e-164) {
		tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * (Math.pow(Math.cbrt(k), 2.0) * Math.cbrt(2.0))), 3.0);
	} else {
		tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt((Math.sin(k) * (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 (k <= 1.95e-164)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64((cbrt(k) ^ 2.0) * cbrt(2.0))) ^ 3.0));
	else
		tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(Float64(sin(k) * 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[k, 1.95e-164], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $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}\;k \leq 1.95 \cdot 10^{-164}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.9499999999999999e-164

    1. Initial program 61.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9499999999999999e-164 < k

    1. Initial program 62.3%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 75.5% accurate, 0.7× 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 6.5 \cdot 10^{-15}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 6.5e-15)
    (/
     2.0
     (pow
      (* (* t_m (pow (cbrt l) -2.0)) (* (pow (cbrt k) 2.0) (cbrt 2.0)))
      3.0))
    (/
     (* 2.0 (* (pow l 2.0) (cos k)))
     (* (* t_m (pow k 2.0)) (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 <= 6.5e-15) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (pow(cbrt(k), 2.0) * cbrt(2.0))), 3.0);
	} else {
		tmp = (2.0 * (pow(l, 2.0) * cos(k))) / ((t_m * pow(k, 2.0)) * 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 <= 6.5e-15) {
		tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * (Math.pow(Math.cbrt(k), 2.0) * Math.cbrt(2.0))), 3.0);
	} else {
		tmp = (2.0 * (Math.pow(l, 2.0) * Math.cos(k))) / ((t_m * Math.pow(k, 2.0)) * 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 <= 6.5e-15)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64((cbrt(k) ^ 2.0) * cbrt(2.0))) ^ 3.0));
	else
		tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * cos(k))) / Float64(Float64(t_m * (k ^ 2.0)) * (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, 6.5e-15], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $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}\;k \leq 6.5 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 6.49999999999999991e-15

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.49999999999999991e-15 < k

    1. Initial program 60.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 6.5 \cdot 10^{-15}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\left(t \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 75.6% 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 2.15 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 2.15e-13)
    (/
     2.0
     (pow (* (* t_m (pow (cbrt l) -2.0)) (* (cbrt k) (cbrt (* 2.0 k)))) 3.0))
    (/
     (* 2.0 (* (pow l 2.0) (cos k)))
     (* (* t_m (pow k 2.0)) (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 <= 2.15e-13) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (cbrt(k) * cbrt((2.0 * k)))), 3.0);
	} else {
		tmp = (2.0 * (pow(l, 2.0) * cos(k))) / ((t_m * pow(k, 2.0)) * 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 <= 2.15e-13) {
		tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * (Math.cbrt(k) * Math.cbrt((2.0 * k)))), 3.0);
	} else {
		tmp = (2.0 * (Math.pow(l, 2.0) * Math.cos(k))) / ((t_m * Math.pow(k, 2.0)) * 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 <= 2.15e-13)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64(cbrt(k) * cbrt(Float64(2.0 * k)))) ^ 3.0));
	else
		tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * cos(k))) / Float64(Float64(t_m * (k ^ 2.0)) * (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, 2.15e-13], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[N[(2.0 * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $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}\;k \leq 2.15 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 2.1499999999999999e-13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1499999999999999e-13 < k

    1. Initial program 60.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.15 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\left(t \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.8% 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 1.05 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.05e-13)
    (/
     2.0
     (pow (* (* t_m (pow (cbrt l) -2.0)) (* (cbrt k) (cbrt (* 2.0 k)))) 3.0))
    (*
     2.0
     (* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* 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 <= 1.05e-13) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (cbrt(k) * cbrt((2.0 * k)))), 3.0);
	} else {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (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 <= 1.05e-13) {
		tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * (Math.cbrt(k) * Math.cbrt((2.0 * k)))), 3.0);
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (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 <= 1.05e-13)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64(cbrt(k) * cbrt(Float64(2.0 * k)))) ^ 3.0));
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / 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, 1.05e-13], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[N[(2.0 * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $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 1.05 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.04999999999999994e-13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.04999999999999994e-13 < k

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\sqrt[3]{\sin k}\right)\right)} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    8. Taylor expanded in k around inf 79.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.05 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 74.8% 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 1.25 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.25e-13)
    (/
     2.0
     (pow (* (* t_m (pow (cbrt l) -2.0)) (* (cbrt k) (cbrt (* 2.0 k)))) 3.0))
    (*
     (/ 2.0 (* k k))
     (* (/ (pow l 2.0) t_m) (/ (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 <= 1.25e-13) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (cbrt(k) * cbrt((2.0 * k)))), 3.0);
	} else {
		tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / t_m) * (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 <= 1.25e-13) {
		tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * (Math.cbrt(k) * Math.cbrt((2.0 * k)))), 3.0);
	} else {
		tmp = (2.0 / (k * k)) * ((Math.pow(l, 2.0) / t_m) * (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 <= 1.25e-13)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64(cbrt(k) * cbrt(Float64(2.0 * k)))) ^ 3.0));
	else
		tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / t_m) * 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, 1.25e-13], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[N[(2.0 * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $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 1.25 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.24999999999999997e-13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.24999999999999997e-13 < k

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.25 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 70.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 2.05 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 2.05e-13)
    (/
     2.0
     (* (* 2.0 k) (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0)))
    (*
     (/ 2.0 (* k k))
     (* (/ (pow l 2.0) t_m) (/ (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 <= 2.05e-13) {
		tmp = 2.0 / ((2.0 * k) * pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0));
	} else {
		tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / t_m) * (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 <= 2.05e-13) {
		tmp = 2.0 / ((2.0 * k) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0));
	} else {
		tmp = (2.0 / (k * k)) * ((Math.pow(l, 2.0) / t_m) * (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 <= 2.05e-13)
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0)));
	else
		tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / t_m) * 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, 2.05e-13], N[(2.0 / N[(N[(2.0 * k), $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], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $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 2.05 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 2.0500000000000001e-13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0500000000000001e-13 < k

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.05 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 68.7% 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}\;t\_m \leq 2.3 \cdot 10^{-153}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\ \mathbf{elif}\;t\_m \leq 6.2 \cdot 10^{-97}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \mathbf{elif}\;t\_m \leq 6.2 \cdot 10^{+85}:\\ \;\;\;\;\ell \cdot \frac{\frac{2}{{t\_m}^{3}} \cdot \frac{\ell}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 2.3e-153)
    (/
     2.0
     (pow (* (* t_m (pow (cbrt l) -2.0)) (cbrt (* 2.0 (pow k 2.0)))) 3.0))
    (if (<= t_m 6.2e-97)
      (* (/ 2.0 (* k k)) (* (/ (pow l 2.0) t_m) (/ (cos k) (pow (sin k) 2.0))))
      (if (<= t_m 6.2e+85)
        (*
         l
         (/
          (* (/ 2.0 (pow t_m 3.0)) (/ l (* (sin k) (tan k))))
          (+ 2.0 (pow (/ k t_m) 2.0))))
        (/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow 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 <= 2.3e-153) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * cbrt((2.0 * pow(k, 2.0)))), 3.0);
	} else if (t_m <= 6.2e-97) {
		tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / t_m) * (cos(k) / pow(sin(k), 2.0)));
	} else if (t_m <= 6.2e+85) {
		tmp = l * (((2.0 / pow(t_m, 3.0)) * (l / (sin(k) * tan(k)))) / (2.0 + pow((k / t_m), 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(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 <= 2.3e-153) {
		tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 3.0);
	} else if (t_m <= 6.2e-97) {
		tmp = (2.0 / (k * k)) * ((Math.pow(l, 2.0) / t_m) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
	} else if (t_m <= 6.2e+85) {
		tmp = l * (((2.0 / Math.pow(t_m, 3.0)) * (l / (Math.sin(k) * Math.tan(k)))) / (2.0 + Math.pow((k / t_m), 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(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 <= 2.3e-153)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 3.0));
	elseif (t_m <= 6.2e-97)
		tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / t_m) * Float64(cos(k) / (sin(k) ^ 2.0))));
	elseif (t_m <= 6.2e+85)
		tmp = Float64(l * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) * Float64(l / Float64(sin(k) * tan(k)))) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (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, 2.3e-153], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.2e-97], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.2e+85], N[(l * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $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 2.3 \cdot 10^{-153}:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\

\mathbf{elif}\;t\_m \leq 6.2 \cdot 10^{-97}:\\
\;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\

\mathbf{elif}\;t\_m \leq 6.2 \cdot 10^{+85}:\\
\;\;\;\;\ell \cdot \frac{\frac{2}{{t\_m}^{3}} \cdot \frac{\ell}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 2.29999999999999997e-153

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.29999999999999997e-153 < t < 6.20000000000000004e-97

    1. Initial program 43.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. Simplified43.5%

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

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

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

        \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2} \cdot \cos k}{t \cdot {\sin k}^{2}}} \]
      3. times-frac99.6%

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

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

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

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

    if 6.20000000000000004e-97 < t < 6.20000000000000023e85

    1. Initial program 79.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. Simplified79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.20000000000000023e85 < t

    1. Initial program 71.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. Simplified71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.3 \cdot 10^{-153}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-97}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+85}:\\ \;\;\;\;\ell \cdot \frac{\frac{2}{{t}^{3}} \cdot \frac{\ell}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 67.6% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\sin k}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.3 \cdot 10^{-153}:\\ \;\;\;\;\frac{2}{\left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \frac{t\_2}{\cos k}\right)}\\ \mathbf{elif}\;t\_m \leq 8 \cdot 10^{-97}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{t\_2}\right)\\ \mathbf{elif}\;t\_m \leq 2 \cdot 10^{+85}:\\ \;\;\;\;\ell \cdot \frac{\frac{2}{{t\_m}^{3}} \cdot \frac{\ell}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (pow (sin k) 2.0)))
   (*
    t_s
    (if (<= t_m 2.3e-153)
      (/ 2.0 (* (* (/ (pow t_m 2.0) l) (/ t_m l)) (* 2.0 (/ t_2 (cos k)))))
      (if (<= t_m 8e-97)
        (* (/ 2.0 (* k k)) (* (/ (pow l 2.0) t_m) (/ (cos k) t_2)))
        (if (<= t_m 2e+85)
          (*
           l
           (/
            (* (/ 2.0 (pow t_m 3.0)) (/ l (* (sin k) (tan k))))
            (+ 2.0 (pow (/ k t_m) 2.0))))
          (/
           2.0
           (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow 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 t_2 = pow(sin(k), 2.0);
	double tmp;
	if (t_m <= 2.3e-153) {
		tmp = 2.0 / (((pow(t_m, 2.0) / l) * (t_m / l)) * (2.0 * (t_2 / cos(k))));
	} else if (t_m <= 8e-97) {
		tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / t_m) * (cos(k) / t_2));
	} else if (t_m <= 2e+85) {
		tmp = l * (((2.0 / pow(t_m, 3.0)) * (l / (sin(k) * tan(k)))) / (2.0 + pow((k / t_m), 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(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 t_2 = Math.pow(Math.sin(k), 2.0);
	double tmp;
	if (t_m <= 2.3e-153) {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) / l) * (t_m / l)) * (2.0 * (t_2 / Math.cos(k))));
	} else if (t_m <= 8e-97) {
		tmp = (2.0 / (k * k)) * ((Math.pow(l, 2.0) / t_m) * (Math.cos(k) / t_2));
	} else if (t_m <= 2e+85) {
		tmp = l * (((2.0 / Math.pow(t_m, 3.0)) * (l / (Math.sin(k) * Math.tan(k)))) / (2.0 + Math.pow((k / t_m), 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(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)
	t_2 = sin(k) ^ 2.0
	tmp = 0.0
	if (t_m <= 2.3e-153)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)) * Float64(2.0 * Float64(t_2 / cos(k)))));
	elseif (t_m <= 8e-97)
		tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / t_m) * Float64(cos(k) / t_2)));
	elseif (t_m <= 2e+85)
		tmp = Float64(l * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) * Float64(l / Float64(sin(k) * tan(k)))) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (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_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.3e-153], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$2 / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8e-97], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2e+85], N[(l * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.3 \cdot 10^{-153}:\\
\;\;\;\;\frac{2}{\left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \frac{t\_2}{\cos k}\right)}\\

\mathbf{elif}\;t\_m \leq 8 \cdot 10^{-97}:\\
\;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{t\_2}\right)\\

\mathbf{elif}\;t\_m \leq 2 \cdot 10^{+85}:\\
\;\;\;\;\ell \cdot \frac{\frac{2}{{t\_m}^{3}} \cdot \frac{\ell}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 2.29999999999999997e-153

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

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 59.6%

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

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

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

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

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

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

    if 2.29999999999999997e-153 < t < 8.00000000000000029e-97

    1. Initial program 43.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. Simplified43.5%

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

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

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

        \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2} \cdot \cos k}{t \cdot {\sin k}^{2}}} \]
      3. times-frac99.6%

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

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

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

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

    if 8.00000000000000029e-97 < t < 2e85

    1. Initial program 79.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. Simplified79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e85 < t

    1. Initial program 71.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. Simplified71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.3 \cdot 10^{-153}:\\ \;\;\;\;\frac{2}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \frac{{\sin k}^{2}}{\cos k}\right)}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-97}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+85}:\\ \;\;\;\;\ell \cdot \frac{\frac{2}{{t}^{3}} \cdot \frac{\ell}{\sin k \cdot \tan k}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 63.7% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\sin k}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.7 \cdot 10^{-153}:\\ \;\;\;\;\frac{2}{\left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \frac{t\_2}{\cos k}\right)}\\ \mathbf{elif}\;t\_m \leq 4.3 \cdot 10^{-76}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{t\_2}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (pow (sin k) 2.0)))
   (*
    t_s
    (if (<= t_m 2.7e-153)
      (/ 2.0 (* (* (/ (pow t_m 2.0) l) (/ t_m l)) (* 2.0 (/ t_2 (cos k)))))
      (if (<= t_m 4.3e-76)
        (* (/ 2.0 (* k k)) (* (/ (pow l 2.0) t_m) (/ (cos k) t_2)))
        (/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow 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 t_2 = pow(sin(k), 2.0);
	double tmp;
	if (t_m <= 2.7e-153) {
		tmp = 2.0 / (((pow(t_m, 2.0) / l) * (t_m / l)) * (2.0 * (t_2 / cos(k))));
	} else if (t_m <= 4.3e-76) {
		tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / t_m) * (cos(k) / t_2));
	} else {
		tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(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 t_2 = Math.pow(Math.sin(k), 2.0);
	double tmp;
	if (t_m <= 2.7e-153) {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) / l) * (t_m / l)) * (2.0 * (t_2 / Math.cos(k))));
	} else if (t_m <= 4.3e-76) {
		tmp = (2.0 / (k * k)) * ((Math.pow(l, 2.0) / t_m) * (Math.cos(k) / t_2));
	} else {
		tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(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)
	t_2 = sin(k) ^ 2.0
	tmp = 0.0
	if (t_m <= 2.7e-153)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)) * Float64(2.0 * Float64(t_2 / cos(k)))));
	elseif (t_m <= 4.3e-76)
		tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / t_m) * Float64(cos(k) / t_2)));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (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_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.7e-153], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$2 / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.3e-76], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.7 \cdot 10^{-153}:\\
\;\;\;\;\frac{2}{\left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \frac{t\_2}{\cos k}\right)}\\

\mathbf{elif}\;t\_m \leq 4.3 \cdot 10^{-76}:\\
\;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{t\_2}\right)\\

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


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

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

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 59.6%

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

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

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

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

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

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

    if 2.70000000000000009e-153 < t < 4.2999999999999999e-76

    1. Initial program 45.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. Simplified45.1%

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

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

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

        \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2} \cdot \cos k}{t \cdot {\sin k}^{2}}} \]
      3. times-frac87.9%

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

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

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

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

    if 4.2999999999999999e-76 < t

    1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.7 \cdot 10^{-153}:\\ \;\;\;\;\frac{2}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \frac{{\sin k}^{2}}{\cos k}\right)}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-76}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 63.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 7.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \frac{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}{\cos k}\right)}\\ \mathbf{elif}\;t\_m \leq 4.3 \cdot 10^{-76}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 7.2e-153)
    (/
     2.0
     (*
      (/ (/ (pow t_m 3.0) l) l)
      (* 2.0 (/ (- 0.5 (/ (cos (* 2.0 k)) 2.0)) (cos k)))))
    (if (<= t_m 4.3e-76)
      (* (/ 2.0 (* k k)) (* (/ (pow l 2.0) t_m) (/ (cos k) (pow (sin k) 2.0))))
      (/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow 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 <= 7.2e-153) {
		tmp = 2.0 / (((pow(t_m, 3.0) / l) / l) * (2.0 * ((0.5 - (cos((2.0 * k)) / 2.0)) / cos(k))));
	} else if (t_m <= 4.3e-76) {
		tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / t_m) * (cos(k) / pow(sin(k), 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(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 <= 7.2e-153) {
		tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) / l) * (2.0 * ((0.5 - (Math.cos((2.0 * k)) / 2.0)) / Math.cos(k))));
	} else if (t_m <= 4.3e-76) {
		tmp = (2.0 / (k * k)) * ((Math.pow(l, 2.0) / t_m) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(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 <= 7.2e-153)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) / l) * Float64(2.0 * Float64(Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0)) / cos(k)))));
	elseif (t_m <= 4.3e-76)
		tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / t_m) * Float64(cos(k) / (sin(k) ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (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, 7.2e-153], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.3e-76], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $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 7.2 \cdot 10^{-153}:\\
\;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \frac{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}{\cos k}\right)}\\

\mathbf{elif}\;t\_m \leq 4.3 \cdot 10^{-76}:\\
\;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\

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


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

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

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 59.6%

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

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

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

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

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

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

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

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

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

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

    if 7.1999999999999995e-153 < t < 4.2999999999999999e-76

    1. Initial program 45.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. Simplified45.1%

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

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

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

        \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2} \cdot \cos k}{t \cdot {\sin k}^{2}}} \]
      3. times-frac87.9%

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

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

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

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

    if 4.2999999999999999e-76 < t

    1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 7.2 \cdot 10^{-153}:\\ \;\;\;\;\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \frac{0.5 - \frac{\cos \left(2 \cdot k\right)}{2}}{\cos k}\right)}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-76}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 62.4% 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.35 \cdot 10^{+26}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \frac{{k}^{2}}{\cos k}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.35e+26)
    (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (/ (pow k 2.0) (cos k)))))
    (/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow 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 <= 1.35e+26) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (pow(k, 2.0) / cos(k))));
	} else {
		tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(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 <= 1.35e+26) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (Math.pow(k, 2.0) / Math.cos(k))));
	} else {
		tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(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 <= 1.35e+26)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64((k ^ 2.0) / cos(k)))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (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, 1.35e+26], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $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 1.35 \cdot 10^{+26}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \frac{{k}^{2}}{\cos k}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.35e26

    1. Initial program 57.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. Simplified62.3%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \left(2 \cdot \frac{{k}^{2}}{\cos k}\right)} \]
      8. add-sqr-sqrt22.5%

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

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

    if 1.35e26 < t

    1. Initial program 76.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. Simplified76.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.35 \cdot 10^{+26}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \frac{{k}^{2}}{\cos k}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 61.2% 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 9.5 \cdot 10^{-38}:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 9.5e-38)
    (/ 2.0 (* (pow (/ t_m (pow (cbrt l) 2.0)) 3.0) (* 2.0 (* k k))))
    (/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow 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 <= 9.5e-38) {
		tmp = 2.0 / (pow((t_m / pow(cbrt(l), 2.0)), 3.0) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(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 <= 9.5e-38) {
		tmp = 2.0 / (Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(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 <= 9.5e-38)
		tmp = Float64(2.0 / Float64((Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (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, 9.5e-38], N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $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 9.5 \cdot 10^{-38}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.5000000000000009e-38 < t

    1. Initial program 77.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. Simplified77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 9.5 \cdot 10^{-38}:\\ \;\;\;\;\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 60.9% 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 4 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4e-35)
    (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
    (/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow 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 <= 4e-35) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(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 <= 4e-35) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(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 <= 4e-35)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (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, 4e-35], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $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 \cdot 10^{-35}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\

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


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

    1. Initial program 56.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \left(2 \cdot \frac{{k}^{2}}{\cos k}\right)} \]
      8. add-sqr-sqrt19.7%

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

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

    if 4.00000000000000003e-35 < t

    1. Initial program 77.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. Simplified77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 59.1% accurate, 1.9× 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 6 \cdot 10^{+205}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 6e+205)
    (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
    (/ 2.0 (* (* 2.0 k) (* (sin k) (/ (pow t_m 3.0) (* l l))))))))
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 <= 6e+205) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((2.0 * k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
	}
	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 <= 6d+205) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
    else
        tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
    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 <= 6e+205) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
	}
	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 <= 6e+205:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)))
	else:
		tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))
	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 <= 6e+205)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))));
	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 <= 6e+205)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k)));
	else
		tmp = 2.0 / ((2.0 * k) * (sin(k) * ((t_m ^ 3.0) / (l * l))));
	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, 6e+205], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $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}\;t\_m \leq 6 \cdot 10^{+205}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 5.9999999999999999e205

    1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \left(2 \cdot \frac{{k}^{2}}{\cos k}\right)} \]
      8. add-sqr-sqrt29.8%

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

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

    if 5.9999999999999999e205 < t

    1. Initial program 81.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. Simplified81.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 6 \cdot 10^{+205}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 59.2% accurate, 1.9× 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 1.7 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.7e-13)
    (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
    (/ (* 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) {
	double tmp;
	if (k <= 1.7e-13) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = (2.0 * pow(l, 2.0)) / (t_m * pow(k, 4.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 (k <= 1.7d-13) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
    else
        tmp = (2.0d0 * (l ** 2.0d0)) / (t_m * (k ** 4.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 (k <= 1.7e-13) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = (2.0 * Math.pow(l, 2.0)) / (t_m * Math.pow(k, 4.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 k <= 1.7e-13:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)))
	else:
		tmp = (2.0 * math.pow(l, 2.0)) / (t_m * math.pow(k, 4.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 <= 1.7e-13)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / Float64(t_m * (k ^ 4.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 (k <= 1.7e-13)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k)));
	else
		tmp = (2.0 * (l ^ 2.0)) / (t_m * (k ^ 4.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[k, 1.7e-13], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * 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 \begin{array}{l}
\mathbf{if}\;k \leq 1.7 \cdot 10^{-13}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.70000000000000008e-13

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \left(2 \cdot \frac{{k}^{2}}{\cos k}\right)} \]
      8. add-sqr-sqrt33.7%

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

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

    if 1.70000000000000008e-13 < k

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{{k}^{4} \cdot t}} \]
      2. *-commutative71.6%

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

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 57.8% accurate, 2.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}\;k \leq 2.8 \cdot 10^{-15}:\\ \;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 2.8e-15)
    (/ 2.0 (* (* 2.0 (* k k)) (* (/ (pow t_m 2.0) l) (* t_m (/ 1.0 l)))))
    (/ (* 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) {
	double tmp;
	if (k <= 2.8e-15) {
		tmp = 2.0 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) / l) * (t_m * (1.0 / l))));
	} else {
		tmp = (2.0 * pow(l, 2.0)) / (t_m * pow(k, 4.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 (k <= 2.8d-15) then
        tmp = 2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) / l) * (t_m * (1.0d0 / l))))
    else
        tmp = (2.0d0 * (l ** 2.0d0)) / (t_m * (k ** 4.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 (k <= 2.8e-15) {
		tmp = 2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) / l) * (t_m * (1.0 / l))));
	} else {
		tmp = (2.0 * Math.pow(l, 2.0)) / (t_m * Math.pow(k, 4.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 k <= 2.8e-15:
		tmp = 2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) / l) * (t_m * (1.0 / l))))
	else:
		tmp = (2.0 * math.pow(l, 2.0)) / (t_m * math.pow(k, 4.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 <= 2.8e-15)
		tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m * Float64(1.0 / l)))));
	else
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / Float64(t_m * (k ^ 4.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 (k <= 2.8e-15)
		tmp = 2.0 / ((2.0 * (k * k)) * (((t_m ^ 2.0) / l) * (t_m * (1.0 / l))));
	else
		tmp = (2.0 * (l ^ 2.0)) / (t_m * (k ^ 4.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[k, 2.8e-15], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * 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 \begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 2.80000000000000014e-15

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.80000000000000014e-15 < k

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{{k}^{4} \cdot t}} \]
      2. *-commutative71.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-15}:\\ \;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{{t}^{2}}{\ell} \cdot \left(t \cdot \frac{1}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 56.7% accurate, 3.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)\right)} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (* (/ (pow t_m 2.0) l) (* t_m (/ 1.0 l)))))))
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 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) / l) * (t_m * (1.0 / l)))));
}
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 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) / l) * (t_m * (1.0d0 / l)))))
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 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) / l) * (t_m * (1.0 / l)))));
}
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 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) / l) * (t_m * (1.0 / l)))))
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(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m * Float64(1.0 / l))))))
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 / ((2.0 * (k * k)) * (((t_m ^ 2.0) / l) * (t_m * (1.0 / l)))));
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[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(1.0 / l), $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 \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)\right)}
\end{array}
Derivation
  1. Initial program 61.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. Simplified62.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\left(\frac{{t}^{2}}{\ell} \cdot \color{blue}{\left(t \cdot \frac{1}{\ell}\right)}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  11. Final simplification63.8%

    \[\leadsto \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{{t}^{2}}{\ell} \cdot \left(t \cdot \frac{1}{\ell}\right)\right)} \]
  12. Add Preprocessing

Alternative 19: 56.7% accurate, 3.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{1}{\frac{\ell}{{t\_m}^{2}}}\right)} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (* (/ t_m l) (/ 1.0 (/ l (pow 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) {
	return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * (1.0 / (l / pow(t_m, 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 / ((2.0d0 * (k * k)) * ((t_m / l) * (1.0d0 / (l / (t_m ** 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 / ((2.0 * (k * k)) * ((t_m / l) * (1.0 / (l / Math.pow(t_m, 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 / ((2.0 * (k * k)) * ((t_m / l) * (1.0 / (l / math.pow(t_m, 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(Float64(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * Float64(1.0 / Float64(l / (t_m ^ 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 / ((2.0 * (k * k)) * ((t_m / l) * (1.0 / (l / (t_m ^ 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[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(1.0 / N[(l / N[Power[t$95$m, 2.0], $MachinePrecision]), $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 \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{1}{\frac{\ell}{{t\_m}^{2}}}\right)}
\end{array}
Derivation
  1. Initial program 61.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. Simplified62.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\left(\color{blue}{{\left(\frac{\ell}{{t}^{2}}\right)}^{-1}} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  11. Step-by-step derivation
    1. unpow-163.8%

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

    \[\leadsto \frac{2}{\left(\color{blue}{\frac{1}{\frac{\ell}{{t}^{2}}}} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  13. Final simplification63.8%

    \[\leadsto \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t}{\ell} \cdot \frac{1}{\frac{\ell}{{t}^{2}}}\right)} \]
  14. Add Preprocessing

Alternative 20: 56.7% accurate, 3.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \left({t\_m}^{2} \cdot \frac{1}{\ell}\right)\right)} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (* (/ t_m l) (* (pow t_m 2.0) (/ 1.0 l)))))))
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 / ((2.0 * (k * k)) * ((t_m / l) * (pow(t_m, 2.0) * (1.0 / l)))));
}
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 / ((2.0d0 * (k * k)) * ((t_m / l) * ((t_m ** 2.0d0) * (1.0d0 / l)))))
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 / ((2.0 * (k * k)) * ((t_m / l) * (Math.pow(t_m, 2.0) * (1.0 / l)))));
}
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 / ((2.0 * (k * k)) * ((t_m / l) * (math.pow(t_m, 2.0) * (1.0 / l)))))
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(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * Float64((t_m ^ 2.0) * Float64(1.0 / l))))))
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 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m ^ 2.0) * (1.0 / l)))));
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[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(1.0 / l), $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 \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \left({t\_m}^{2} \cdot \frac{1}{\ell}\right)\right)}
\end{array}
Derivation
  1. Initial program 61.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. Simplified62.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\left(\color{blue}{\left({t}^{2} \cdot \frac{1}{\ell}\right)} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  11. Final simplification63.8%

    \[\leadsto \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t}{\ell} \cdot \left({t}^{2} \cdot \frac{1}{\ell}\right)\right)} \]
  12. Add Preprocessing

Alternative 21: 56.7% accurate, 24.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (* (/ t_m l) (/ (* t_m t_m) l))))))
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 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
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 / ((2.0d0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
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 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
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 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
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(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * Float64(Float64(t_m * t_m) / l)))))
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 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
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[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $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}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}
\end{array}
Derivation
  1. Initial program 61.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. Simplified62.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\left(\frac{\color{blue}{t \cdot t}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  11. Final simplification63.8%

    \[\leadsto \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t}{\ell} \cdot \frac{t \cdot t}{\ell}\right)} \]
  12. Add Preprocessing

Reproduce

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