Toniolo and Linder, Equation (10+)

Percentage Accurate: 55.3% → 82.2%
Time: 27.5s
Alternatives: 23
Speedup: 3.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 23 alternatives:

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

Initial Program: 55.3% 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: 82.2% 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}\;t\_m \leq 2.8 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\ \mathbf{elif}\;t\_m \leq 4.8 \cdot 10^{-103}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\right)\\ \mathbf{elif}\;t\_m \leq 1.8 \cdot 10^{+200}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot \frac{\ell}{\tan k}}}{t\_m \cdot \sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\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}}\\ \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.8e-158)
    (* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
    (if (<= t_m 4.8e-103)
      (*
       2.0
       (* (pow l 2.0) (* (pow k -2.0) (/ (cos k) (* t_m (pow (sin k) 2.0))))))
      (if (<= t_m 1.8e+200)
        (*
         (pow (/ (cbrt (* 2.0 (/ l (tan k)))) (* t_m (cbrt (sin k)))) 3.0)
         (/ l (+ 2.0 (pow (/ k t_m) 2.0))))
        (/
         2.0
         (pow
          (* (* t_m (pow (cbrt l) -2.0)) (* (pow (cbrt k) 2.0) (cbrt 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.8e-158) {
		tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	} else if (t_m <= 4.8e-103) {
		tmp = 2.0 * (pow(l, 2.0) * (pow(k, -2.0) * (cos(k) / (t_m * pow(sin(k), 2.0)))));
	} else if (t_m <= 1.8e+200) {
		tmp = pow((cbrt((2.0 * (l / tan(k)))) / (t_m * cbrt(sin(k)))), 3.0) * (l / (2.0 + pow((k / t_m), 2.0)));
	} else {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (pow(cbrt(k), 2.0) * cbrt(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.8e-158) {
		tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	} else if (t_m <= 4.8e-103) {
		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)))));
	} else if (t_m <= 1.8e+200) {
		tmp = Math.pow((Math.cbrt((2.0 * (l / Math.tan(k)))) / (t_m * Math.cbrt(Math.sin(k)))), 3.0) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
	} else {
		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);
	}
	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.8e-158)
		tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0));
	elseif (t_m <= 4.8e-103)
		tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64((k ^ -2.0) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))));
	elseif (t_m <= 1.8e+200)
		tmp = Float64((Float64(cbrt(Float64(2.0 * Float64(l / tan(k)))) / Float64(t_m * cbrt(sin(k)))) ^ 3.0) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))));
	else
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64((cbrt(k) ^ 2.0) * cbrt(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.8e-158], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.8e-103], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.8e+200], N[(N[Power[N[(N[Power[N[(2.0 * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $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[(N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.8 \cdot 10^{-158}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\

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

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

\mathbf{else}:\\
\;\;\;\;\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}}\\


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

    1. Initial program 53.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. Simplified54.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 65.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. times-frac66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.80000000000000002e-158 < t < 4.8000000000000004e-103

    1. Initial program 22.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. Simplified22.2%

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

      \[\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. times-frac77.8%

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000004e-103 < t < 1.7999999999999999e200

    1. Initial program 72.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. Simplified70.9%

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

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\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-rr80.7%

      \[\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. /-rgt-identity80.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7999999999999999e200 < t

    1. Initial program 48.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified54.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 54.2%

      \[\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-cbrt54.2%

        \[\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. pow354.2%

        \[\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-prod54.2%

        \[\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/41.2%

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

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

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

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

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

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

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

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

        \[\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}} \]
      13. pow-flip65.2%

        \[\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}} \]
      14. metadata-eval65.2%

        \[\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-rr65.2%

      \[\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. *-commutative65.2%

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

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

        \[\leadsto \frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{\color{blue}{k \cdot k}} \cdot \sqrt[3]{2}\right)\right)}^{3}} \]
      4. cbrt-prod93.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. pow293.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-rr93.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}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification40.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.8 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-103}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+200}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot \frac{\ell}{\tan k}}}{t \cdot \sqrt[3]{\sin k}}\right)}^{3} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\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}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 75.1% accurate, 0.7× 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}\;k \leq 0.0054:\\ \;\;\;\;\frac{2}{{\left(t\_2 \cdot {\left(\sqrt[3]{k \cdot \sqrt{2}}\right)}^{2}\right)}^{3}}\\ \mathbf{elif}\;k \leq 5.2 \cdot 10^{+33}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\ \mathbf{elif}\;k \leq 1.9 \cdot 10^{+88}:\\ \;\;\;\;\frac{2}{\sin k \cdot \left({t\_2}^{3} \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\right)\\ \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 (<= k 0.0054)
      (/ 2.0 (pow (* t_2 (pow (cbrt (* k (sqrt 2.0))) 2.0)) 3.0))
      (if (<= k 5.2e+33)
        (*
         2.0
         (*
          (/ (pow l 2.0) (pow k 2.0))
          (/ (cos k) (* t_m (- 0.5 (/ (cos (* 2.0 k)) 2.0))))))
        (if (<= k 1.9e+88)
          (/
           2.0
           (*
            (sin k)
            (* (pow t_2 3.0) (* (tan k) (+ 2.0 (pow (/ k t_m) 2.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 t_2 = t_m * pow(cbrt(l), -2.0);
	double tmp;
	if (k <= 0.0054) {
		tmp = 2.0 / pow((t_2 * pow(cbrt((k * sqrt(2.0))), 2.0)), 3.0);
	} else if (k <= 5.2e+33) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * (0.5 - (cos((2.0 * k)) / 2.0)))));
	} else if (k <= 1.9e+88) {
		tmp = 2.0 / (sin(k) * (pow(t_2, 3.0) * (tan(k) * (2.0 + pow((k / t_m), 2.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 t_2 = t_m * Math.pow(Math.cbrt(l), -2.0);
	double tmp;
	if (k <= 0.0054) {
		tmp = 2.0 / Math.pow((t_2 * Math.pow(Math.cbrt((k * Math.sqrt(2.0))), 2.0)), 3.0);
	} else if (k <= 5.2e+33) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * (0.5 - (Math.cos((2.0 * k)) / 2.0)))));
	} else if (k <= 1.9e+88) {
		tmp = 2.0 / (Math.sin(k) * (Math.pow(t_2, 3.0) * (Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.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)
	t_2 = Float64(t_m * (cbrt(l) ^ -2.0))
	tmp = 0.0
	if (k <= 0.0054)
		tmp = Float64(2.0 / (Float64(t_2 * (cbrt(Float64(k * sqrt(2.0))) ^ 2.0)) ^ 3.0));
	elseif (k <= 5.2e+33)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))));
	elseif (k <= 1.9e+88)
		tmp = Float64(2.0 / Float64(sin(k) * Float64((t_2 ^ 3.0) * Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))));
	else
		tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64((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_] := 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[k, 0.0054], N[(2.0 / N[Power[N[(t$95$2 * N[Power[N[Power[N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.2e+33], 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[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.9e+88], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$2, 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 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)

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

\mathbf{elif}\;k \leq 5.2 \cdot 10^{+33}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\

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

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


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

    1. Initial program 60.0%

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

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

      \[\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-cbrt65.2%

        \[\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. pow365.2%

        \[\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-prod65.1%

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{t}{\sqrt[3]{\color{blue}{\ell \cdot \ell}}} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}} \]
      10. cbrt-prod73.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}} \]
      11. unpow273.1%

        \[\leadsto \frac{2}{{\left(\frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}} \]
      12. div-inv73.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}} \]
      13. pow-flip73.0%

        \[\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}} \]
      14. metadata-eval73.0%

        \[\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-rr73.0%

      \[\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. add-sqr-sqrt73.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k \cdot \sqrt{2}} \cdot \sqrt[3]{\color{blue}{k} \cdot \sqrt{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(\sqrt[3]{k \cdot \sqrt{2}} \cdot \sqrt[3]{k \cdot \sqrt{2}}\right)}\right)}^{3}} \]
    9. Step-by-step derivation
      1. unpow282.7%

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

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

    if 0.0054000000000000003 < k < 5.1999999999999995e33

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

      \[\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. times-frac79.3%

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

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

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

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

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

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

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

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

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

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

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

    if 5.1999999999999995e33 < k < 1.8999999999999998e88

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

      \[\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-cbrt50.9%

        \[\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. pow350.9%

        \[\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. *-commutative50.9%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\sin k \cdot \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)} \]
      4. cbrt-prod50.9%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\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)} \]
      5. cbrt-div50.9%

        \[\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)} \]
      6. rem-cbrt-cube51.5%

        \[\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)} \]
      7. cbrt-prod75.4%

        \[\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)} \]
      8. pow275.4%

        \[\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-rr75.4%

      \[\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. add-cube-cbrt74.7%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}} \cdot \sqrt[3]{\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right) \cdot \sqrt[3]{\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)} \]
      2. pow374.7%

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

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

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

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

      \[\leadsto \frac{2}{{\color{blue}{\left({\left(\sqrt[3]{\sqrt[3]{\sin k} \cdot \left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}\right)}^{3}\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. unpow374.7%

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

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

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

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

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

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

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

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

    if 1.8999999999999998e88 < k

    1. Initial program 48.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. Simplified48.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 73.7%

      \[\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. times-frac70.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 0.0054:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot {\left(\sqrt[3]{k \cdot \sqrt{2}}\right)}^{2}\right)}^{3}}\\ \mathbf{elif}\;k \leq 5.2 \cdot 10^{+33}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\ \mathbf{elif}\;k \leq 1.9 \cdot 10^{+88}:\\ \;\;\;\;\frac{2}{\sin k \cdot \left({\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.2% 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 0.00075:\\ \;\;\;\;\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{elif}\;k \leq 5 \cdot 10^{+72}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\ \mathbf{elif}\;k \leq 3.8 \cdot 10^{+89}:\\ \;\;\;\;\frac{2}{\sin k \cdot {t\_m}^{3}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\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 0.00075)
    (/
     2.0
     (pow
      (* (* t_m (pow (cbrt l) -2.0)) (* (pow (cbrt k) 2.0) (cbrt 2.0)))
      3.0))
    (if (<= k 5e+72)
      (*
       2.0
       (*
        (/ (pow l 2.0) (pow k 2.0))
        (/ (cos k) (* t_m (- 0.5 (/ (cos (* 2.0 k)) 2.0))))))
      (if (<= k 3.8e+89)
        (*
         (/ 2.0 (* (sin k) (pow t_m 3.0)))
         (* (/ l (tan k)) (/ l (+ 2.0 (pow (/ k t_m) 2.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 <= 0.00075) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * (pow(cbrt(k), 2.0) * cbrt(2.0))), 3.0);
	} else if (k <= 5e+72) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * (0.5 - (cos((2.0 * k)) / 2.0)))));
	} else if (k <= 3.8e+89) {
		tmp = (2.0 / (sin(k) * pow(t_m, 3.0))) * ((l / tan(k)) * (l / (2.0 + pow((k / t_m), 2.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 <= 0.00075) {
		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 if (k <= 5e+72) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * (0.5 - (Math.cos((2.0 * k)) / 2.0)))));
	} else if (k <= 3.8e+89) {
		tmp = (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))) * ((l / Math.tan(k)) * (l / (2.0 + Math.pow((k / t_m), 2.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 <= 0.00075)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * Float64((cbrt(k) ^ 2.0) * cbrt(2.0))) ^ 3.0));
	elseif (k <= 5e+72)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))));
	elseif (k <= 3.8e+89)
		tmp = Float64(Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0))) * Float64(Float64(l / tan(k)) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))));
	else
		tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64((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, 0.00075], 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], If[LessEqual[k, 5e+72], 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[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.8e+89], N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;k \leq 0.00075:\\
\;\;\;\;\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{elif}\;k \leq 5 \cdot 10^{+72}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\

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

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


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

    1. Initial program 60.0%

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

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

      \[\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-cbrt65.2%

        \[\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. pow365.2%

        \[\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-prod65.1%

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{t}{\sqrt[3]{\color{blue}{\ell \cdot \ell}}} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}} \]
      10. cbrt-prod73.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}} \]
      11. unpow273.1%

        \[\leadsto \frac{2}{{\left(\frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}} \]
      12. div-inv73.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}} \]
      13. pow-flip73.0%

        \[\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}} \]
      14. metadata-eval73.0%

        \[\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-rr73.0%

      \[\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. *-commutative73.0%

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

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

        \[\leadsto \frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{\color{blue}{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 7.5000000000000002e-4 < k < 4.99999999999999992e72

    1. Initial program 50.0%

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

      \[\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.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. times-frac79.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999992e72 < k < 3.80000000000000023e89

    1. Initial program 4.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. Simplified4.2%

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

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\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-rr50.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. /-rgt-identity50.2%

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

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

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

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

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

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

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

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

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

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

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

    if 3.80000000000000023e89 < k

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

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

      \[\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. times-frac71.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 0.00075:\\ \;\;\;\;\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{elif}\;k \leq 5 \cdot 10^{+72}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\ \mathbf{elif}\;k \leq 3.8 \cdot 10^{+89}:\\ \;\;\;\;\frac{2}{\sin k \cdot {t}^{3}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 75.2% 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 0.0035:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot {\left(\sqrt[3]{k \cdot \sqrt{2}}\right)}^{2}\right)}^{3}}\\ \mathbf{elif}\;k \leq 5 \cdot 10^{+72}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\ \mathbf{elif}\;k \leq 3 \cdot 10^{+89}:\\ \;\;\;\;\frac{2}{\sin k \cdot {t\_m}^{3}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\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 0.0035)
    (/
     2.0
     (pow
      (* (* t_m (pow (cbrt l) -2.0)) (pow (cbrt (* k (sqrt 2.0))) 2.0))
      3.0))
    (if (<= k 5e+72)
      (*
       2.0
       (*
        (/ (pow l 2.0) (pow k 2.0))
        (/ (cos k) (* t_m (- 0.5 (/ (cos (* 2.0 k)) 2.0))))))
      (if (<= k 3e+89)
        (*
         (/ 2.0 (* (sin k) (pow t_m 3.0)))
         (* (/ l (tan k)) (/ l (+ 2.0 (pow (/ k t_m) 2.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 <= 0.0035) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * pow(cbrt((k * sqrt(2.0))), 2.0)), 3.0);
	} else if (k <= 5e+72) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * (0.5 - (cos((2.0 * k)) / 2.0)))));
	} else if (k <= 3e+89) {
		tmp = (2.0 / (sin(k) * pow(t_m, 3.0))) * ((l / tan(k)) * (l / (2.0 + pow((k / t_m), 2.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 <= 0.0035) {
		tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.pow(Math.cbrt((k * Math.sqrt(2.0))), 2.0)), 3.0);
	} else if (k <= 5e+72) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * (0.5 - (Math.cos((2.0 * k)) / 2.0)))));
	} else if (k <= 3e+89) {
		tmp = (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))) * ((l / Math.tan(k)) * (l / (2.0 + Math.pow((k / t_m), 2.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 <= 0.0035)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * (cbrt(Float64(k * sqrt(2.0))) ^ 2.0)) ^ 3.0));
	elseif (k <= 5e+72)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))));
	elseif (k <= 3e+89)
		tmp = Float64(Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0))) * Float64(Float64(l / tan(k)) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))));
	else
		tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64((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, 0.0035], 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[Power[N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5e+72], 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[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3e+89], N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;k \leq 0.0035:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot {\left(\sqrt[3]{k \cdot \sqrt{2}}\right)}^{2}\right)}^{3}}\\

\mathbf{elif}\;k \leq 5 \cdot 10^{+72}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\

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

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


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

    1. Initial program 60.0%

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

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

      \[\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-cbrt65.2%

        \[\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. pow365.2%

        \[\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-prod65.1%

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{t}{\sqrt[3]{\color{blue}{\ell \cdot \ell}}} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}} \]
      10. cbrt-prod73.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}} \]
      11. unpow273.1%

        \[\leadsto \frac{2}{{\left(\frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}} \]
      12. div-inv73.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}} \]
      13. pow-flip73.0%

        \[\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}} \]
      14. metadata-eval73.0%

        \[\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-rr73.0%

      \[\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. add-sqr-sqrt73.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k \cdot \sqrt{2}} \cdot \sqrt[3]{\color{blue}{k} \cdot \sqrt{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(\sqrt[3]{k \cdot \sqrt{2}} \cdot \sqrt[3]{k \cdot \sqrt{2}}\right)}\right)}^{3}} \]
    9. Step-by-step derivation
      1. unpow282.7%

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

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

    if 0.00350000000000000007 < k < 4.99999999999999992e72

    1. Initial program 50.0%

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

      \[\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.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. times-frac79.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999992e72 < k < 3.00000000000000013e89

    1. Initial program 4.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. Simplified4.2%

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

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\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-rr50.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. /-rgt-identity50.2%

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

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

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

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

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

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

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

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

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

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

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

    if 3.00000000000000013e89 < k

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

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

      \[\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. times-frac71.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 75.2% 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 0.00185:\\ \;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{k \cdot \sqrt{2}} \cdot \frac{\sqrt{t\_m}}{\sqrt[3]{\ell}}\right)}^{2}\right)}^{3}}\\ \mathbf{elif}\;k \leq 5 \cdot 10^{+72}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\ \mathbf{elif}\;k \leq 2.8 \cdot 10^{+89}:\\ \;\;\;\;\frac{2}{\sin k \cdot {t\_m}^{3}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\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 0.00185)
    (/
     2.0
     (pow (pow (* (cbrt (* k (sqrt 2.0))) (/ (sqrt t_m) (cbrt l))) 2.0) 3.0))
    (if (<= k 5e+72)
      (*
       2.0
       (*
        (/ (pow l 2.0) (pow k 2.0))
        (/ (cos k) (* t_m (- 0.5 (/ (cos (* 2.0 k)) 2.0))))))
      (if (<= k 2.8e+89)
        (*
         (/ 2.0 (* (sin k) (pow t_m 3.0)))
         (* (/ l (tan k)) (/ l (+ 2.0 (pow (/ k t_m) 2.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 <= 0.00185) {
		tmp = 2.0 / pow(pow((cbrt((k * sqrt(2.0))) * (sqrt(t_m) / cbrt(l))), 2.0), 3.0);
	} else if (k <= 5e+72) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * (0.5 - (cos((2.0 * k)) / 2.0)))));
	} else if (k <= 2.8e+89) {
		tmp = (2.0 / (sin(k) * pow(t_m, 3.0))) * ((l / tan(k)) * (l / (2.0 + pow((k / t_m), 2.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 <= 0.00185) {
		tmp = 2.0 / Math.pow(Math.pow((Math.cbrt((k * Math.sqrt(2.0))) * (Math.sqrt(t_m) / Math.cbrt(l))), 2.0), 3.0);
	} else if (k <= 5e+72) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * (0.5 - (Math.cos((2.0 * k)) / 2.0)))));
	} else if (k <= 2.8e+89) {
		tmp = (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))) * ((l / Math.tan(k)) * (l / (2.0 + Math.pow((k / t_m), 2.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 <= 0.00185)
		tmp = Float64(2.0 / ((Float64(cbrt(Float64(k * sqrt(2.0))) * Float64(sqrt(t_m) / cbrt(l))) ^ 2.0) ^ 3.0));
	elseif (k <= 5e+72)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))));
	elseif (k <= 2.8e+89)
		tmp = Float64(Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0))) * Float64(Float64(l / tan(k)) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))));
	else
		tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64((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, 0.00185], N[(2.0 / N[Power[N[Power[N[(N[Power[N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Sqrt[t$95$m], $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5e+72], 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[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.8e+89], N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;k \leq 0.00185:\\
\;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{k \cdot \sqrt{2}} \cdot \frac{\sqrt{t\_m}}{\sqrt[3]{\ell}}\right)}^{2}\right)}^{3}}\\

\mathbf{elif}\;k \leq 5 \cdot 10^{+72}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\

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

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


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

    1. Initial program 60.0%

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

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

      \[\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-cbrt65.2%

        \[\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. pow365.2%

        \[\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-prod65.1%

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{t}{\sqrt[3]{\color{blue}{\ell \cdot \ell}}} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}} \]
      10. cbrt-prod73.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}} \]
      11. unpow273.1%

        \[\leadsto \frac{2}{{\left(\frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}} \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}} \]
      12. div-inv73.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}} \]
      13. pow-flip73.0%

        \[\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}} \]
      14. metadata-eval73.0%

        \[\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-rr73.0%

      \[\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. add-sqr-sqrt31.9%

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

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

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

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

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

    if 0.0018500000000000001 < k < 4.99999999999999992e72

    1. Initial program 50.0%

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

      \[\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.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. times-frac79.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999992e72 < k < 2.7999999999999998e89

    1. Initial program 4.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. Simplified4.2%

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

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\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-rr50.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. /-rgt-identity50.2%

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

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

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

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

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

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

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

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

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

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

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

    if 2.7999999999999998e89 < k

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

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

      \[\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. times-frac71.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 78.1% accurate, 0.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.8 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\ \mathbf{elif}\;t\_m \leq 9 \cdot 10^{-26}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\right)\\ \mathbf{elif}\;t\_m \leq 7.7 \cdot 10^{+86}:\\ \;\;\;\;\frac{\ell}{2 + t\_2} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t\_m}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(\tan k \cdot \left(1 + \left(t\_2 + 1\right)\right)\right)}\\ \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 (/ k t_m) 2.0)))
   (*
    t_s
    (if (<= t_m 2.8e-158)
      (* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
      (if (<= t_m 9e-26)
        (*
         2.0
         (*
          (pow l 2.0)
          (* (pow k -2.0) (/ (cos k) (* t_m (pow (sin k) 2.0))))))
        (if (<= t_m 7.7e+86)
          (*
           (/ l (+ 2.0 t_2))
           (* (/ l (tan k)) (/ 2.0 (* (sin k) (pow t_m 3.0)))))
          (/
           2.0
           (*
            (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0))
            (* (tan k) (+ 1.0 (+ t_2 1.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((k / t_m), 2.0);
	double tmp;
	if (t_m <= 2.8e-158) {
		tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	} else if (t_m <= 9e-26) {
		tmp = 2.0 * (pow(l, 2.0) * (pow(k, -2.0) * (cos(k) / (t_m * pow(sin(k), 2.0)))));
	} else if (t_m <= 7.7e+86) {
		tmp = (l / (2.0 + t_2)) * ((l / tan(k)) * (2.0 / (sin(k) * pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (tan(k) * (1.0 + (t_2 + 1.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) :: t_2
    real(8) :: tmp
    t_2 = (k / t_m) ** 2.0d0
    if (t_m <= 2.8d-158) then
        tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
    else if (t_m <= 9d-26) then
        tmp = 2.0d0 * ((l ** 2.0d0) * ((k ** (-2.0d0)) * (cos(k) / (t_m * (sin(k) ** 2.0d0)))))
    else if (t_m <= 7.7d+86) then
        tmp = (l / (2.0d0 + t_2)) * ((l / tan(k)) * (2.0d0 / (sin(k) * (t_m ** 3.0d0))))
    else
        tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (tan(k) * (1.0d0 + (t_2 + 1.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 t_2 = Math.pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 2.8e-158) {
		tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	} else if (t_m <= 9e-26) {
		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)))));
	} else if (t_m <= 7.7e+86) {
		tmp = (l / (2.0 + t_2)) * ((l / Math.tan(k)) * (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (Math.tan(k) * (1.0 + (t_2 + 1.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):
	t_2 = math.pow((k / t_m), 2.0)
	tmp = 0
	if t_m <= 2.8e-158:
		tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0)
	elif t_m <= 9e-26:
		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)))))
	elif t_m <= 7.7e+86:
		tmp = (l / (2.0 + t_2)) * ((l / math.tan(k)) * (2.0 / (math.sin(k) * math.pow(t_m, 3.0))))
	else:
		tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (math.tan(k) * (1.0 + (t_2 + 1.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(k / t_m) ^ 2.0
	tmp = 0.0
	if (t_m <= 2.8e-158)
		tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0));
	elseif (t_m <= 9e-26)
		tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64((k ^ -2.0) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))));
	elseif (t_m <= 7.7e+86)
		tmp = Float64(Float64(l / Float64(2.0 + t_2)) * Float64(Float64(l / tan(k)) * Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0)))));
	else
		tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(tan(k) * Float64(1.0 + Float64(t_2 + 1.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)
	t_2 = (k / t_m) ^ 2.0;
	tmp = 0.0;
	if (t_m <= 2.8e-158)
		tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0);
	elseif (t_m <= 9e-26)
		tmp = 2.0 * ((l ^ 2.0) * ((k ^ -2.0) * (cos(k) / (t_m * (sin(k) ^ 2.0)))));
	elseif (t_m <= 7.7e+86)
		tmp = (l / (2.0 + t_2)) * ((l / tan(k)) * (2.0 / (sin(k) * (t_m ^ 3.0))));
	else
		tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (tan(k) * (1.0 + (t_2 + 1.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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.8e-158], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9e-26], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.7e+86], N[(N[(l / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.8 \cdot 10^{-158}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\

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

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

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(\tan k \cdot \left(1 + \left(t\_2 + 1\right)\right)\right)}\\


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

    1. Initial program 53.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. Simplified54.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 65.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. times-frac66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.80000000000000002e-158 < t < 8.9999999999999998e-26

    1. Initial program 62.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.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 79.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. times-frac79.1%

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999998e-26 < t < 7.70000000000000053e86

    1. Initial program 72.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. Simplified72.4%

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

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\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-rr93.3%

      \[\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. /-rgt-identity93.3%

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

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

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

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

    if 7.70000000000000053e86 < t

    1. Initial program 54.0%

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

      \[\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-sqr-sqrt54.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.8 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-26}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\right)\\ \mathbf{elif}\;t \leq 7.7 \cdot 10^{+86}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 75.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}\;t\_m \leq 2.8 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\ \mathbf{elif}\;t\_m \leq 9 \cdot 10^{-26}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{{\left(t\_m \cdot \sqrt[3]{\sin k}\right)}^{3}}\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 2.8e-158)
    (* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
    (if (<= t_m 9e-26)
      (*
       2.0
       (* (pow l 2.0) (* (pow k -2.0) (/ (cos k) (* t_m (pow (sin k) 2.0))))))
      (*
       (/ l (+ 2.0 (pow (/ k t_m) 2.0)))
       (* (/ l (tan k)) (/ 2.0 (pow (* t_m (cbrt (sin k))) 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.8e-158) {
		tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	} else if (t_m <= 9e-26) {
		tmp = 2.0 * (pow(l, 2.0) * (pow(k, -2.0) * (cos(k) / (t_m * pow(sin(k), 2.0)))));
	} else {
		tmp = (l / (2.0 + pow((k / t_m), 2.0))) * ((l / tan(k)) * (2.0 / pow((t_m * cbrt(sin(k))), 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.8e-158) {
		tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	} else if (t_m <= 9e-26) {
		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)))));
	} else {
		tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l / Math.tan(k)) * (2.0 / Math.pow((t_m * Math.cbrt(Math.sin(k))), 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.8e-158)
		tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0));
	elseif (t_m <= 9e-26)
		tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64((k ^ -2.0) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))));
	else
		tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l / tan(k)) * Float64(2.0 / (Float64(t_m * cbrt(sin(k))) ^ 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.8e-158], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9e-26], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[Power[N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.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}\;t\_m \leq 2.8 \cdot 10^{-158}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\

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

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


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

    1. Initial program 53.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. Simplified54.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 65.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. times-frac66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.80000000000000002e-158 < t < 8.9999999999999998e-26

    1. Initial program 62.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.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 79.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. times-frac79.1%

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999998e-26 < t

    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. Simplified58.9%

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

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\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-rr73.9%

      \[\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. /-rgt-identity73.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 76.0% accurate, 0.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.8 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\ \mathbf{elif}\;t\_m \leq 9 \cdot 10^{-26}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\right)\\ \mathbf{elif}\;t\_m \leq 5 \cdot 10^{+86}:\\ \;\;\;\;\frac{\ell}{2 + t\_2} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t\_m}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(t\_2 + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\ \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 (/ k t_m) 2.0)))
   (*
    t_s
    (if (<= t_m 2.8e-158)
      (* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
      (if (<= t_m 9e-26)
        (*
         2.0
         (*
          (pow l 2.0)
          (* (pow k -2.0) (/ (cos k) (* t_m (pow (sin k) 2.0))))))
        (if (<= t_m 5e+86)
          (*
           (/ l (+ 2.0 t_2))
           (* (/ l (tan k)) (/ 2.0 (* (sin k) (pow t_m 3.0)))))
          (/
           2.0
           (*
            (* (tan k) (+ 1.0 (+ t_2 1.0)))
            (* (sin k) (* (/ (pow t_m 2.0) l) (/ 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) {
	double t_2 = pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 2.8e-158) {
		tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	} else if (t_m <= 9e-26) {
		tmp = 2.0 * (pow(l, 2.0) * (pow(k, -2.0) * (cos(k) / (t_m * pow(sin(k), 2.0)))));
	} else if (t_m <= 5e+86) {
		tmp = (l / (2.0 + t_2)) * ((l / tan(k)) * (2.0 / (sin(k) * pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / 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) :: t_2
    real(8) :: tmp
    t_2 = (k / t_m) ** 2.0d0
    if (t_m <= 2.8d-158) then
        tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
    else if (t_m <= 9d-26) then
        tmp = 2.0d0 * ((l ** 2.0d0) * ((k ** (-2.0d0)) * (cos(k) / (t_m * (sin(k) ** 2.0d0)))))
    else if (t_m <= 5d+86) then
        tmp = (l / (2.0d0 + t_2)) * ((l / tan(k)) * (2.0d0 / (sin(k) * (t_m ** 3.0d0))))
    else
        tmp = 2.0d0 / ((tan(k) * (1.0d0 + (t_2 + 1.0d0))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / 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 t_2 = Math.pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 2.8e-158) {
		tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	} else if (t_m <= 9e-26) {
		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)))));
	} else if (t_m <= 5e+86) {
		tmp = (l / (2.0 + t_2)) * ((l / Math.tan(k)) * (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / ((Math.tan(k) * (1.0 + (t_2 + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / 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):
	t_2 = math.pow((k / t_m), 2.0)
	tmp = 0
	if t_m <= 2.8e-158:
		tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0)
	elif t_m <= 9e-26:
		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)))))
	elif t_m <= 5e+86:
		tmp = (l / (2.0 + t_2)) * ((l / math.tan(k)) * (2.0 / (math.sin(k) * math.pow(t_m, 3.0))))
	else:
		tmp = 2.0 / ((math.tan(k) * (1.0 + (t_2 + 1.0))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l))))
	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(k / t_m) ^ 2.0
	tmp = 0.0
	if (t_m <= 2.8e-158)
		tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0));
	elseif (t_m <= 9e-26)
		tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64((k ^ -2.0) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0))))));
	elseif (t_m <= 5e+86)
		tmp = Float64(Float64(l / Float64(2.0 + t_2)) * Float64(Float64(l / tan(k)) * Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0)))));
	else
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(t_2 + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / 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)
	t_2 = (k / t_m) ^ 2.0;
	tmp = 0.0;
	if (t_m <= 2.8e-158)
		tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0);
	elseif (t_m <= 9e-26)
		tmp = 2.0 * ((l ^ 2.0) * ((k ^ -2.0) * (cos(k) / (t_m * (sin(k) ^ 2.0)))));
	elseif (t_m <= 5e+86)
		tmp = (l / (2.0 + t_2)) * ((l / tan(k)) * (2.0 / (sin(k) * (t_m ^ 3.0))));
	else
		tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / 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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.8e-158], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9e-26], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5e+86], N[(N[(l / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.8 \cdot 10^{-158}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\

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

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

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


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

    1. Initial program 53.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. Simplified54.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 65.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. times-frac66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.80000000000000002e-158 < t < 8.9999999999999998e-26

    1. Initial program 62.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.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 79.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. times-frac79.1%

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999998e-26 < t < 4.9999999999999998e86

    1. Initial program 72.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. Simplified72.4%

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

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\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-rr93.3%

      \[\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. /-rgt-identity93.3%

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

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

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

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

    if 4.9999999999999998e86 < t

    1. Initial program 54.0%

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

      \[\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. unpow354.0%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac73.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.8 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-26}:\\ \;\;\;\;2 \cdot \left({\ell}^{2} \cdot \left({k}^{-2} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+86}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 75.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 := {\left(\frac{k}{t\_m}\right)}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.2 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\ \mathbf{elif}\;t\_m \leq 4.8 \cdot 10^{-103}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\ \mathbf{elif}\;t\_m \leq 7.7 \cdot 10^{+86}:\\ \;\;\;\;\frac{\ell}{2 + t\_2} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t\_m}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(t\_2 + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\ \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 (/ k t_m) 2.0)))
   (*
    t_s
    (if (<= t_m 3.2e-158)
      (* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
      (if (<= t_m 4.8e-103)
        (*
         2.0
         (*
          (/ (pow l 2.0) (pow k 2.0))
          (/ (cos k) (* t_m (- 0.5 (/ (cos (* 2.0 k)) 2.0))))))
        (if (<= t_m 7.7e+86)
          (*
           (/ l (+ 2.0 t_2))
           (* (/ l (tan k)) (/ 2.0 (* (sin k) (pow t_m 3.0)))))
          (/
           2.0
           (*
            (* (tan k) (+ 1.0 (+ t_2 1.0)))
            (* (sin k) (* (/ (pow t_m 2.0) l) (/ 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) {
	double t_2 = pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 3.2e-158) {
		tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	} else if (t_m <= 4.8e-103) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * (0.5 - (cos((2.0 * k)) / 2.0)))));
	} else if (t_m <= 7.7e+86) {
		tmp = (l / (2.0 + t_2)) * ((l / tan(k)) * (2.0 / (sin(k) * pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / 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) :: t_2
    real(8) :: tmp
    t_2 = (k / t_m) ** 2.0d0
    if (t_m <= 3.2d-158) then
        tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
    else if (t_m <= 4.8d-103) then
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 2.0d0)) * (cos(k) / (t_m * (0.5d0 - (cos((2.0d0 * k)) / 2.0d0)))))
    else if (t_m <= 7.7d+86) then
        tmp = (l / (2.0d0 + t_2)) * ((l / tan(k)) * (2.0d0 / (sin(k) * (t_m ** 3.0d0))))
    else
        tmp = 2.0d0 / ((tan(k) * (1.0d0 + (t_2 + 1.0d0))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / 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 t_2 = Math.pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 3.2e-158) {
		tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	} else if (t_m <= 4.8e-103) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * (0.5 - (Math.cos((2.0 * k)) / 2.0)))));
	} else if (t_m <= 7.7e+86) {
		tmp = (l / (2.0 + t_2)) * ((l / Math.tan(k)) * (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / ((Math.tan(k) * (1.0 + (t_2 + 1.0))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / 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):
	t_2 = math.pow((k / t_m), 2.0)
	tmp = 0
	if t_m <= 3.2e-158:
		tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0)
	elif t_m <= 4.8e-103:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * (0.5 - (math.cos((2.0 * k)) / 2.0)))))
	elif t_m <= 7.7e+86:
		tmp = (l / (2.0 + t_2)) * ((l / math.tan(k)) * (2.0 / (math.sin(k) * math.pow(t_m, 3.0))))
	else:
		tmp = 2.0 / ((math.tan(k) * (1.0 + (t_2 + 1.0))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l))))
	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(k / t_m) ^ 2.0
	tmp = 0.0
	if (t_m <= 3.2e-158)
		tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0));
	elseif (t_m <= 4.8e-103)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))));
	elseif (t_m <= 7.7e+86)
		tmp = Float64(Float64(l / Float64(2.0 + t_2)) * Float64(Float64(l / tan(k)) * Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0)))));
	else
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(t_2 + 1.0))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / 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)
	t_2 = (k / t_m) ^ 2.0;
	tmp = 0.0;
	if (t_m <= 3.2e-158)
		tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0);
	elseif (t_m <= 4.8e-103)
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t_m * (0.5 - (cos((2.0 * k)) / 2.0)))));
	elseif (t_m <= 7.7e+86)
		tmp = (l / (2.0 + t_2)) * ((l / tan(k)) * (2.0 / (sin(k) * (t_m ^ 3.0))));
	else
		tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / 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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.2e-158], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.8e-103], 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[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.7e+86], N[(N[(l / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.2 \cdot 10^{-158}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\

\mathbf{elif}\;t\_m \leq 4.8 \cdot 10^{-103}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\

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

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


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

    1. Initial program 53.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. Simplified54.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 65.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. times-frac66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.19999999999999996e-158 < t < 4.8000000000000004e-103

    1. Initial program 22.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. Simplified22.2%

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

      \[\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. times-frac77.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000004e-103 < t < 7.70000000000000053e86

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

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \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.1%

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\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-rr87.6%

      \[\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. /-rgt-identity87.6%

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

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

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

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

    if 7.70000000000000053e86 < t

    1. Initial program 54.0%

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

      \[\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. unpow354.0%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac73.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.2 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-103}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\ \mathbf{elif}\;t \leq 7.7 \cdot 10^{+86}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 73.6% 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 3.2 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\ \mathbf{elif}\;t\_m \leq 4.8 \cdot 10^{-103}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\ \mathbf{elif}\;t\_m \leq 7.7 \cdot 10^{+86}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t\_m}^{3}}\right)\\ \mathbf{elif}\;t\_m \leq 3.45 \cdot 10^{+168}:\\ \;\;\;\;\frac{2}{\left({t\_m}^{1.5} \cdot \frac{\frac{{t\_m}^{1.5}}{\ell}}{\ell}\right) \cdot \left(2 \cdot {k}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\ell \cdot \frac{\frac{1}{k}}{\sqrt{{t\_m}^{3}}}\right)}^{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 (<= t_m 3.2e-158)
    (* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
    (if (<= t_m 4.8e-103)
      (*
       2.0
       (*
        (/ (pow l 2.0) (pow k 2.0))
        (/ (cos k) (* t_m (- 0.5 (/ (cos (* 2.0 k)) 2.0))))))
      (if (<= t_m 7.7e+86)
        (*
         (/ l (+ 2.0 (pow (/ k t_m) 2.0)))
         (* (/ l (tan k)) (/ 2.0 (* (sin k) (pow t_m 3.0)))))
        (if (<= t_m 3.45e+168)
          (/
           2.0
           (* (* (pow t_m 1.5) (/ (/ (pow t_m 1.5) l) l)) (* 2.0 (pow k 2.0))))
          (pow (* l (/ (/ 1.0 k) (sqrt (pow t_m 3.0)))) 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.2e-158) {
		tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	} else if (t_m <= 4.8e-103) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * (0.5 - (cos((2.0 * k)) / 2.0)))));
	} else if (t_m <= 7.7e+86) {
		tmp = (l / (2.0 + pow((k / t_m), 2.0))) * ((l / tan(k)) * (2.0 / (sin(k) * pow(t_m, 3.0))));
	} else if (t_m <= 3.45e+168) {
		tmp = 2.0 / ((pow(t_m, 1.5) * ((pow(t_m, 1.5) / l) / l)) * (2.0 * pow(k, 2.0)));
	} else {
		tmp = pow((l * ((1.0 / k) / sqrt(pow(t_m, 3.0)))), 2.0);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 3.2d-158) then
        tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
    else if (t_m <= 4.8d-103) then
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 2.0d0)) * (cos(k) / (t_m * (0.5d0 - (cos((2.0d0 * k)) / 2.0d0)))))
    else if (t_m <= 7.7d+86) then
        tmp = (l / (2.0d0 + ((k / t_m) ** 2.0d0))) * ((l / tan(k)) * (2.0d0 / (sin(k) * (t_m ** 3.0d0))))
    else if (t_m <= 3.45d+168) then
        tmp = 2.0d0 / (((t_m ** 1.5d0) * (((t_m ** 1.5d0) / l) / l)) * (2.0d0 * (k ** 2.0d0)))
    else
        tmp = (l * ((1.0d0 / k) / sqrt((t_m ** 3.0d0)))) ** 2.0d0
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.2e-158) {
		tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	} else if (t_m <= 4.8e-103) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * (0.5 - (Math.cos((2.0 * k)) / 2.0)))));
	} else if (t_m <= 7.7e+86) {
		tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l / Math.tan(k)) * (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))));
	} else if (t_m <= 3.45e+168) {
		tmp = 2.0 / ((Math.pow(t_m, 1.5) * ((Math.pow(t_m, 1.5) / l) / l)) * (2.0 * Math.pow(k, 2.0)));
	} else {
		tmp = Math.pow((l * ((1.0 / k) / Math.sqrt(Math.pow(t_m, 3.0)))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 3.2e-158:
		tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0)
	elif t_m <= 4.8e-103:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * (0.5 - (math.cos((2.0 * k)) / 2.0)))))
	elif t_m <= 7.7e+86:
		tmp = (l / (2.0 + math.pow((k / t_m), 2.0))) * ((l / math.tan(k)) * (2.0 / (math.sin(k) * math.pow(t_m, 3.0))))
	elif t_m <= 3.45e+168:
		tmp = 2.0 / ((math.pow(t_m, 1.5) * ((math.pow(t_m, 1.5) / l) / l)) * (2.0 * math.pow(k, 2.0)))
	else:
		tmp = math.pow((l * ((1.0 / k) / math.sqrt(math.pow(t_m, 3.0)))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 3.2e-158)
		tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0));
	elseif (t_m <= 4.8e-103)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))));
	elseif (t_m <= 7.7e+86)
		tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l / tan(k)) * Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0)))));
	elseif (t_m <= 3.45e+168)
		tmp = Float64(2.0 / Float64(Float64((t_m ^ 1.5) * Float64(Float64((t_m ^ 1.5) / l) / l)) * Float64(2.0 * (k ^ 2.0))));
	else
		tmp = Float64(l * Float64(Float64(1.0 / k) / sqrt((t_m ^ 3.0)))) ^ 2.0;
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 3.2e-158)
		tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0);
	elseif (t_m <= 4.8e-103)
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t_m * (0.5 - (cos((2.0 * k)) / 2.0)))));
	elseif (t_m <= 7.7e+86)
		tmp = (l / (2.0 + ((k / t_m) ^ 2.0))) * ((l / tan(k)) * (2.0 / (sin(k) * (t_m ^ 3.0))));
	elseif (t_m <= 3.45e+168)
		tmp = 2.0 / (((t_m ^ 1.5) * (((t_m ^ 1.5) / l) / l)) * (2.0 * (k ^ 2.0)));
	else
		tmp = (l * ((1.0 / k) / sqrt((t_m ^ 3.0)))) ^ 2.0;
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.2e-158], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.8e-103], 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[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.7e+86], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.45e+168], N[(2.0 / N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l * N[(N[(1.0 / k), $MachinePrecision] / N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.2 \cdot 10^{-158}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\

\mathbf{elif}\;t\_m \leq 4.8 \cdot 10^{-103}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\

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

\mathbf{elif}\;t\_m \leq 3.45 \cdot 10^{+168}:\\
\;\;\;\;\frac{2}{\left({t\_m}^{1.5} \cdot \frac{\frac{{t\_m}^{1.5}}{\ell}}{\ell}\right) \cdot \left(2 \cdot {k}^{2}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < 3.19999999999999996e-158

    1. Initial program 53.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. Simplified54.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 65.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. times-frac66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.19999999999999996e-158 < t < 4.8000000000000004e-103

    1. Initial program 22.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. Simplified22.2%

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

      \[\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. times-frac77.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000004e-103 < t < 7.70000000000000053e86

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

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \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.1%

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\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-rr87.6%

      \[\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. /-rgt-identity87.6%

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

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

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

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

    if 7.70000000000000053e86 < t < 3.4499999999999999e168

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

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

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)} \cdot {t}^{\left(\frac{3}{2}\right)}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. *-un-lft-identity51.0%

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\color{blue}{{t}^{1.5}} \cdot \frac{{t}^{1.5}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. associate-/l*61.5%

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

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

    if 3.4499999999999999e168 < t

    1. Initial program 55.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified60.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 60.0%

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

        \[\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 {k}^{2}\right)} \]
      2. pow360.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.2 \cdot 10^{-158}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-103}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\right)\\ \mathbf{elif}\;t \leq 7.7 \cdot 10^{+86}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t}^{3}}\right)\\ \mathbf{elif}\;t \leq 3.45 \cdot 10^{+168}:\\ \;\;\;\;\frac{2}{\left({t}^{1.5} \cdot \frac{\frac{{t}^{1.5}}{\ell}}{\ell}\right) \cdot \left(2 \cdot {k}^{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\ell \cdot \frac{\frac{1}{k}}{\sqrt{{t}^{3}}}\right)}^{2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 66.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}\;k \leq 0.00245:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \sqrt{2}\right) \cdot \frac{\sqrt{{t\_m}^{3}}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}\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 0.00245)
    (/ 2.0 (pow (* (* k (sqrt 2.0)) (/ (sqrt (pow t_m 3.0)) l)) 2.0))
    (*
     2.0
     (*
      (/ (pow l 2.0) (pow k 2.0))
      (/ (cos k) (* t_m (- 0.5 (/ (cos (* 2.0 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 <= 0.00245) {
		tmp = 2.0 / pow(((k * sqrt(2.0)) * (sqrt(pow(t_m, 3.0)) / l)), 2.0);
	} else {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * (0.5 - (cos((2.0 * k)) / 2.0)))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 0.00245d0) then
        tmp = 2.0d0 / (((k * sqrt(2.0d0)) * (sqrt((t_m ** 3.0d0)) / l)) ** 2.0d0)
    else
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 2.0d0)) * (cos(k) / (t_m * (0.5d0 - (cos((2.0d0 * k)) / 2.0d0)))))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 0.00245) {
		tmp = 2.0 / Math.pow(((k * Math.sqrt(2.0)) * (Math.sqrt(Math.pow(t_m, 3.0)) / l)), 2.0);
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * (0.5 - (Math.cos((2.0 * k)) / 2.0)))));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 0.00245:
		tmp = 2.0 / math.pow(((k * math.sqrt(2.0)) * (math.sqrt(math.pow(t_m, 3.0)) / l)), 2.0)
	else:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * (0.5 - (math.cos((2.0 * 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 <= 0.00245)
		tmp = Float64(2.0 / (Float64(Float64(k * sqrt(2.0)) * Float64(sqrt((t_m ^ 3.0)) / l)) ^ 2.0));
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 0.00245)
		tmp = 2.0 / (((k * sqrt(2.0)) * (sqrt((t_m ^ 3.0)) / l)) ^ 2.0);
	else
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t_m * (0.5 - (cos((2.0 * k)) / 2.0)))));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 0.00245], N[(2.0 / N[Power[N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.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[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 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 \begin{array}{l}
\mathbf{if}\;k \leq 0.00245:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \sqrt{2}\right) \cdot \frac{\sqrt{{t\_m}^{3}}}{\ell}\right)}^{2}}\\

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


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

    1. Initial program 60.0%

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

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

      \[\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-cbrt65.2%

        \[\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 {k}^{2}\right)} \]
      2. pow365.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0024499999999999999 < k

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

      \[\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. times-frac70.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 64.3% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 0.0056:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \sqrt{2}\right) \cdot \frac{\sqrt{{t\_m}^{3}}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot {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 0.0056)
    (/ 2.0 (pow (* (* k (sqrt 2.0)) (/ (sqrt (pow t_m 3.0)) l)) 2.0))
    (* 2.0 (* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* t_m (pow 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 <= 0.0056) {
		tmp = 2.0 / pow(((k * sqrt(2.0)) * (sqrt(pow(t_m, 3.0)) / l)), 2.0);
	} else {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * pow(k, 2.0))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 0.0056d0) then
        tmp = 2.0d0 / (((k * sqrt(2.0d0)) * (sqrt((t_m ** 3.0d0)) / l)) ** 2.0d0)
    else
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 2.0d0)) * (cos(k) / (t_m * (k ** 2.0d0))))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 0.0056) {
		tmp = 2.0 / Math.pow(((k * Math.sqrt(2.0)) * (Math.sqrt(Math.pow(t_m, 3.0)) / l)), 2.0);
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * Math.pow(k, 2.0))));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 0.0056:
		tmp = 2.0 / math.pow(((k * math.sqrt(2.0)) * (math.sqrt(math.pow(t_m, 3.0)) / l)), 2.0)
	else:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * math.pow(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 <= 0.0056)
		tmp = Float64(2.0 / (Float64(Float64(k * sqrt(2.0)) * Float64(sqrt((t_m ^ 3.0)) / l)) ^ 2.0));
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * (k ^ 2.0)))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 0.0056)
		tmp = 2.0 / (((k * sqrt(2.0)) * (sqrt((t_m ^ 3.0)) / l)) ^ 2.0);
	else
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t_m * (k ^ 2.0))));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 0.0056], N[(2.0 / N[Power[N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.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[k, 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 0.0056:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \sqrt{2}\right) \cdot \frac{\sqrt{{t\_m}^{3}}}{\ell}\right)}^{2}}\\

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


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

    1. Initial program 60.0%

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

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

      \[\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-cbrt65.2%

        \[\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 {k}^{2}\right)} \]
      2. pow365.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.00559999999999999994 < k

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

      \[\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. times-frac70.7%

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

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

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

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

Alternative 13: 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}\;k \leq 0.0035:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \sqrt{2}\right) \cdot \frac{\sqrt{{t\_m}^{3}}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{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 0.0035)
    (/ 2.0 (pow (* (* k (sqrt 2.0)) (/ (sqrt (pow t_m 3.0)) l)) 2.0))
    (* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 0.0035) {
		tmp = 2.0 / pow(((k * sqrt(2.0)) * (sqrt(pow(t_m, 3.0)) / l)), 2.0);
	} else {
		tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 0.0035d0) then
        tmp = 2.0d0 / (((k * sqrt(2.0d0)) * (sqrt((t_m ** 3.0d0)) / l)) ** 2.0d0)
    else
        tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 0.0035) {
		tmp = 2.0 / Math.pow(((k * Math.sqrt(2.0)) * (Math.sqrt(Math.pow(t_m, 3.0)) / l)), 2.0);
	} else {
		tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 0.0035:
		tmp = 2.0 / math.pow(((k * math.sqrt(2.0)) * (math.sqrt(math.pow(t_m, 3.0)) / l)), 2.0)
	else:
		tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 0.0035)
		tmp = Float64(2.0 / (Float64(Float64(k * sqrt(2.0)) * Float64(sqrt((t_m ^ 3.0)) / l)) ^ 2.0));
	else
		tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 0.0035)
		tmp = 2.0 / (((k * sqrt(2.0)) * (sqrt((t_m ^ 3.0)) / l)) ^ 2.0);
	else
		tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 0.0035], N[(2.0 / N[Power[N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.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 0.0035:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \sqrt{2}\right) \cdot \frac{\sqrt{{t\_m}^{3}}}{\ell}\right)}^{2}}\\

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


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

    1. Initial program 60.0%

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

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

      \[\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-cbrt65.2%

        \[\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 {k}^{2}\right)} \]
      2. pow365.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.00350000000000000007 < k

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

      \[\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. times-frac70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 63.4% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.05 \cdot 10^{+41}:\\ \;\;\;\;\left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t\_m}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{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 1.05e+41)
    (* (* (/ l (tan k)) (/ 2.0 (* (sin k) (pow t_m 3.0)))) (* l 0.5))
    (* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.05e+41) {
		tmp = ((l / tan(k)) * (2.0 / (sin(k) * pow(t_m, 3.0)))) * (l * 0.5);
	} else {
		tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 1.05d+41) then
        tmp = ((l / tan(k)) * (2.0d0 / (sin(k) * (t_m ** 3.0d0)))) * (l * 0.5d0)
    else
        tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.05e+41) {
		tmp = ((l / Math.tan(k)) * (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l * 0.5);
	} else {
		tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 1.05e+41:
		tmp = ((l / math.tan(k)) * (2.0 / (math.sin(k) * math.pow(t_m, 3.0)))) * (l * 0.5)
	else:
		tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 1.05e+41)
		tmp = Float64(Float64(Float64(l / tan(k)) * Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l * 0.5));
	else
		tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 1.05e+41)
		tmp = ((l / tan(k)) * (2.0 / (sin(k) * (t_m ^ 3.0)))) * (l * 0.5);
	else
		tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.05e+41], N[(N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.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.05 \cdot 10^{+41}:\\
\;\;\;\;\left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t\_m}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\

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


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

    1. Initial program 59.0%

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

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

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\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-rr67.1%

      \[\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. /-rgt-identity67.1%

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

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

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

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

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

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

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

    if 1.05e41 < k

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

      \[\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 71.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. times-frac68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 64.0% 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 2.85 \cdot 10^{-27}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}\\ \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.85e-27)
    (* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
    (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* (pow t_m 2.0) (/ t_m 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 <= 2.85e-27) {
		tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 2.0) * (t_m / 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 <= 2.85d-27) then
        tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
    else
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 2.0d0) * (t_m / 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 <= 2.85e-27) {
		tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 2.0) * (t_m / 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 <= 2.85e-27:
		tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0)
	else:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 2.0) * (t_m / 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 <= 2.85e-27)
		tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 2.0) * Float64(t_m / 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 <= 2.85e-27)
		tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0);
	else
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 2.0) * (t_m / 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, 2.85e-27], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $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.85 \cdot 10^{-27}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\

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


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

    1. Initial program 55.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. Simplified55.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. Taylor expanded in t around 0 67.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. times-frac68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8499999999999998e-27 < t

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. *-un-lft-identity63.0%

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

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

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

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

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

Alternative 16: 68.4% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.4 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\ell \cdot \frac{\frac{1}{k}}{\sqrt{{t\_m}^{3}}}\right)}^{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 (<= t_m 3.4e-29)
    (* 2.0 (pow (/ l (* (pow k 2.0) (sqrt t_m))) 2.0))
    (pow (* l (/ (/ 1.0 k) (sqrt (pow t_m 3.0)))) 2.0))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.4e-29) {
		tmp = 2.0 * pow((l / (pow(k, 2.0) * sqrt(t_m))), 2.0);
	} else {
		tmp = pow((l * ((1.0 / k) / sqrt(pow(t_m, 3.0)))), 2.0);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 3.4d-29) then
        tmp = 2.0d0 * ((l / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
    else
        tmp = (l * ((1.0d0 / k) / sqrt((t_m ** 3.0d0)))) ** 2.0d0
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.4e-29) {
		tmp = 2.0 * Math.pow((l / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
	} else {
		tmp = Math.pow((l * ((1.0 / k) / Math.sqrt(Math.pow(t_m, 3.0)))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 3.4e-29:
		tmp = 2.0 * math.pow((l / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0)
	else:
		tmp = math.pow((l * ((1.0 / k) / math.sqrt(math.pow(t_m, 3.0)))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 3.4e-29)
		tmp = Float64(2.0 * (Float64(l / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0));
	else
		tmp = Float64(l * Float64(Float64(1.0 / k) / sqrt((t_m ^ 3.0)))) ^ 2.0;
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 3.4e-29)
		tmp = 2.0 * ((l / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0);
	else
		tmp = (l * ((1.0 / k) / sqrt((t_m ^ 3.0)))) ^ 2.0;
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.4e-29], N[(2.0 * N[Power[N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(l * N[(N[(1.0 / k), $MachinePrecision] / N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.4 \cdot 10^{-29}:\\
\;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t\_m}}\right)}^{2}\\

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


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

    1. Initial program 55.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. Simplified55.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. Taylor expanded in t around 0 67.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. times-frac68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.39999999999999972e-29 < t

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

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

      \[\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(\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 {k}^{2}\right)} \]
      2. pow362.9%

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

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

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

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{{\ell}^{2}}}\right)}}^{3} \cdot \left(2 \cdot {k}^{2}\right)} \]
      6. unpow357.4%

        \[\leadsto \frac{2}{{\left(\frac{\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}}}{\sqrt[3]{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)} \]
      7. add-cbrt-cube59.6%

        \[\leadsto \frac{2}{{\left(\frac{\color{blue}{t}}{\sqrt[3]{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)} \]
      8. unpow259.6%

        \[\leadsto \frac{2}{{\left(\frac{t}{\sqrt[3]{\color{blue}{\ell \cdot \ell}}}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)} \]
      9. cbrt-prod64.8%

        \[\leadsto \frac{2}{{\left(\frac{t}{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)} \]
      10. unpow264.8%

        \[\leadsto \frac{2}{{\left(\frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)} \]
      11. cube-mult64.8%

        \[\leadsto \frac{2}{\color{blue}{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)\right)} \cdot \left(2 \cdot {k}^{2}\right)} \]
      12. div-inv64.8%

        \[\leadsto \frac{2}{\left(\color{blue}{\left(t \cdot \frac{1}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)} \cdot \left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)\right) \cdot \left(2 \cdot {k}^{2}\right)} \]
      13. pow-flip64.8%

        \[\leadsto \frac{2}{\left(\left(t \cdot \color{blue}{{\left(\sqrt[3]{\ell}\right)}^{\left(-2\right)}}\right) \cdot \left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)\right) \cdot \left(2 \cdot {k}^{2}\right)} \]
      14. metadata-eval64.8%

        \[\leadsto \frac{2}{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{\color{blue}{-2}}\right) \cdot \left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)\right) \cdot \left(2 \cdot {k}^{2}\right)} \]
      15. pow264.8%

        \[\leadsto \frac{2}{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \color{blue}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{2}}\right) \cdot \left(2 \cdot {k}^{2}\right)} \]
      16. div-inv64.9%

        \[\leadsto \frac{2}{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot {\color{blue}{\left(t \cdot \frac{1}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}}^{2}\right) \cdot \left(2 \cdot {k}^{2}\right)} \]
      17. pow-flip64.8%

        \[\leadsto \frac{2}{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot {\left(t \cdot \color{blue}{{\left(\sqrt[3]{\ell}\right)}^{\left(-2\right)}}\right)}^{2}\right) \cdot \left(2 \cdot {k}^{2}\right)} \]
      18. metadata-eval64.8%

        \[\leadsto \frac{2}{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot {\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{\color{blue}{-2}}\right)}^{2}\right) \cdot \left(2 \cdot {k}^{2}\right)} \]
    6. Applied egg-rr64.8%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot {\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{2}\right)} \cdot \left(2 \cdot {k}^{2}\right)} \]
    7. Step-by-step derivation
      1. unpow264.8%

        \[\leadsto \frac{2}{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \color{blue}{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}\right) \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. cube-mult64.8%

        \[\leadsto \frac{2}{\color{blue}{{\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}} \cdot \left(2 \cdot {k}^{2}\right)} \]
    8. Simplified64.8%

      \[\leadsto \frac{2}{\color{blue}{{\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}} \cdot \left(2 \cdot {k}^{2}\right)} \]
    9. Applied egg-rr69.0%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{\left(k \cdot \sqrt{2}\right) \cdot \frac{\sqrt{{t}^{3}}}{\ell}} \cdot \frac{\sqrt{2}}{\left(k \cdot \sqrt{2}\right) \cdot \frac{\sqrt{{t}^{3}}}{\ell}}} \]
    10. Step-by-step derivation
      1. unpow269.0%

        \[\leadsto \color{blue}{{\left(\frac{\sqrt{2}}{\left(k \cdot \sqrt{2}\right) \cdot \frac{\sqrt{{t}^{3}}}{\ell}}\right)}^{2}} \]
      2. associate-/r*69.1%

        \[\leadsto {\color{blue}{\left(\frac{\frac{\sqrt{2}}{k \cdot \sqrt{2}}}{\frac{\sqrt{{t}^{3}}}{\ell}}\right)}}^{2} \]
      3. associate-/r/69.0%

        \[\leadsto {\color{blue}{\left(\frac{\frac{\sqrt{2}}{k \cdot \sqrt{2}}}{\sqrt{{t}^{3}}} \cdot \ell\right)}}^{2} \]
      4. *-commutative69.0%

        \[\leadsto {\left(\frac{\frac{\sqrt{2}}{\color{blue}{\sqrt{2} \cdot k}}}{\sqrt{{t}^{3}}} \cdot \ell\right)}^{2} \]
      5. associate-/r*69.0%

        \[\leadsto {\left(\frac{\color{blue}{\frac{\frac{\sqrt{2}}{\sqrt{2}}}{k}}}{\sqrt{{t}^{3}}} \cdot \ell\right)}^{2} \]
      6. *-inverses69.0%

        \[\leadsto {\left(\frac{\frac{\color{blue}{1}}{k}}{\sqrt{{t}^{3}}} \cdot \ell\right)}^{2} \]
    11. Simplified69.0%

      \[\leadsto \color{blue}{{\left(\frac{\frac{1}{k}}{\sqrt{{t}^{3}}} \cdot \ell\right)}^{2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification33.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.4 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot {\left(\frac{\ell}{{k}^{2} \cdot \sqrt{t}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\ell \cdot \frac{\frac{1}{k}}{\sqrt{{t}^{3}}}\right)}^{2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 63.5% 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 3.4 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \left(t\_m \cdot \frac{\frac{{t\_m}^{2}}{\ell}}{\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 3.4e-29)
    (* 2.0 (* (/ l (pow k 4.0)) (/ l t_m)))
    (/ 2.0 (* (* 2.0 (pow k 2.0)) (* t_m (/ (/ (pow t_m 2.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 <= 3.4e-29) {
		tmp = 2.0 * ((l / pow(k, 4.0)) * (l / t_m));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * (t_m * ((pow(t_m, 2.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 <= 3.4d-29) then
        tmp = 2.0d0 * ((l / (k ** 4.0d0)) * (l / t_m))
    else
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (t_m * (((t_m ** 2.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 <= 3.4e-29) {
		tmp = 2.0 * ((l / Math.pow(k, 4.0)) * (l / t_m));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * (t_m * ((Math.pow(t_m, 2.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 <= 3.4e-29:
		tmp = 2.0 * ((l / math.pow(k, 4.0)) * (l / t_m))
	else:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * (t_m * ((math.pow(t_m, 2.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 <= 3.4e-29)
		tmp = Float64(2.0 * Float64(Float64(l / (k ^ 4.0)) * Float64(l / t_m)));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(t_m * Float64(Float64((t_m ^ 2.0) / 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 <= 3.4e-29)
		tmp = 2.0 * ((l / (k ^ 4.0)) * (l / t_m));
	else
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (t_m * (((t_m ^ 2.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, 3.4e-29], N[(2.0 * N[(N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.4 \cdot 10^{-29}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \left(t\_m \cdot \frac{\frac{{t\_m}^{2}}{\ell}}{\ell}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.39999999999999972e-29

    1. Initial program 55.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. Simplified55.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. Taylor expanded in t around 0 67.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. times-frac68.6%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
    6. Simplified68.6%

      \[\leadsto \color{blue}{2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
    7. Taylor expanded in k around 0 61.0%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    8. Step-by-step derivation
      1. unpow261.0%

        \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
    9. Applied egg-rr61.0%

      \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
    10. Step-by-step derivation
      1. times-frac66.2%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]
    11. Applied egg-rr66.2%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]

    if 3.39999999999999972e-29 < t

    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. Simplified65.1%

      \[\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 63.0%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. sqr-pow62.9%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)} \cdot {t}^{\left(\frac{3}{2}\right)}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. *-un-lft-identity62.9%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{\left(\frac{3}{2}\right)} \cdot {t}^{\left(\frac{3}{2}\right)}}{\color{blue}{1 \cdot \ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. times-frac63.1%

        \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{t}^{\left(\frac{3}{2}\right)}}{1} \cdot \frac{{t}^{\left(\frac{3}{2}\right)}}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. metadata-eval63.1%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{\color{blue}{1.5}}}{1} \cdot \frac{{t}^{\left(\frac{3}{2}\right)}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      5. metadata-eval63.1%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{\color{blue}{1.5}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    6. Applied egg-rr63.1%

      \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{1.5}}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    7. Step-by-step derivation
      1. frac-times62.9%

        \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{t}^{1.5} \cdot {t}^{1.5}}{1 \cdot \ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. *-un-lft-identity62.9%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{1.5} \cdot {t}^{1.5}}{\color{blue}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. pow-prod-up63.0%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{t}^{\left(1.5 + 1.5\right)}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. metadata-eval63.0%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{\color{blue}{3}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      5. cube-unmult63.0%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{t \cdot \left(t \cdot t\right)}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      6. unpow263.0%

        \[\leadsto \frac{2}{\frac{\frac{t \cdot \color{blue}{{t}^{2}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      7. associate-*r/63.1%

        \[\leadsto \frac{2}{\frac{\color{blue}{t \cdot \frac{{t}^{2}}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      8. associate-/l*63.1%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \frac{\frac{{t}^{2}}{\ell}}{\ell}\right)} \cdot \left(2 \cdot {k}^{2}\right)} \]
    8. Applied egg-rr63.1%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \frac{\frac{{t}^{2}}{\ell}}{\ell}\right)} \cdot \left(2 \cdot {k}^{2}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.4 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \left(t \cdot \frac{\frac{{t}^{2}}{\ell}}{\ell}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 63.3% 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 3.4 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\ \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 3.4e-29)
    (* 2.0 (* (/ l (pow k 4.0)) (/ l t_m)))
    (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* t_m (/ (pow t_m 2.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 <= 3.4e-29) {
		tmp = 2.0 * ((l / pow(k, 4.0)) * (l / t_m));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((t_m * (pow(t_m, 2.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 <= 3.4d-29) then
        tmp = 2.0d0 * ((l / (k ** 4.0d0)) * (l / t_m))
    else
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m * ((t_m ** 2.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 <= 3.4e-29) {
		tmp = 2.0 * ((l / Math.pow(k, 4.0)) * (l / t_m));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((t_m * (Math.pow(t_m, 2.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 <= 3.4e-29:
		tmp = 2.0 * ((l / math.pow(k, 4.0)) * (l / t_m))
	else:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((t_m * (math.pow(t_m, 2.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 <= 3.4e-29)
		tmp = Float64(2.0 * Float64(Float64(l / (k ^ 4.0)) * Float64(l / t_m)));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64(t_m * Float64((t_m ^ 2.0) / 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 <= 3.4e-29)
		tmp = 2.0 * ((l / (k ^ 4.0)) * (l / t_m));
	else
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * ((t_m * ((t_m ^ 2.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, 3.4e-29], N[(2.0 * N[(N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $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 3.4 \cdot 10^{-29}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t\_m \cdot \frac{{t\_m}^{2}}{\ell}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.39999999999999972e-29

    1. Initial program 55.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. Simplified55.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. Taylor expanded in t around 0 67.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. times-frac68.6%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
    6. Simplified68.6%

      \[\leadsto \color{blue}{2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
    7. Taylor expanded in k around 0 61.0%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    8. Step-by-step derivation
      1. unpow261.0%

        \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
    9. Applied egg-rr61.0%

      \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
    10. Step-by-step derivation
      1. times-frac66.2%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]
    11. Applied egg-rr66.2%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]

    if 3.39999999999999972e-29 < t

    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. Simplified65.1%

      \[\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 63.0%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. cube-mult63.0%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{t \cdot \left(t \cdot t\right)}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. *-un-lft-identity63.0%

        \[\leadsto \frac{2}{\frac{\frac{t \cdot \left(t \cdot t\right)}{\color{blue}{1 \cdot \ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. times-frac63.1%

        \[\leadsto \frac{2}{\frac{\color{blue}{\frac{t}{1} \cdot \frac{t \cdot t}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. pow263.1%

        \[\leadsto \frac{2}{\frac{\frac{t}{1} \cdot \frac{\color{blue}{{t}^{2}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    6. Applied egg-rr63.1%

      \[\leadsto \frac{2}{\frac{\color{blue}{\frac{t}{1} \cdot \frac{{t}^{2}}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.4 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{t \cdot \frac{{t}^{2}}{\ell}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 63.3% 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 2.4 \cdot 10^{-28}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}\\ \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.4e-28)
    (* 2.0 (* (/ l (pow k 4.0)) (/ l t_m)))
    (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* (pow t_m 2.0) (/ t_m 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 <= 2.4e-28) {
		tmp = 2.0 * ((l / pow(k, 4.0)) * (l / t_m));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 2.0) * (t_m / 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 <= 2.4d-28) then
        tmp = 2.0d0 * ((l / (k ** 4.0d0)) * (l / t_m))
    else
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 2.0d0) * (t_m / 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 <= 2.4e-28) {
		tmp = 2.0 * ((l / Math.pow(k, 4.0)) * (l / t_m));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 2.0) * (t_m / 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 <= 2.4e-28:
		tmp = 2.0 * ((l / math.pow(k, 4.0)) * (l / t_m))
	else:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 2.0) * (t_m / 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 <= 2.4e-28)
		tmp = Float64(2.0 * Float64(Float64(l / (k ^ 4.0)) * Float64(l / t_m)));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 2.0) * Float64(t_m / 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 <= 2.4e-28)
		tmp = 2.0 * ((l / (k ^ 4.0)) * (l / t_m));
	else
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 2.0) * (t_m / 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, 2.4e-28], N[(2.0 * N[(N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $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.4 \cdot 10^{-28}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.4000000000000002e-28

    1. Initial program 55.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. Simplified55.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. Taylor expanded in t around 0 67.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. times-frac68.6%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
    6. Simplified68.6%

      \[\leadsto \color{blue}{2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
    7. Taylor expanded in k around 0 61.0%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    8. Step-by-step derivation
      1. unpow261.0%

        \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
    9. Applied egg-rr61.0%

      \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
    10. Step-by-step derivation
      1. times-frac66.2%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]
    11. Applied egg-rr66.2%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]

    if 2.4000000000000002e-28 < t

    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. Simplified65.1%

      \[\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 63.0%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. unpow363.0%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. *-un-lft-identity63.0%

        \[\leadsto \frac{2}{\frac{\frac{\left(t \cdot t\right) \cdot t}{\color{blue}{1 \cdot \ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. times-frac63.1%

        \[\leadsto \frac{2}{\frac{\color{blue}{\frac{t \cdot t}{1} \cdot \frac{t}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. pow263.1%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{t}^{2}}}{1} \cdot \frac{t}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    6. Applied egg-rr63.1%

      \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{t}^{2}}{1} \cdot \frac{t}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.4 \cdot 10^{-28}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t}^{2} \cdot \frac{t}{\ell}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 62.5% 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 5.5 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{3}}{\ell}}\\ \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 5.5e-29)
    (* 2.0 (* (/ l (pow k 4.0)) (/ l t_m)))
    (* l (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (pow t_m 3.0) 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 <= 5.5e-29) {
		tmp = 2.0 * ((l / pow(k, 4.0)) * (l / t_m));
	} else {
		tmp = l * (2.0 / ((2.0 * pow(k, 2.0)) * (pow(t_m, 3.0) / 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 <= 5.5d-29) then
        tmp = 2.0d0 * ((l / (k ** 4.0d0)) * (l / t_m))
    else
        tmp = l * (2.0d0 / ((2.0d0 * (k ** 2.0d0)) * ((t_m ** 3.0d0) / 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 <= 5.5e-29) {
		tmp = 2.0 * ((l / Math.pow(k, 4.0)) * (l / t_m));
	} else {
		tmp = l * (2.0 / ((2.0 * Math.pow(k, 2.0)) * (Math.pow(t_m, 3.0) / 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 <= 5.5e-29:
		tmp = 2.0 * ((l / math.pow(k, 4.0)) * (l / t_m))
	else:
		tmp = l * (2.0 / ((2.0 * math.pow(k, 2.0)) * (math.pow(t_m, 3.0) / 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 <= 5.5e-29)
		tmp = Float64(2.0 * Float64(Float64(l / (k ^ 4.0)) * Float64(l / t_m)));
	else
		tmp = Float64(l * Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64((t_m ^ 3.0) / 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 <= 5.5e-29)
		tmp = 2.0 * ((l / (k ^ 4.0)) * (l / t_m));
	else
		tmp = l * (2.0 / ((2.0 * (k ^ 2.0)) * ((t_m ^ 3.0) / 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, 5.5e-29], N[(2.0 * N[(N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-29}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\\

\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{3}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 5.4999999999999999e-29

    1. Initial program 55.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. Simplified55.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. Taylor expanded in t around 0 67.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. times-frac68.6%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
    6. Simplified68.6%

      \[\leadsto \color{blue}{2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
    7. Taylor expanded in k around 0 61.0%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    8. Step-by-step derivation
      1. unpow261.0%

        \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
    9. Applied egg-rr61.0%

      \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
    10. Step-by-step derivation
      1. times-frac66.2%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]
    11. Applied egg-rr66.2%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]

    if 5.4999999999999999e-29 < t

    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. Simplified65.1%

      \[\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 63.0%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. sqr-pow62.9%

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)} \cdot {t}^{\left(\frac{3}{2}\right)}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. *-un-lft-identity62.9%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{\left(\frac{3}{2}\right)} \cdot {t}^{\left(\frac{3}{2}\right)}}{\color{blue}{1 \cdot \ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. times-frac63.1%

        \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{t}^{\left(\frac{3}{2}\right)}}{1} \cdot \frac{{t}^{\left(\frac{3}{2}\right)}}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. metadata-eval63.1%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{\color{blue}{1.5}}}{1} \cdot \frac{{t}^{\left(\frac{3}{2}\right)}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      5. metadata-eval63.1%

        \[\leadsto \frac{2}{\frac{\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{\color{blue}{1.5}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    6. Applied egg-rr63.1%

      \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{1.5}}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    7. Step-by-step derivation
      1. div-inv63.1%

        \[\leadsto \color{blue}{2 \cdot \frac{1}{\frac{\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{1.5}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}} \]
      2. associate-*l/63.1%

        \[\leadsto 2 \cdot \frac{1}{\color{blue}{\frac{\left(\frac{{t}^{1.5}}{1} \cdot \frac{{t}^{1.5}}{\ell}\right) \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
      3. frac-times62.9%

        \[\leadsto 2 \cdot \frac{1}{\frac{\color{blue}{\frac{{t}^{1.5} \cdot {t}^{1.5}}{1 \cdot \ell}} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}} \]
      4. *-un-lft-identity62.9%

        \[\leadsto 2 \cdot \frac{1}{\frac{\frac{{t}^{1.5} \cdot {t}^{1.5}}{\color{blue}{\ell}} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}} \]
      5. pow-prod-up63.0%

        \[\leadsto 2 \cdot \frac{1}{\frac{\frac{\color{blue}{{t}^{\left(1.5 + 1.5\right)}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}} \]
      6. metadata-eval63.0%

        \[\leadsto 2 \cdot \frac{1}{\frac{\frac{{t}^{\color{blue}{3}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}} \]
    8. Applied egg-rr63.0%

      \[\leadsto \color{blue}{2 \cdot \frac{1}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    9. Step-by-step derivation
      1. associate-*r/63.0%

        \[\leadsto \color{blue}{\frac{2 \cdot 1}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
      2. metadata-eval63.0%

        \[\leadsto \frac{\color{blue}{2}}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}} \]
      3. associate-/r/63.0%

        \[\leadsto \color{blue}{\frac{2}{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \cdot \ell} \]
    10. Simplified63.0%

      \[\leadsto \color{blue}{\frac{2}{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \cdot \ell} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.5 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t}^{3}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 62.5% 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 3.5 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{3}}{\ell}}{\ell}}\\ \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 3.5e-29)
    (* 2.0 (* (/ l (pow k 4.0)) (/ l t_m)))
    (/ 2.0 (/ (* (* 2.0 (pow k 2.0)) (/ (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 <= 3.5e-29) {
		tmp = 2.0 * ((l / pow(k, 4.0)) * (l / t_m));
	} else {
		tmp = 2.0 / (((2.0 * pow(k, 2.0)) * (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 <= 3.5d-29) then
        tmp = 2.0d0 * ((l / (k ** 4.0d0)) * (l / t_m))
    else
        tmp = 2.0d0 / (((2.0d0 * (k ** 2.0d0)) * ((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 <= 3.5e-29) {
		tmp = 2.0 * ((l / Math.pow(k, 4.0)) * (l / t_m));
	} else {
		tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) * (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 <= 3.5e-29:
		tmp = 2.0 * ((l / math.pow(k, 4.0)) * (l / t_m))
	else:
		tmp = 2.0 / (((2.0 * math.pow(k, 2.0)) * (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 <= 3.5e-29)
		tmp = Float64(2.0 * Float64(Float64(l / (k ^ 4.0)) * Float64(l / t_m)));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) * Float64((t_m ^ 3.0) / 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 <= 3.5e-29)
		tmp = 2.0 * ((l / (k ^ 4.0)) * (l / t_m));
	else
		tmp = 2.0 / (((2.0 * (k ^ 2.0)) * ((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, 3.5e-29], N[(2.0 * N[(N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.5 \cdot 10^{-29}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{3}}{\ell}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.4999999999999997e-29

    1. Initial program 55.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. Simplified55.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. Taylor expanded in t around 0 67.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. times-frac68.6%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
    6. Simplified68.6%

      \[\leadsto \color{blue}{2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
    7. Taylor expanded in k around 0 61.0%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    8. Step-by-step derivation
      1. unpow261.0%

        \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
    9. Applied egg-rr61.0%

      \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
    10. Step-by-step derivation
      1. times-frac66.2%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]
    11. Applied egg-rr66.2%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]

    if 3.4999999999999997e-29 < t

    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. Simplified65.1%

      \[\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 63.0%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. associate-*l/63.0%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    6. Applied egg-rr63.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.5 \cdot 10^{-29}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t}^{3}}{\ell}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 55.3% accurate, 3.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \left(\ell \cdot \frac{\ell}{t\_m \cdot {k}^{4}}\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 (* l (/ l (* t_m (pow k 4.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (l * (l / (t_m * pow(k, 4.0)))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * (l * (l / (t_m * (k ** 4.0d0)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (l * (l / (t_m * Math.pow(k, 4.0)))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 * (l * (l / (t_m * math.pow(k, 4.0)))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 * Float64(l * Float64(l / Float64(t_m * (k ^ 4.0))))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * (l * (l / (t_m * (k ^ 4.0)))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(l * N[(l / N[(t$95$m * N[Power[k, 4.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 \left(2 \cdot \left(\ell \cdot \frac{\ell}{t\_m \cdot {k}^{4}}\right)\right)
\end{array}
Derivation
  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. Simplified56.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. Taylor expanded in t around 0 62.5%

    \[\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. times-frac63.5%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
  6. Simplified63.5%

    \[\leadsto \color{blue}{2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
  7. Taylor expanded in k around 0 56.2%

    \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  8. Step-by-step derivation
    1. unpow256.2%

      \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
  9. Applied egg-rr56.2%

    \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
  10. Step-by-step derivation
    1. associate-/l*60.1%

      \[\leadsto 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right)} \]
    2. *-commutative60.1%

      \[\leadsto 2 \cdot \left(\ell \cdot \frac{\ell}{\color{blue}{t \cdot {k}^{4}}}\right) \]
  11. Applied egg-rr60.1%

    \[\leadsto 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{t \cdot {k}^{4}}\right)} \]
  12. Final simplification60.1%

    \[\leadsto 2 \cdot \left(\ell \cdot \frac{\ell}{t \cdot {k}^{4}}\right) \]
  13. Add Preprocessing

Alternative 23: 56.2% accurate, 3.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\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 (* (/ l (pow k 4.0)) (/ l t_m)))))
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 * ((l / pow(k, 4.0)) * (l / t_m)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * ((l / (k ** 4.0d0)) * (l / t_m)))
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 * ((l / Math.pow(k, 4.0)) * (l / t_m)));
}
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 * ((l / math.pow(k, 4.0)) * (l / t_m)))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 * Float64(Float64(l / (k ^ 4.0)) * Float64(l / t_m))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * ((l / (k ^ 4.0)) * (l / t_m)));
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[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t\_m}\right)\right)
\end{array}
Derivation
  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. Simplified56.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. Taylor expanded in t around 0 62.5%

    \[\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. times-frac63.5%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
  6. Simplified63.5%

    \[\leadsto \color{blue}{2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)} \]
  7. Taylor expanded in k around 0 56.2%

    \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  8. Step-by-step derivation
    1. unpow256.2%

      \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
  9. Applied egg-rr56.2%

    \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
  10. Step-by-step derivation
    1. times-frac61.0%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]
  11. Applied egg-rr61.0%

    \[\leadsto 2 \cdot \color{blue}{\left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)} \]
  12. Final simplification61.0%

    \[\leadsto 2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right) \]
  13. Add Preprocessing

Reproduce

?
herbie shell --seed 2024072 
(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))))