Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.6% → 89.4%
Time: 20.8s
Alternatives: 18
Speedup: 35.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 35.6% 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: 89.4% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_2 := \frac{\sqrt{2}}{k\_m}\\
t_3 := \sin k\_m \cdot \tan k\_m\\
t_4 := \sqrt[3]{t\_3}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 520000:\\
\;\;\;\;{\left(\left(\frac{\ell}{k\_m} \cdot \frac{\sqrt{2}}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\

\mathbf{elif}\;k\_m \leq 1.9 \cdot 10^{+105}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(k\_m \cdot k\_m\right)\right) \cdot t\_3} \cdot \left(\ell \cdot \ell\right)\\

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


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

    1. Initial program 36.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. Simplified44.6%

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

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

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

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

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

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

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

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

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

    if 5.2e5 < k < 1.9e105

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod32.7%

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left({\left(\frac{k}{t}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    6. Taylor expanded in k around inf 87.2%

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

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

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

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

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

    if 1.9e105 < k

    1. Initial program 41.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. Step-by-step derivation
      1. *-commutative41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 86.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_2 := \sin k\_m \cdot \tan k\_m\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 520000:\\
\;\;\;\;{\left(\left(\frac{\ell}{k\_m} \cdot \frac{\sqrt{2}}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\

\mathbf{elif}\;k\_m \leq 2.5 \cdot 10^{+106}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(k\_m \cdot k\_m\right)\right) \cdot t\_2} \cdot \left(\ell \cdot \ell\right)\\

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


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

    1. Initial program 36.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. Simplified44.6%

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

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

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

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

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

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

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

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

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

    if 5.2e5 < k < 2.4999999999999999e106

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod32.7%

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left({\left(\frac{k}{t}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    6. Taylor expanded in k around inf 87.2%

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

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

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

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

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

    if 2.4999999999999999e106 < k

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod41.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 87.1% accurate, 0.5× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 520000:\\
\;\;\;\;{\left(\left(\frac{\ell}{k\_m} \cdot \frac{\sqrt{2}}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\

\mathbf{elif}\;k\_m \leq 5.8 \cdot 10^{+141}:\\
\;\;\;\;\frac{{\ell}^{2}}{{k\_m}^{2}} \cdot \left(\frac{2}{t\_m} \cdot \frac{\cos k\_m}{{\sin k\_m}^{2}}\right)\\

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


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

    1. Initial program 36.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. Simplified44.6%

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

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

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

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

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

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

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

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

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

    if 5.2e5 < k < 5.80000000000000013e141

    1. Initial program 18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.80000000000000013e141 < k

    1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 84.5% accurate, 0.8× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 500000:\\
\;\;\;\;{\left(\left(\frac{\ell}{k\_m} \cdot \frac{\sqrt{2}}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\

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


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

    1. Initial program 36.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. Simplified44.6%

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

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

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

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

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

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

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

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

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

    if 5e5 < k

    1. Initial program 33.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. Step-by-step derivation
      1. *-commutative33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 84.6% accurate, 0.8× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 520000:\\
\;\;\;\;{\left(\left(\frac{\ell}{k\_m} \cdot \frac{\sqrt{2}}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\

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


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

    1. Initial program 36.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. Simplified44.6%

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

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

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

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

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

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

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

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

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

    if 5.2e5 < k

    1. Initial program 33.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. Step-by-step derivation
      1. *-commutative33.1%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(\frac{\sqrt{2}}{k} \cdot \frac{t}{{\left(\sqrt[3]{\sin k \cdot \tan k} \cdot \left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{2}}\right) \cdot \left(\frac{\frac{\sqrt{2} \cdot t}{k}}{t} \cdot {\left(\sqrt[3]{\ell}\right)}^{2}\right)}{\sqrt[3]{\sin k \cdot \tan k}}} \]
    11. Taylor expanded in k around inf 72.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 84.6% accurate, 0.8× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 520000:\\ \;\;\;\;{\left(\left(\frac{\ell}{k\_m} \cdot \frac{\sqrt{2}}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{{k\_m}^{2} \cdot \left(\sin k\_m \cdot \left(t\_m \cdot \tan k\_m\right)\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 520000.0)
    (pow
     (* (* (/ l k_m) (/ (sqrt 2.0) (sin k_m))) (sqrt (/ (cos k_m) t_m)))
     2.0)
    (* (* l l) (/ 2.0 (* (pow k_m 2.0) (* (sin k_m) (* t_m (tan k_m)))))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 520000.0) {
		tmp = pow((((l / k_m) * (sqrt(2.0) / sin(k_m))) * sqrt((cos(k_m) / t_m))), 2.0);
	} else {
		tmp = (l * l) * (2.0 / (pow(k_m, 2.0) * (sin(k_m) * (t_m * tan(k_m)))));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 520000.0d0) then
        tmp = (((l / k_m) * (sqrt(2.0d0) / sin(k_m))) * sqrt((cos(k_m) / t_m))) ** 2.0d0
    else
        tmp = (l * l) * (2.0d0 / ((k_m ** 2.0d0) * (sin(k_m) * (t_m * tan(k_m)))))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 520000.0) {
		tmp = Math.pow((((l / k_m) * (Math.sqrt(2.0) / Math.sin(k_m))) * Math.sqrt((Math.cos(k_m) / t_m))), 2.0);
	} else {
		tmp = (l * l) * (2.0 / (Math.pow(k_m, 2.0) * (Math.sin(k_m) * (t_m * Math.tan(k_m)))));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 520000.0:
		tmp = math.pow((((l / k_m) * (math.sqrt(2.0) / math.sin(k_m))) * math.sqrt((math.cos(k_m) / t_m))), 2.0)
	else:
		tmp = (l * l) * (2.0 / (math.pow(k_m, 2.0) * (math.sin(k_m) * (t_m * math.tan(k_m)))))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 520000.0)
		tmp = Float64(Float64(Float64(l / k_m) * Float64(sqrt(2.0) / sin(k_m))) * sqrt(Float64(cos(k_m) / t_m))) ^ 2.0;
	else
		tmp = Float64(Float64(l * l) * Float64(2.0 / Float64((k_m ^ 2.0) * Float64(sin(k_m) * Float64(t_m * tan(k_m))))));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 520000.0)
		tmp = (((l / k_m) * (sqrt(2.0) / sin(k_m))) * sqrt((cos(k_m) / t_m))) ^ 2.0;
	else
		tmp = (l * l) * (2.0 / ((k_m ^ 2.0) * (sin(k_m) * (t_m * tan(k_m)))));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 520000.0], N[Power[N[(N[(N[(l / k$95$m), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k$95$m], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * N[(t$95$m * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 520000:\\
\;\;\;\;{\left(\left(\frac{\ell}{k\_m} \cdot \frac{\sqrt{2}}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\

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


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

    1. Initial program 36.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. Simplified44.6%

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

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

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

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

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

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

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

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

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

    if 5.2e5 < k

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod39.6%

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left({\left(\frac{k}{t}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    6. Taylor expanded in k around inf 72.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 83.5% accurate, 0.8× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 500000:\\ \;\;\;\;{\left(\ell \cdot \left(\frac{\sqrt{2}}{k\_m} \cdot \frac{\sqrt{\frac{\cos k\_m}{t\_m}}}{\sin k\_m}\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{{k\_m}^{2} \cdot \left(\sin k\_m \cdot \left(t\_m \cdot \tan k\_m\right)\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 500000.0)
    (pow
     (* l (* (/ (sqrt 2.0) k_m) (/ (sqrt (/ (cos k_m) t_m)) (sin k_m))))
     2.0)
    (* (* l l) (/ 2.0 (* (pow k_m 2.0) (* (sin k_m) (* t_m (tan k_m)))))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 500000.0) {
		tmp = pow((l * ((sqrt(2.0) / k_m) * (sqrt((cos(k_m) / t_m)) / sin(k_m)))), 2.0);
	} else {
		tmp = (l * l) * (2.0 / (pow(k_m, 2.0) * (sin(k_m) * (t_m * tan(k_m)))));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 500000.0d0) then
        tmp = (l * ((sqrt(2.0d0) / k_m) * (sqrt((cos(k_m) / t_m)) / sin(k_m)))) ** 2.0d0
    else
        tmp = (l * l) * (2.0d0 / ((k_m ** 2.0d0) * (sin(k_m) * (t_m * tan(k_m)))))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 500000.0) {
		tmp = Math.pow((l * ((Math.sqrt(2.0) / k_m) * (Math.sqrt((Math.cos(k_m) / t_m)) / Math.sin(k_m)))), 2.0);
	} else {
		tmp = (l * l) * (2.0 / (Math.pow(k_m, 2.0) * (Math.sin(k_m) * (t_m * Math.tan(k_m)))));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 500000.0:
		tmp = math.pow((l * ((math.sqrt(2.0) / k_m) * (math.sqrt((math.cos(k_m) / t_m)) / math.sin(k_m)))), 2.0)
	else:
		tmp = (l * l) * (2.0 / (math.pow(k_m, 2.0) * (math.sin(k_m) * (t_m * math.tan(k_m)))))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 500000.0)
		tmp = Float64(l * Float64(Float64(sqrt(2.0) / k_m) * Float64(sqrt(Float64(cos(k_m) / t_m)) / sin(k_m)))) ^ 2.0;
	else
		tmp = Float64(Float64(l * l) * Float64(2.0 / Float64((k_m ^ 2.0) * Float64(sin(k_m) * Float64(t_m * tan(k_m))))));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 500000.0)
		tmp = (l * ((sqrt(2.0) / k_m) * (sqrt((cos(k_m) / t_m)) / sin(k_m)))) ^ 2.0;
	else
		tmp = (l * l) * (2.0 / ((k_m ^ 2.0) * (sin(k_m) * (t_m * tan(k_m)))));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 500000.0], N[Power[N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision] * N[(N[Sqrt[N[(N[Cos[k$95$m], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision] / N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * N[(t$95$m * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 500000:\\
\;\;\;\;{\left(\ell \cdot \left(\frac{\sqrt{2}}{k\_m} \cdot \frac{\sqrt{\frac{\cos k\_m}{t\_m}}}{\sin k\_m}\right)\right)}^{2}\\

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


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

    1. Initial program 36.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. Simplified44.6%

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\ell \cdot \frac{\sqrt{2}}{\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{k}{t} \cdot {t}^{1.5}\right)}\right)}^{2}} \]
    8. Taylor expanded in k around inf 49.4%

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

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

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

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

    if 5e5 < k

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod39.6%

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left({\left(\frac{k}{t}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    6. Taylor expanded in k around inf 72.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 83.4% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

    if 1.70000000000000007e-10 < k

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod38.8%

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left({\left(\frac{k}{t}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    6. Taylor expanded in k around inf 73.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 82.8% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

    if 2.59999999999999981e-10 < k

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

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod38.8%

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left({\left(\frac{k}{t}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    6. Taylor expanded in k around inf 73.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 74.0% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{{k\_m}^{2} \cdot \left(\sin k\_m \cdot \left(t\_m \cdot \tan k\_m\right)\right)}\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* (* l l) (/ 2.0 (* (pow k_m 2.0) (* (sin k_m) (* t_m (tan k_m))))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * (2.0 / (pow(k_m, 2.0) * (sin(k_m) * (t_m * tan(k_m))))));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * ((l * l) * (2.0d0 / ((k_m ** 2.0d0) * (sin(k_m) * (t_m * tan(k_m))))))
end function
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * (2.0 / (Math.pow(k_m, 2.0) * (Math.sin(k_m) * (t_m * Math.tan(k_m))))));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * ((l * l) * (2.0 / (math.pow(k_m, 2.0) * (math.sin(k_m) * (t_m * math.tan(k_m))))))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 / Float64((k_m ^ 2.0) * Float64(sin(k_m) * Float64(t_m * tan(k_m)))))))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * ((l * l) * (2.0 / ((k_m ^ 2.0) * (sin(k_m) * (t_m * tan(k_m))))));
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * N[(t$95$m * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{{k\_m}^{2} \cdot \left(\sin k\_m \cdot \left(t\_m \cdot \tan k\_m\right)\right)}\right)
\end{array}
Derivation
  1. Initial program 36.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. Simplified43.8%

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

      \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    2. exp-prod33.9%

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

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

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

    \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left({\left(\frac{k}{t}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
  6. Taylor expanded in k around inf 74.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(\sin k \cdot \left(\tan k \cdot t\right)\right)}} \cdot \left(\ell \cdot \ell\right) \]
  13. Final simplification74.5%

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

Alternative 11: 74.0% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{{k\_m}^{2} \cdot \left(t\_m \cdot \left(\sin k\_m \cdot \tan k\_m\right)\right)}\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* (* l l) (/ 2.0 (* (pow k_m 2.0) (* t_m (* (sin k_m) (tan k_m))))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * (2.0 / (pow(k_m, 2.0) * (t_m * (sin(k_m) * tan(k_m))))));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * ((l * l) * (2.0d0 / ((k_m ** 2.0d0) * (t_m * (sin(k_m) * tan(k_m))))))
end function
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * (2.0 / (Math.pow(k_m, 2.0) * (t_m * (Math.sin(k_m) * Math.tan(k_m))))));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * ((l * l) * (2.0 / (math.pow(k_m, 2.0) * (t_m * (math.sin(k_m) * math.tan(k_m))))))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 / Float64((k_m ^ 2.0) * Float64(t_m * Float64(sin(k_m) * tan(k_m)))))))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * ((l * l) * (2.0 / ((k_m ^ 2.0) * (t_m * (sin(k_m) * tan(k_m))))));
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{{k\_m}^{2} \cdot \left(t\_m \cdot \left(\sin k\_m \cdot \tan k\_m\right)\right)}\right)
\end{array}
Derivation
  1. Initial program 36.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. Simplified43.8%

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

      \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    2. exp-prod33.9%

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

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

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

    \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left({\left(\frac{k}{t}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
  6. Taylor expanded in k around inf 74.5%

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

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

Alternative 12: 63.9% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{+296}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k\_m}^{4}}}{t\_m}\\

\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{4}{0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 l l) < 9.99999999999999981e295

    1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999981e295 < (*.f64 l l)

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\log \color{blue}{1}} \cdot \left(\ell \cdot \ell\right) \]
    7. Step-by-step derivation
      1. div-inv30.4%

        \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{\log 1}\right)} \cdot \left(\ell \cdot \ell\right) \]
      2. metadata-eval30.4%

        \[\leadsto \left(2 \cdot \frac{1}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
      3. metadata-eval30.4%

        \[\leadsto \left(2 \cdot \frac{1}{\color{blue}{\frac{0}{2}}}\right) \cdot \left(\ell \cdot \ell\right) \]
      4. metadata-eval30.4%

        \[\leadsto \left(2 \cdot \frac{1}{\frac{\color{blue}{\log 1}}{2}}\right) \cdot \left(\ell \cdot \ell\right) \]
      5. clear-num30.4%

        \[\leadsto \left(2 \cdot \color{blue}{\frac{2}{\log 1}}\right) \cdot \left(\ell \cdot \ell\right) \]
      6. metadata-eval30.4%

        \[\leadsto \left(2 \cdot \frac{2}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    8. Applied egg-rr30.4%

      \[\leadsto \color{blue}{\left(2 \cdot \frac{2}{0}\right)} \cdot \left(\ell \cdot \ell\right) \]
    9. Step-by-step derivation
      1. associate-*r/30.4%

        \[\leadsto \color{blue}{\frac{2 \cdot 2}{0}} \cdot \left(\ell \cdot \ell\right) \]
      2. metadata-eval30.4%

        \[\leadsto \frac{\color{blue}{4}}{0} \cdot \left(\ell \cdot \ell\right) \]
    10. Simplified30.4%

      \[\leadsto \color{blue}{\frac{4}{0}} \cdot \left(\ell \cdot \ell\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.7%

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

Alternative 13: 74.0% accurate, 2.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\frac{2}{\left(t\_m \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \left(\sin k\_m \cdot \tan k\_m\right)} \cdot \left(\ell \cdot \ell\right)\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* (/ 2.0 (* (* t_m (* k_m k_m)) (* (sin k_m) (tan k_m)))) (* l l))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((2.0 / ((t_m * (k_m * k_m)) * (sin(k_m) * tan(k_m)))) * (l * l));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * ((2.0d0 / ((t_m * (k_m * k_m)) * (sin(k_m) * tan(k_m)))) * (l * l))
end function
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((2.0 / ((t_m * (k_m * k_m)) * (Math.sin(k_m) * Math.tan(k_m)))) * (l * l));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * ((2.0 / ((t_m * (k_m * k_m)) * (math.sin(k_m) * math.tan(k_m)))) * (l * l))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(Float64(2.0 / Float64(Float64(t_m * Float64(k_m * k_m)) * Float64(sin(k_m) * tan(k_m)))) * Float64(l * l)))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * ((2.0 / ((t_m * (k_m * k_m)) * (sin(k_m) * tan(k_m)))) * (l * l));
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(N[(2.0 / N[(N[(t$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\frac{2}{\left(t\_m \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \left(\sin k\_m \cdot \tan k\_m\right)} \cdot \left(\ell \cdot \ell\right)\right)
\end{array}
Derivation
  1. Initial program 36.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. Simplified43.8%

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

      \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    2. exp-prod33.9%

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

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

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

    \[\leadsto \frac{2}{\color{blue}{\log \left({\left(e^{{t}^{3}}\right)}^{\left({\left(\frac{k}{t}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
  6. Taylor expanded in k around inf 74.5%

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

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

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

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

    \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot t\right) \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \ell\right) \]
  11. Final simplification74.5%

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

Alternative 14: 64.0% accurate, 2.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{{k\_m}^{2} \cdot \left(t\_m \cdot {k\_m}^{2}\right)}\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* (* l l) (/ 2.0 (* (pow k_m 2.0) (* t_m (pow k_m 2.0)))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * (2.0 / (pow(k_m, 2.0) * (t_m * pow(k_m, 2.0)))));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * ((l * l) * (2.0d0 / ((k_m ** 2.0d0) * (t_m * (k_m ** 2.0d0)))))
end function
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * (2.0 / (Math.pow(k_m, 2.0) * (t_m * Math.pow(k_m, 2.0)))));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * ((l * l) * (2.0 / (math.pow(k_m, 2.0) * (t_m * math.pow(k_m, 2.0)))))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 / Float64((k_m ^ 2.0) * Float64(t_m * (k_m ^ 2.0))))))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * ((l * l) * (2.0 / ((k_m ^ 2.0) * (t_m * (k_m ^ 2.0)))));
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{{k\_m}^{2} \cdot \left(t\_m \cdot {k\_m}^{2}\right)}\right)
\end{array}
Derivation
  1. Initial program 36.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. Simplified43.8%

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

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

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

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

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

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

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

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

Alternative 15: 63.8% accurate, 2.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{t\_m \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (* (* l l) (/ 2.0 (* t_m (pow (* k_m (sin k_m)) 2.0))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * (2.0 / (t_m * pow((k_m * sin(k_m)), 2.0))));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * ((l * l) * (2.0d0 / (t_m * ((k_m * sin(k_m)) ** 2.0d0))))
end function
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * (2.0 / (t_m * Math.pow((k_m * Math.sin(k_m)), 2.0))));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * ((l * l) * (2.0 / (t_m * math.pow((k_m * math.sin(k_m)), 2.0))))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 / Float64(t_m * (Float64(k_m * sin(k_m)) ^ 2.0)))))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * ((l * l) * (2.0 / (t_m * ((k_m * sin(k_m)) ^ 2.0))));
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(t$95$m * N[Power[N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{t\_m \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}\right)
\end{array}
Derivation
  1. Initial program 36.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. Simplified43.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{{\left(k \cdot \sin k\right)}^{2} \cdot \frac{t}{\color{blue}{1}}} \cdot \left(\ell \cdot \ell\right) \]
  12. Final simplification67.0%

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

Alternative 16: 63.6% accurate, 3.6× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{+296}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{t\_m \cdot {k\_m}^{4}}\\

\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{4}{0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 l l) < 9.99999999999999981e295

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

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

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

    if 9.99999999999999981e295 < (*.f64 l l)

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\log \color{blue}{1}} \cdot \left(\ell \cdot \ell\right) \]
    7. Step-by-step derivation
      1. div-inv30.4%

        \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{\log 1}\right)} \cdot \left(\ell \cdot \ell\right) \]
      2. metadata-eval30.4%

        \[\leadsto \left(2 \cdot \frac{1}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
      3. metadata-eval30.4%

        \[\leadsto \left(2 \cdot \frac{1}{\color{blue}{\frac{0}{2}}}\right) \cdot \left(\ell \cdot \ell\right) \]
      4. metadata-eval30.4%

        \[\leadsto \left(2 \cdot \frac{1}{\frac{\color{blue}{\log 1}}{2}}\right) \cdot \left(\ell \cdot \ell\right) \]
      5. clear-num30.4%

        \[\leadsto \left(2 \cdot \color{blue}{\frac{2}{\log 1}}\right) \cdot \left(\ell \cdot \ell\right) \]
      6. metadata-eval30.4%

        \[\leadsto \left(2 \cdot \frac{2}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    8. Applied egg-rr30.4%

      \[\leadsto \color{blue}{\left(2 \cdot \frac{2}{0}\right)} \cdot \left(\ell \cdot \ell\right) \]
    9. Step-by-step derivation
      1. associate-*r/30.4%

        \[\leadsto \color{blue}{\frac{2 \cdot 2}{0}} \cdot \left(\ell \cdot \ell\right) \]
      2. metadata-eval30.4%

        \[\leadsto \frac{\color{blue}{4}}{0} \cdot \left(\ell \cdot \ell\right) \]
    10. Simplified30.4%

      \[\leadsto \color{blue}{\frac{4}{0}} \cdot \left(\ell \cdot \ell\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.5%

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

Alternative 17: 55.6% accurate, 35.0× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 1.96 \cdot 10^{+34}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{4}{0}\\

\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot 0\\


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

    1. Initial program 35.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. Simplified43.8%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod32.6%

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

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

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

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

      \[\leadsto \frac{2}{\log \color{blue}{1}} \cdot \left(\ell \cdot \ell\right) \]
    7. Step-by-step derivation
      1. div-inv26.1%

        \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{\log 1}\right)} \cdot \left(\ell \cdot \ell\right) \]
      2. metadata-eval26.1%

        \[\leadsto \left(2 \cdot \frac{1}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
      3. metadata-eval26.1%

        \[\leadsto \left(2 \cdot \frac{1}{\color{blue}{\frac{0}{2}}}\right) \cdot \left(\ell \cdot \ell\right) \]
      4. metadata-eval26.1%

        \[\leadsto \left(2 \cdot \frac{1}{\frac{\color{blue}{\log 1}}{2}}\right) \cdot \left(\ell \cdot \ell\right) \]
      5. clear-num26.1%

        \[\leadsto \left(2 \cdot \color{blue}{\frac{2}{\log 1}}\right) \cdot \left(\ell \cdot \ell\right) \]
      6. metadata-eval26.1%

        \[\leadsto \left(2 \cdot \frac{2}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    8. Applied egg-rr26.1%

      \[\leadsto \color{blue}{\left(2 \cdot \frac{2}{0}\right)} \cdot \left(\ell \cdot \ell\right) \]
    9. Step-by-step derivation
      1. associate-*r/26.1%

        \[\leadsto \color{blue}{\frac{2 \cdot 2}{0}} \cdot \left(\ell \cdot \ell\right) \]
      2. metadata-eval26.1%

        \[\leadsto \frac{\color{blue}{4}}{0} \cdot \left(\ell \cdot \ell\right) \]
    10. Simplified26.1%

      \[\leadsto \color{blue}{\frac{4}{0}} \cdot \left(\ell \cdot \ell\right) \]

    if 1.96000000000000005e34 < k

    1. Initial program 36.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. Simplified43.8%

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

        \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
      2. exp-prod38.7%

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

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

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

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

      \[\leadsto \frac{2}{\log \color{blue}{1}} \cdot \left(\ell \cdot \ell\right) \]
    7. Step-by-step derivation
      1. div-inv1.1%

        \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{\log 1}\right)} \cdot \left(\ell \cdot \ell\right) \]
      2. metadata-eval1.1%

        \[\leadsto \left(2 \cdot \frac{1}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
      3. metadata-eval1.1%

        \[\leadsto \left(2 \cdot \frac{1}{\color{blue}{\frac{0}{2}}}\right) \cdot \left(\ell \cdot \ell\right) \]
      4. metadata-eval1.1%

        \[\leadsto \left(2 \cdot \frac{1}{\frac{\color{blue}{\log 1}}{2}}\right) \cdot \left(\ell \cdot \ell\right) \]
      5. clear-num1.1%

        \[\leadsto \left(2 \cdot \color{blue}{\frac{2}{\log 1}}\right) \cdot \left(\ell \cdot \ell\right) \]
      6. metadata-eval1.1%

        \[\leadsto \left(2 \cdot \frac{2}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    8. Applied egg-rr1.1%

      \[\leadsto \color{blue}{\left(2 \cdot \frac{2}{0}\right)} \cdot \left(\ell \cdot \ell\right) \]
    9. Step-by-step derivation
      1. associate-*r/1.1%

        \[\leadsto \color{blue}{\frac{2 \cdot 2}{0}} \cdot \left(\ell \cdot \ell\right) \]
      2. metadata-eval1.1%

        \[\leadsto \frac{\color{blue}{4}}{0} \cdot \left(\ell \cdot \ell\right) \]
    10. Simplified1.1%

      \[\leadsto \color{blue}{\frac{4}{0}} \cdot \left(\ell \cdot \ell\right) \]
    11. Step-by-step derivation
      1. add-cube-cbrt1.1%

        \[\leadsto \color{blue}{\left(\left(\sqrt[3]{\frac{4}{0}} \cdot \sqrt[3]{\frac{4}{0}}\right) \cdot \sqrt[3]{\frac{4}{0}}\right)} \cdot \left(\ell \cdot \ell\right) \]
      2. pow21.1%

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

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

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

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

        \[\leadsto \left({\left(\frac{\color{blue}{1}}{\sqrt[3]{0}}\right)}^{2} \cdot \sqrt[3]{\frac{4}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
      7. clear-num1.1%

        \[\leadsto \left({\left(\frac{1}{\sqrt[3]{0}}\right)}^{2} \cdot \sqrt[3]{\color{blue}{\frac{1}{\frac{0}{4}}}}\right) \cdot \left(\ell \cdot \ell\right) \]
      8. metadata-eval1.1%

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

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

        \[\leadsto \left({\left(\frac{1}{\sqrt[3]{0}}\right)}^{2} \cdot \frac{\color{blue}{1}}{\sqrt[3]{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    12. Applied egg-rr1.1%

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

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

        \[\leadsto {\left(\frac{1}{\sqrt[3]{0}}\right)}^{\color{blue}{3}} \cdot \left(\ell \cdot \ell\right) \]
      3. cube-div1.1%

        \[\leadsto \color{blue}{\frac{{1}^{3}}{{\left(\sqrt[3]{0}\right)}^{3}}} \cdot \left(\ell \cdot \ell\right) \]
      4. metadata-eval1.1%

        \[\leadsto \frac{\color{blue}{1}}{{\left(\sqrt[3]{0}\right)}^{3}} \cdot \left(\ell \cdot \ell\right) \]
      5. rem-cube-cbrt1.1%

        \[\leadsto \frac{1}{\color{blue}{0}} \cdot \left(\ell \cdot \ell\right) \]
      6. unpow-11.1%

        \[\leadsto \color{blue}{{0}^{-1}} \cdot \left(\ell \cdot \ell\right) \]
      7. pow-base-060.4%

        \[\leadsto \color{blue}{0} \cdot \left(\ell \cdot \ell\right) \]
    14. Simplified60.4%

      \[\leadsto \color{blue}{0} \cdot \left(\ell \cdot \ell\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification33.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.96 \cdot 10^{+34}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{4}{0}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \ell\right) \cdot 0\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 26.8% accurate, 84.2× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot 0\right) \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m) :precision binary64 (* t_s (* (* l l) 0.0)))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * 0.0);
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * ((l * l) * 0.0d0)
end function
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * ((l * l) * 0.0);
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * ((l * l) * 0.0)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(Float64(l * l) * 0.0))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * ((l * l) * 0.0);
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * 0.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot 0\right)
\end{array}
Derivation
  1. Initial program 36.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. Simplified43.8%

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

      \[\leadsto \frac{2}{\color{blue}{\log \left(e^{{t}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot {\left(\frac{k}{t}\right)}^{2}\right)\right)}\right)}} \cdot \left(\ell \cdot \ell\right) \]
    2. exp-prod33.9%

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

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

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

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

    \[\leadsto \frac{2}{\log \color{blue}{1}} \cdot \left(\ell \cdot \ell\right) \]
  7. Step-by-step derivation
    1. div-inv20.7%

      \[\leadsto \color{blue}{\left(2 \cdot \frac{1}{\log 1}\right)} \cdot \left(\ell \cdot \ell\right) \]
    2. metadata-eval20.7%

      \[\leadsto \left(2 \cdot \frac{1}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    3. metadata-eval20.7%

      \[\leadsto \left(2 \cdot \frac{1}{\color{blue}{\frac{0}{2}}}\right) \cdot \left(\ell \cdot \ell\right) \]
    4. metadata-eval20.7%

      \[\leadsto \left(2 \cdot \frac{1}{\frac{\color{blue}{\log 1}}{2}}\right) \cdot \left(\ell \cdot \ell\right) \]
    5. clear-num20.7%

      \[\leadsto \left(2 \cdot \color{blue}{\frac{2}{\log 1}}\right) \cdot \left(\ell \cdot \ell\right) \]
    6. metadata-eval20.7%

      \[\leadsto \left(2 \cdot \frac{2}{\color{blue}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
  8. Applied egg-rr20.7%

    \[\leadsto \color{blue}{\left(2 \cdot \frac{2}{0}\right)} \cdot \left(\ell \cdot \ell\right) \]
  9. Step-by-step derivation
    1. associate-*r/20.7%

      \[\leadsto \color{blue}{\frac{2 \cdot 2}{0}} \cdot \left(\ell \cdot \ell\right) \]
    2. metadata-eval20.7%

      \[\leadsto \frac{\color{blue}{4}}{0} \cdot \left(\ell \cdot \ell\right) \]
  10. Simplified20.7%

    \[\leadsto \color{blue}{\frac{4}{0}} \cdot \left(\ell \cdot \ell\right) \]
  11. Step-by-step derivation
    1. add-cube-cbrt20.7%

      \[\leadsto \color{blue}{\left(\left(\sqrt[3]{\frac{4}{0}} \cdot \sqrt[3]{\frac{4}{0}}\right) \cdot \sqrt[3]{\frac{4}{0}}\right)} \cdot \left(\ell \cdot \ell\right) \]
    2. pow220.7%

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

      \[\leadsto \left({\left(\sqrt[3]{\color{blue}{\frac{1}{\frac{0}{4}}}}\right)}^{2} \cdot \sqrt[3]{\frac{4}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    4. metadata-eval20.7%

      \[\leadsto \left({\left(\sqrt[3]{\frac{1}{\color{blue}{0}}}\right)}^{2} \cdot \sqrt[3]{\frac{4}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    5. cbrt-div20.7%

      \[\leadsto \left({\color{blue}{\left(\frac{\sqrt[3]{1}}{\sqrt[3]{0}}\right)}}^{2} \cdot \sqrt[3]{\frac{4}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    6. metadata-eval20.7%

      \[\leadsto \left({\left(\frac{\color{blue}{1}}{\sqrt[3]{0}}\right)}^{2} \cdot \sqrt[3]{\frac{4}{0}}\right) \cdot \left(\ell \cdot \ell\right) \]
    7. clear-num20.7%

      \[\leadsto \left({\left(\frac{1}{\sqrt[3]{0}}\right)}^{2} \cdot \sqrt[3]{\color{blue}{\frac{1}{\frac{0}{4}}}}\right) \cdot \left(\ell \cdot \ell\right) \]
    8. metadata-eval20.7%

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

      \[\leadsto \left({\left(\frac{1}{\sqrt[3]{0}}\right)}^{2} \cdot \color{blue}{\frac{\sqrt[3]{1}}{\sqrt[3]{0}}}\right) \cdot \left(\ell \cdot \ell\right) \]
    10. metadata-eval20.7%

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

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

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

      \[\leadsto {\left(\frac{1}{\sqrt[3]{0}}\right)}^{\color{blue}{3}} \cdot \left(\ell \cdot \ell\right) \]
    3. cube-div20.7%

      \[\leadsto \color{blue}{\frac{{1}^{3}}{{\left(\sqrt[3]{0}\right)}^{3}}} \cdot \left(\ell \cdot \ell\right) \]
    4. metadata-eval20.7%

      \[\leadsto \frac{\color{blue}{1}}{{\left(\sqrt[3]{0}\right)}^{3}} \cdot \left(\ell \cdot \ell\right) \]
    5. rem-cube-cbrt20.7%

      \[\leadsto \frac{1}{\color{blue}{0}} \cdot \left(\ell \cdot \ell\right) \]
    6. unpow-120.7%

      \[\leadsto \color{blue}{{0}^{-1}} \cdot \left(\ell \cdot \ell\right) \]
    7. pow-base-026.8%

      \[\leadsto \color{blue}{0} \cdot \left(\ell \cdot \ell\right) \]
  14. Simplified26.8%

    \[\leadsto \color{blue}{0} \cdot \left(\ell \cdot \ell\right) \]
  15. Final simplification26.8%

    \[\leadsto \left(\ell \cdot \ell\right) \cdot 0 \]
  16. Add Preprocessing

Reproduce

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