Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.6% → 91.5%
Time: 18.6s
Alternatives: 13
Speedup: 3.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 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: 91.5% 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 := \sin k\_m \cdot \tan k\_m\\ t_3 := \frac{\sqrt{2}}{k\_m}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 3.2 \cdot 10^{-43}:\\ \;\;\;\;{\left(\left(t\_3 \cdot \frac{\ell}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\ \mathbf{elif}\;k\_m \leq 5.4 \cdot 10^{+142}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t\_m \cdot {\sin k\_m}^{2}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_3 \cdot t\_m}{{\left(\frac{t\_m \cdot \sqrt[3]{\frac{t\_2}{\ell}}}{\sqrt[3]{\ell}}\right)}^{2}} \cdot \frac{\frac{1}{k\_m \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{-2}}{\sqrt{2}}}}{\sqrt[3]{t\_2}}\\ \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_3 (/ (sqrt 2.0) k_m)))
   (*
    t_s
    (if (<= k_m 3.2e-43)
      (pow (* (* t_3 (/ l (sin k_m))) (sqrt (/ (cos k_m) t_m))) 2.0)
      (if (<= k_m 5.4e+142)
        (*
         l
         (*
          2.0
          (* (/ l (pow k_m 2.0)) (/ (cos k_m) (* t_m (pow (sin k_m) 2.0))))))
        (*
         (/ (* t_3 t_m) (pow (/ (* t_m (cbrt (/ t_2 l))) (cbrt l)) 2.0))
         (/
          (/ 1.0 (* k_m (/ (pow (cbrt l) -2.0) (sqrt 2.0))))
          (cbrt t_2))))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = sin(k_m) * tan(k_m);
	double t_3 = sqrt(2.0) / k_m;
	double tmp;
	if (k_m <= 3.2e-43) {
		tmp = pow(((t_3 * (l / sin(k_m))) * sqrt((cos(k_m) / t_m))), 2.0);
	} else if (k_m <= 5.4e+142) {
		tmp = l * (2.0 * ((l / pow(k_m, 2.0)) * (cos(k_m) / (t_m * pow(sin(k_m), 2.0)))));
	} else {
		tmp = ((t_3 * t_m) / pow(((t_m * cbrt((t_2 / l))) / cbrt(l)), 2.0)) * ((1.0 / (k_m * (pow(cbrt(l), -2.0) / sqrt(2.0)))) / cbrt(t_2));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = Math.sin(k_m) * Math.tan(k_m);
	double t_3 = Math.sqrt(2.0) / k_m;
	double tmp;
	if (k_m <= 3.2e-43) {
		tmp = Math.pow(((t_3 * (l / Math.sin(k_m))) * Math.sqrt((Math.cos(k_m) / t_m))), 2.0);
	} else if (k_m <= 5.4e+142) {
		tmp = l * (2.0 * ((l / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t_m * Math.pow(Math.sin(k_m), 2.0)))));
	} else {
		tmp = ((t_3 * t_m) / Math.pow(((t_m * Math.cbrt((t_2 / l))) / Math.cbrt(l)), 2.0)) * ((1.0 / (k_m * (Math.pow(Math.cbrt(l), -2.0) / Math.sqrt(2.0)))) / Math.cbrt(t_2));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = Float64(sin(k_m) * tan(k_m))
	t_3 = Float64(sqrt(2.0) / k_m)
	tmp = 0.0
	if (k_m <= 3.2e-43)
		tmp = Float64(Float64(t_3 * Float64(l / sin(k_m))) * sqrt(Float64(cos(k_m) / t_m))) ^ 2.0;
	elseif (k_m <= 5.4e+142)
		tmp = Float64(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t_m * (sin(k_m) ^ 2.0))))));
	else
		tmp = Float64(Float64(Float64(t_3 * t_m) / (Float64(Float64(t_m * cbrt(Float64(t_2 / l))) / cbrt(l)) ^ 2.0)) * Float64(Float64(1.0 / Float64(k_m * Float64((cbrt(l) ^ -2.0) / sqrt(2.0)))) / cbrt(t_2)));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := Block[{t$95$2 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 3.2e-43], N[Power[N[(N[(t$95$3 * N[(l / 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.4e+142], N[(l * N[(2.0 * N[(N[(l / 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], N[(N[(N[(t$95$3 * t$95$m), $MachinePrecision] / N[Power[N[(N[(t$95$m * N[Power[N[(t$95$2 / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / N[(k$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[t$95$2, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 3.19999999999999985e-43

    1. Initial program 34.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Step-by-step derivation
      1. *-commutative34.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*34.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. Simplified40.4%

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

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

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}} \]
    7. Step-by-step derivation
      1. unpow232.6%

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

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

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

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

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

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

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

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

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

    if 3.19999999999999985e-43 < k < 5.39999999999999965e142

    1. Initial program 26.5%

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

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

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

      \[\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. associate-*l/52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.39999999999999965e142 < k

    1. Initial program 46.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Step-by-step derivation
      1. *-commutative46.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*46.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. Simplified53.6%

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

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

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

        \[\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.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/74.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*74.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/74.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. Simplified74.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-cbrt-cube61.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\sqrt{2}}{k} \cdot t}{{\left(\frac{\color{blue}{t} \cdot \sqrt[3]{\frac{\sin k \cdot \tan k}{\ell}}}{\sqrt[3]{\ell}}\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}} \]
    10. Applied egg-rr74.7%

      \[\leadsto \frac{\frac{\sqrt{2}}{k} \cdot t}{{\color{blue}{\left(\frac{t \cdot \sqrt[3]{\frac{\sin k \cdot \tan k}{\ell}}}{\sqrt[3]{\ell}}\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}} \]
    11. Step-by-step derivation
      1. clear-num74.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.5% 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 := \sin k\_m \cdot \tan k\_m\\ t_3 := \frac{\sqrt{2}}{k\_m}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 3.1 \cdot 10^{-43}:\\ \;\;\;\;{\left(\left(t\_3 \cdot \frac{\ell}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\ \mathbf{elif}\;k\_m \leq 3.3 \cdot 10^{+142}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t\_m \cdot {\sin k\_m}^{2}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_3 \cdot t\_m}{{\left(\frac{t\_m \cdot \sqrt[3]{\frac{t\_2}{\ell}}}{\sqrt[3]{\ell}}\right)}^{2}} \cdot \frac{\frac{t\_3}{{\left(\sqrt[3]{\ell}\right)}^{-2}}}{\sqrt[3]{t\_2}}\\ \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_3 (/ (sqrt 2.0) k_m)))
   (*
    t_s
    (if (<= k_m 3.1e-43)
      (pow (* (* t_3 (/ l (sin k_m))) (sqrt (/ (cos k_m) t_m))) 2.0)
      (if (<= k_m 3.3e+142)
        (*
         l
         (*
          2.0
          (* (/ l (pow k_m 2.0)) (/ (cos k_m) (* t_m (pow (sin k_m) 2.0))))))
        (*
         (/ (* t_3 t_m) (pow (/ (* t_m (cbrt (/ t_2 l))) (cbrt l)) 2.0))
         (/ (/ t_3 (pow (cbrt l) -2.0)) (cbrt t_2))))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = sin(k_m) * tan(k_m);
	double t_3 = sqrt(2.0) / k_m;
	double tmp;
	if (k_m <= 3.1e-43) {
		tmp = pow(((t_3 * (l / sin(k_m))) * sqrt((cos(k_m) / t_m))), 2.0);
	} else if (k_m <= 3.3e+142) {
		tmp = l * (2.0 * ((l / pow(k_m, 2.0)) * (cos(k_m) / (t_m * pow(sin(k_m), 2.0)))));
	} else {
		tmp = ((t_3 * t_m) / pow(((t_m * cbrt((t_2 / l))) / cbrt(l)), 2.0)) * ((t_3 / pow(cbrt(l), -2.0)) / cbrt(t_2));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = Math.sin(k_m) * Math.tan(k_m);
	double t_3 = Math.sqrt(2.0) / k_m;
	double tmp;
	if (k_m <= 3.1e-43) {
		tmp = Math.pow(((t_3 * (l / Math.sin(k_m))) * Math.sqrt((Math.cos(k_m) / t_m))), 2.0);
	} else if (k_m <= 3.3e+142) {
		tmp = l * (2.0 * ((l / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t_m * Math.pow(Math.sin(k_m), 2.0)))));
	} else {
		tmp = ((t_3 * t_m) / Math.pow(((t_m * Math.cbrt((t_2 / l))) / Math.cbrt(l)), 2.0)) * ((t_3 / Math.pow(Math.cbrt(l), -2.0)) / Math.cbrt(t_2));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = Float64(sin(k_m) * tan(k_m))
	t_3 = Float64(sqrt(2.0) / k_m)
	tmp = 0.0
	if (k_m <= 3.1e-43)
		tmp = Float64(Float64(t_3 * Float64(l / sin(k_m))) * sqrt(Float64(cos(k_m) / t_m))) ^ 2.0;
	elseif (k_m <= 3.3e+142)
		tmp = Float64(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t_m * (sin(k_m) ^ 2.0))))));
	else
		tmp = Float64(Float64(Float64(t_3 * t_m) / (Float64(Float64(t_m * cbrt(Float64(t_2 / l))) / cbrt(l)) ^ 2.0)) * Float64(Float64(t_3 / (cbrt(l) ^ -2.0)) / cbrt(t_2)));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := Block[{t$95$2 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 3.1e-43], N[Power[N[(N[(t$95$3 * N[(l / 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, 3.3e+142], N[(l * N[(2.0 * N[(N[(l / 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], N[(N[(N[(t$95$3 * t$95$m), $MachinePrecision] / N[Power[N[(N[(t$95$m * N[Power[N[(t$95$2 / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$3 / N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[Power[t$95$2, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 3.0999999999999999e-43

    1. Initial program 34.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Step-by-step derivation
      1. *-commutative34.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*34.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. Simplified40.4%

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

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

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}} \]
    7. Step-by-step derivation
      1. unpow232.6%

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

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

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

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

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

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

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

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

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

    if 3.0999999999999999e-43 < k < 3.3000000000000002e142

    1. Initial program 26.5%

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

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

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

      \[\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. associate-*l/52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3000000000000002e142 < k

    1. Initial program 46.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Step-by-step derivation
      1. *-commutative46.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*46.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. Simplified53.6%

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

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

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

        \[\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.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/74.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*74.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/74.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. Simplified74.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-cbrt-cube61.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\sqrt{2}}{k} \cdot t}{{\left(\frac{\color{blue}{t} \cdot \sqrt[3]{\frac{\sin k \cdot \tan k}{\ell}}}{\sqrt[3]{\ell}}\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}} \]
    10. Applied egg-rr74.7%

      \[\leadsto \frac{\frac{\sqrt{2}}{k} \cdot t}{{\color{blue}{\left(\frac{t \cdot \sqrt[3]{\frac{\sin k \cdot \tan k}{\ell}}}{\sqrt[3]{\ell}}\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}} \]
    11. Step-by-step derivation
      1. associate-/l*74.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 91.5% 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 3.2 \cdot 10^{-43}:\\ \;\;\;\;{\left(\left(\frac{\sqrt{2}}{k\_m} \cdot \frac{\ell}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\ \mathbf{elif}\;k\_m \leq 5 \cdot 10^{+151}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t\_m \cdot {\sin k\_m}^{2}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}}{t\_m \cdot \sqrt[3]{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {\left(\frac{k\_m}{t\_m}\right)}^{2}}}\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 3.2e-43)
    (pow
     (* (* (/ (sqrt 2.0) k_m) (/ l (sin k_m))) (sqrt (/ (cos k_m) t_m)))
     2.0)
    (if (<= k_m 5e+151)
      (*
       l
       (*
        2.0
        (* (/ l (pow k_m 2.0)) (/ (cos k_m) (* t_m (pow (sin k_m) 2.0))))))
      (pow
       (/
        (* (pow (cbrt l) 2.0) (cbrt 2.0))
        (* t_m (cbrt (* (* (sin k_m) (tan k_m)) (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 tmp;
	if (k_m <= 3.2e-43) {
		tmp = pow((((sqrt(2.0) / k_m) * (l / sin(k_m))) * sqrt((cos(k_m) / t_m))), 2.0);
	} else if (k_m <= 5e+151) {
		tmp = l * (2.0 * ((l / pow(k_m, 2.0)) * (cos(k_m) / (t_m * pow(sin(k_m), 2.0)))));
	} else {
		tmp = pow(((pow(cbrt(l), 2.0) * cbrt(2.0)) / (t_m * cbrt(((sin(k_m) * tan(k_m)) * 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 tmp;
	if (k_m <= 3.2e-43) {
		tmp = Math.pow((((Math.sqrt(2.0) / k_m) * (l / Math.sin(k_m))) * Math.sqrt((Math.cos(k_m) / t_m))), 2.0);
	} else if (k_m <= 5e+151) {
		tmp = l * (2.0 * ((l / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t_m * Math.pow(Math.sin(k_m), 2.0)))));
	} else {
		tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(2.0)) / (t_m * Math.cbrt(((Math.sin(k_m) * Math.tan(k_m)) * 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)
	tmp = 0.0
	if (k_m <= 3.2e-43)
		tmp = Float64(Float64(Float64(sqrt(2.0) / k_m) * Float64(l / sin(k_m))) * sqrt(Float64(cos(k_m) / t_m))) ^ 2.0;
	elseif (k_m <= 5e+151)
		tmp = Float64(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t_m * (sin(k_m) ^ 2.0))))));
	else
		tmp = Float64(Float64((cbrt(l) ^ 2.0) * cbrt(2.0)) / Float64(t_m * cbrt(Float64(Float64(sin(k_m) * tan(k_m)) * (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_] := N[(t$95$s * If[LessEqual[k$95$m, 3.2e-43], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision] * N[(l / 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, 5e+151], N[(l * N[(2.0 * N[(N[(l / 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], 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[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * 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)

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 3.19999999999999985e-43

    1. Initial program 34.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Step-by-step derivation
      1. *-commutative34.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*34.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. Simplified40.4%

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

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

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}} \]
    7. Step-by-step derivation
      1. unpow232.6%

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

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

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

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

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

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

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

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

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

    if 3.19999999999999985e-43 < k < 5.0000000000000002e151

    1. Initial program 27.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. *-commutative27.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*28.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. Simplified49.1%

      \[\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. associate-*l/52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000002e151 < k

    1. Initial program 46.2%

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

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow353.8%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr58.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.2 \cdot 10^{-43}:\\ \;\;\;\;{\left(\left(\frac{\sqrt{2}}{k} \cdot \frac{\ell}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\\ \mathbf{elif}\;k \leq 5 \cdot 10^{+151}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\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 4: 91.0% accurate, 0.7× 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 3.2 \cdot 10^{-43}:\\ \;\;\;\;{\left(\left(\frac{\sqrt{2}}{k\_m} \cdot \frac{\ell}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\ \mathbf{elif}\;k\_m \leq 1.8 \cdot 10^{+152}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t\_m \cdot {\sin k\_m}^{2}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{\ell \cdot \left(2 \cdot {\left(\frac{t\_m}{k\_m}\right)}^{2}\right)}}{t\_m \cdot \sqrt[3]{\sin k\_m \cdot \frac{\tan k\_m}{\ell}}}\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 3.2e-43)
    (pow
     (* (* (/ (sqrt 2.0) k_m) (/ l (sin k_m))) (sqrt (/ (cos k_m) t_m)))
     2.0)
    (if (<= k_m 1.8e+152)
      (*
       l
       (*
        2.0
        (* (/ l (pow k_m 2.0)) (/ (cos k_m) (* t_m (pow (sin k_m) 2.0))))))
      (pow
       (/
        (cbrt (* l (* 2.0 (pow (/ t_m k_m) 2.0))))
        (* t_m (cbrt (* (sin k_m) (/ (tan k_m) l)))))
       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 <= 3.2e-43) {
		tmp = pow((((sqrt(2.0) / k_m) * (l / sin(k_m))) * sqrt((cos(k_m) / t_m))), 2.0);
	} else if (k_m <= 1.8e+152) {
		tmp = l * (2.0 * ((l / pow(k_m, 2.0)) * (cos(k_m) / (t_m * pow(sin(k_m), 2.0)))));
	} else {
		tmp = pow((cbrt((l * (2.0 * pow((t_m / k_m), 2.0)))) / (t_m * cbrt((sin(k_m) * (tan(k_m) / l))))), 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 <= 3.2e-43) {
		tmp = Math.pow((((Math.sqrt(2.0) / k_m) * (l / Math.sin(k_m))) * Math.sqrt((Math.cos(k_m) / t_m))), 2.0);
	} else if (k_m <= 1.8e+152) {
		tmp = l * (2.0 * ((l / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t_m * Math.pow(Math.sin(k_m), 2.0)))));
	} else {
		tmp = Math.pow((Math.cbrt((l * (2.0 * Math.pow((t_m / k_m), 2.0)))) / (t_m * Math.cbrt((Math.sin(k_m) * (Math.tan(k_m) / l))))), 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 <= 3.2e-43)
		tmp = Float64(Float64(Float64(sqrt(2.0) / k_m) * Float64(l / sin(k_m))) * sqrt(Float64(cos(k_m) / t_m))) ^ 2.0;
	elseif (k_m <= 1.8e+152)
		tmp = Float64(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t_m * (sin(k_m) ^ 2.0))))));
	else
		tmp = Float64(cbrt(Float64(l * Float64(2.0 * (Float64(t_m / k_m) ^ 2.0)))) / Float64(t_m * cbrt(Float64(sin(k_m) * Float64(tan(k_m) / l))))) ^ 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, 3.2e-43], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision] * N[(l / 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.8e+152], N[(l * N[(2.0 * N[(N[(l / 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], N[Power[N[(N[Power[N[(l * N[(2.0 * N[Power[N[(t$95$m / k$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t$95$m * N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] / l), $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)

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 3.19999999999999985e-43

    1. Initial program 34.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Step-by-step derivation
      1. *-commutative34.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*34.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. Simplified40.4%

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

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

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}} \]
    7. Step-by-step derivation
      1. unpow232.6%

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

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

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

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

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

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

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

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

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

    if 3.19999999999999985e-43 < k < 1.7999999999999999e152

    1. Initial program 27.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. *-commutative27.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*28.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. Simplified49.1%

      \[\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. associate-*l/52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7999999999999999e152 < k

    1. Initial program 46.2%

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

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

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

      \[\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. associate-*l/53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.0% 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}\;\ell \leq 1.45 \cdot 10^{-259} \lor \neg \left(\ell \leq 1.28 \cdot 10^{+154}\right):\\ \;\;\;\;{\left(\left(\frac{\sqrt{2}}{k\_m} \cdot \frac{\ell}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t\_m \cdot {\sin k\_m}^{2}}\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 (or (<= l 1.45e-259) (not (<= l 1.28e+154)))
    (pow
     (* (* (/ (sqrt 2.0) k_m) (/ l (sin k_m))) (sqrt (/ (cos k_m) t_m)))
     2.0)
    (*
     l
     (*
      2.0
      (* (/ l (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 ((l <= 1.45e-259) || !(l <= 1.28e+154)) {
		tmp = pow((((sqrt(2.0) / k_m) * (l / sin(k_m))) * sqrt((cos(k_m) / t_m))), 2.0);
	} else {
		tmp = l * (2.0 * ((l / 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 ((l <= 1.45d-259) .or. (.not. (l <= 1.28d+154))) then
        tmp = (((sqrt(2.0d0) / k_m) * (l / sin(k_m))) * sqrt((cos(k_m) / t_m))) ** 2.0d0
    else
        tmp = l * (2.0d0 * ((l / (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 ((l <= 1.45e-259) || !(l <= 1.28e+154)) {
		tmp = Math.pow((((Math.sqrt(2.0) / k_m) * (l / Math.sin(k_m))) * Math.sqrt((Math.cos(k_m) / t_m))), 2.0);
	} else {
		tmp = l * (2.0 * ((l / 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 (l <= 1.45e-259) or not (l <= 1.28e+154):
		tmp = math.pow((((math.sqrt(2.0) / k_m) * (l / math.sin(k_m))) * math.sqrt((math.cos(k_m) / t_m))), 2.0)
	else:
		tmp = l * (2.0 * ((l / 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 ((l <= 1.45e-259) || !(l <= 1.28e+154))
		tmp = Float64(Float64(Float64(sqrt(2.0) / k_m) * Float64(l / sin(k_m))) * sqrt(Float64(cos(k_m) / t_m))) ^ 2.0;
	else
		tmp = Float64(l * Float64(2.0 * Float64(Float64(l / (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 ((l <= 1.45e-259) || ~((l <= 1.28e+154)))
		tmp = (((sqrt(2.0) / k_m) * (l / sin(k_m))) * sqrt((cos(k_m) / t_m))) ^ 2.0;
	else
		tmp = l * (2.0 * ((l / (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[Or[LessEqual[l, 1.45e-259], N[Not[LessEqual[l, 1.28e+154]], $MachinePrecision]], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision] * N[(l / 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[(l * N[(2.0 * N[(N[(l / 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]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 1.45 \cdot 10^{-259} \lor \neg \left(\ell \leq 1.28 \cdot 10^{+154}\right):\\
\;\;\;\;{\left(\left(\frac{\sqrt{2}}{k\_m} \cdot \frac{\ell}{\sin k\_m}\right) \cdot \sqrt{\frac{\cos k\_m}{t\_m}}\right)}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.45000000000000004e-259 or 1.2800000000000001e154 < l

    1. Initial program 35.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. *-commutative35.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*35.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. Simplified42.0%

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

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

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}} \]
    7. Step-by-step derivation
      1. unpow227.4%

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

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

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

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

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

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

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

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

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

    if 1.45000000000000004e-259 < l < 1.2800000000000001e154

    1. Initial program 33.3%

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

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

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

      \[\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. associate-*l/46.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.45 \cdot 10^{-259} \lor \neg \left(\ell \leq 1.28 \cdot 10^{+154}\right):\\ \;\;\;\;{\left(\left(\frac{\sqrt{2}}{k} \cdot \frac{\ell}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 79.0% 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) \\ \begin{array}{l} t_2 := \sqrt{\frac{\cos k\_m}{t\_m}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 9.5 \cdot 10^{-260}:\\ \;\;\;\;{\left(\left(\frac{\sqrt{2}}{k\_m} \cdot \frac{\ell}{\sin k\_m}\right) \cdot t\_2\right)}^{2}\\ \mathbf{elif}\;\ell \leq 2.45 \cdot 10^{+153}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t\_m \cdot {\sin k\_m}^{2}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(t\_2 \cdot \frac{\sqrt{2} \cdot \ell}{k\_m \cdot \sin k\_m}\right)}^{2}\\ \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 (/ (cos k_m) t_m))))
   (*
    t_s
    (if (<= l 9.5e-260)
      (pow (* (* (/ (sqrt 2.0) k_m) (/ l (sin k_m))) t_2) 2.0)
      (if (<= l 2.45e+153)
        (*
         l
         (*
          2.0
          (* (/ l (pow k_m 2.0)) (/ (cos k_m) (* t_m (pow (sin k_m) 2.0))))))
        (pow (* t_2 (/ (* (sqrt 2.0) l) (* 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) {
	double t_2 = sqrt((cos(k_m) / t_m));
	double tmp;
	if (l <= 9.5e-260) {
		tmp = pow((((sqrt(2.0) / k_m) * (l / sin(k_m))) * t_2), 2.0);
	} else if (l <= 2.45e+153) {
		tmp = l * (2.0 * ((l / pow(k_m, 2.0)) * (cos(k_m) / (t_m * pow(sin(k_m), 2.0)))));
	} else {
		tmp = pow((t_2 * ((sqrt(2.0) * l) / (k_m * 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) :: t_2
    real(8) :: tmp
    t_2 = sqrt((cos(k_m) / t_m))
    if (l <= 9.5d-260) then
        tmp = (((sqrt(2.0d0) / k_m) * (l / sin(k_m))) * t_2) ** 2.0d0
    else if (l <= 2.45d+153) then
        tmp = l * (2.0d0 * ((l / (k_m ** 2.0d0)) * (cos(k_m) / (t_m * (sin(k_m) ** 2.0d0)))))
    else
        tmp = (t_2 * ((sqrt(2.0d0) * l) / (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 t_2 = Math.sqrt((Math.cos(k_m) / t_m));
	double tmp;
	if (l <= 9.5e-260) {
		tmp = Math.pow((((Math.sqrt(2.0) / k_m) * (l / Math.sin(k_m))) * t_2), 2.0);
	} else if (l <= 2.45e+153) {
		tmp = l * (2.0 * ((l / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t_m * Math.pow(Math.sin(k_m), 2.0)))));
	} else {
		tmp = Math.pow((t_2 * ((Math.sqrt(2.0) * l) / (k_m * 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):
	t_2 = math.sqrt((math.cos(k_m) / t_m))
	tmp = 0
	if l <= 9.5e-260:
		tmp = math.pow((((math.sqrt(2.0) / k_m) * (l / math.sin(k_m))) * t_2), 2.0)
	elif l <= 2.45e+153:
		tmp = l * (2.0 * ((l / math.pow(k_m, 2.0)) * (math.cos(k_m) / (t_m * math.pow(math.sin(k_m), 2.0)))))
	else:
		tmp = math.pow((t_2 * ((math.sqrt(2.0) * l) / (k_m * math.sin(k_m)))), 2.0)
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = sqrt(Float64(cos(k_m) / t_m))
	tmp = 0.0
	if (l <= 9.5e-260)
		tmp = Float64(Float64(Float64(sqrt(2.0) / k_m) * Float64(l / sin(k_m))) * t_2) ^ 2.0;
	elseif (l <= 2.45e+153)
		tmp = Float64(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t_m * (sin(k_m) ^ 2.0))))));
	else
		tmp = Float64(t_2 * Float64(Float64(sqrt(2.0) * l) / Float64(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)
	t_2 = sqrt((cos(k_m) / t_m));
	tmp = 0.0;
	if (l <= 9.5e-260)
		tmp = (((sqrt(2.0) / k_m) * (l / sin(k_m))) * t_2) ^ 2.0;
	elseif (l <= 2.45e+153)
		tmp = l * (2.0 * ((l / (k_m ^ 2.0)) * (cos(k_m) / (t_m * (sin(k_m) ^ 2.0)))));
	else
		tmp = (t_2 * ((sqrt(2.0) * l) / (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_] := Block[{t$95$2 = N[Sqrt[N[(N[Cos[k$95$m], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[l, 9.5e-260], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision] * N[(l / N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[l, 2.45e+153], N[(l * N[(2.0 * N[(N[(l / 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], N[Power[N[(t$95$2 * N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] / N[(k$95$m * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.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 := \sqrt{\frac{\cos k\_m}{t\_m}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 9.5 \cdot 10^{-260}:\\
\;\;\;\;{\left(\left(\frac{\sqrt{2}}{k\_m} \cdot \frac{\ell}{\sin k\_m}\right) \cdot t\_2\right)}^{2}\\

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 9.5000000000000001e-260

    1. Initial program 35.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}} \]
    7. Step-by-step derivation
      1. unpow225.7%

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

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

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

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

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

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

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

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

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

    if 9.5000000000000001e-260 < l < 2.45000000000000001e153

    1. Initial program 33.3%

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

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

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

      \[\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. associate-*l/46.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.45000000000000001e153 < l

    1. Initial program 37.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}} \]
    7. Step-by-step derivation
      1. unpow234.6%

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

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

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

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

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

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

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

Alternative 7: 85.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 1.6 \cdot 10^{-40}:\\ \;\;\;\;{\left(\frac{\sqrt{2} \cdot \ell}{{k\_m}^{2}} \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\ell \cdot \frac{\cos k\_m}{{\sin k\_m}^{2} \cdot \left(t\_m \cdot {k\_m}^{2}\right)}\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.6e-40)
    (pow (* (/ (* (sqrt 2.0) l) (pow k_m 2.0)) (sqrt (/ 1.0 t_m))) 2.0)
    (*
     l
     (*
      2.0
      (* l (/ (cos k_m) (* (pow (sin 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) {
	double tmp;
	if (k_m <= 1.6e-40) {
		tmp = pow((((sqrt(2.0) * l) / pow(k_m, 2.0)) * sqrt((1.0 / t_m))), 2.0);
	} else {
		tmp = l * (2.0 * (l * (cos(k_m) / (pow(sin(k_m), 2.0) * (t_m * pow(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 <= 1.6d-40) then
        tmp = (((sqrt(2.0d0) * l) / (k_m ** 2.0d0)) * sqrt((1.0d0 / t_m))) ** 2.0d0
    else
        tmp = l * (2.0d0 * (l * (cos(k_m) / ((sin(k_m) ** 2.0d0) * (t_m * (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 <= 1.6e-40) {
		tmp = Math.pow((((Math.sqrt(2.0) * l) / Math.pow(k_m, 2.0)) * Math.sqrt((1.0 / t_m))), 2.0);
	} else {
		tmp = l * (2.0 * (l * (Math.cos(k_m) / (Math.pow(Math.sin(k_m), 2.0) * (t_m * Math.pow(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 <= 1.6e-40:
		tmp = math.pow((((math.sqrt(2.0) * l) / math.pow(k_m, 2.0)) * math.sqrt((1.0 / t_m))), 2.0)
	else:
		tmp = l * (2.0 * (l * (math.cos(k_m) / (math.pow(math.sin(k_m), 2.0) * (t_m * math.pow(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 <= 1.6e-40)
		tmp = Float64(Float64(Float64(sqrt(2.0) * l) / (k_m ^ 2.0)) * sqrt(Float64(1.0 / t_m))) ^ 2.0;
	else
		tmp = Float64(l * Float64(2.0 * Float64(l * Float64(cos(k_m) / Float64((sin(k_m) ^ 2.0) * Float64(t_m * (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 <= 1.6e-40)
		tmp = (((sqrt(2.0) * l) / (k_m ^ 2.0)) * sqrt((1.0 / t_m))) ^ 2.0;
	else
		tmp = l * (2.0 * (l * (cos(k_m) / ((sin(k_m) ^ 2.0) * (t_m * (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, 1.6e-40], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $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[(l * N[(2.0 * N[(l * N[(N[Cos[k$95$m], $MachinePrecision] / N[(N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m * N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

    1. Initial program 34.5%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}} \]
    7. Step-by-step derivation
      1. unpow232.4%

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

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

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

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

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

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

    if 1.60000000000000001e-40 < 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. Step-by-step derivation
      1. *-commutative36.6%

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

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

      \[\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. associate-*l/53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 85.7% accurate, 1.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t\_m \cdot {\sin k\_m}^{2}}\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
   (* 2.0 (* (/ l (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) {
	return t_s * (l * (2.0 * ((l / pow(k_m, 2.0)) * (cos(k_m) / (t_m * pow(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 * (2.0d0 * ((l / (k_m ** 2.0d0)) * (cos(k_m) / (t_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 * (2.0 * ((l / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t_m * Math.pow(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 * (2.0 * ((l / math.pow(k_m, 2.0)) * (math.cos(k_m) / (t_m * math.pow(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(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t_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 * (2.0 * ((l / (k_m ^ 2.0)) * (cos(k_m) / (t_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[(l * N[(2.0 * N[(N[(l / 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]), $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(\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t\_m \cdot {\sin k\_m}^{2}}\right)\right)\right)
\end{array}
Derivation
  1. Initial program 35.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. *-commutative35.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*35.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. 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. associate-*l/44.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 74.2% 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 {\left(\frac{\sqrt{2} \cdot \ell}{{k\_m}^{2}} \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2} \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 (pow (* (/ (* (sqrt 2.0) l) (pow k_m 2.0)) (sqrt (/ 1.0 t_m))) 2.0)))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * pow((((sqrt(2.0) * l) / pow(k_m, 2.0)) * sqrt((1.0 / t_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 * ((((sqrt(2.0d0) * l) / (k_m ** 2.0d0)) * sqrt((1.0d0 / t_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 * Math.pow((((Math.sqrt(2.0) * l) / Math.pow(k_m, 2.0)) * Math.sqrt((1.0 / t_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 * math.pow((((math.sqrt(2.0) * l) / math.pow(k_m, 2.0)) * math.sqrt((1.0 / t_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(Float64(sqrt(2.0) * l) / (k_m ^ 2.0)) * sqrt(Float64(1.0 / t_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 * ((((sqrt(2.0) * l) / (k_m ^ 2.0)) * sqrt((1.0 / t_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[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.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(\frac{\sqrt{2} \cdot \ell}{{k\_m}^{2}} \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}
\end{array}
Derivation
  1. Initial program 35.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. *-commutative35.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*35.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. 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-sqrt32.7%

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

    \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}} \]
  7. Step-by-step derivation
    1. unpow229.0%

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

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

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

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

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

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

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

Alternative 10: 73.6% 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 {\left(\ell \cdot \left(\sqrt{\frac{1}{t\_m}} \cdot \frac{\sqrt{2}}{{k\_m}^{2}}\right)\right)}^{2} \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 (pow (* l (* (sqrt (/ 1.0 t_m)) (/ (sqrt 2.0) (pow k_m 2.0)))) 2.0)))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * pow((l * (sqrt((1.0 / t_m)) * (sqrt(2.0) / pow(k_m, 2.0)))), 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 * (sqrt((1.0d0 / t_m)) * (sqrt(2.0d0) / (k_m ** 2.0d0)))) ** 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 * Math.pow((l * (Math.sqrt((1.0 / t_m)) * (Math.sqrt(2.0) / Math.pow(k_m, 2.0)))), 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 * math.pow((l * (math.sqrt((1.0 / t_m)) * (math.sqrt(2.0) / math.pow(k_m, 2.0)))), 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(l * Float64(sqrt(Float64(1.0 / t_m)) * Float64(sqrt(2.0) / (k_m ^ 2.0)))) ^ 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 * (sqrt((1.0 / t_m)) * (sqrt(2.0) / (k_m ^ 2.0)))) ^ 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[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]), $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(\ell \cdot \left(\sqrt{\frac{1}{t\_m}} \cdot \frac{\sqrt{2}}{{k\_m}^{2}}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 35.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. *-commutative35.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*35.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. 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-sqrt32.7%

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

    \[\leadsto \color{blue}{\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k \cdot \tan k}}} \]
  7. Step-by-step derivation
    1. unpow229.0%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 72.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(\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k\_m}{{k\_m}^{2} \cdot \left(t\_m \cdot {k\_m}^{2}\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 (* 2.0 (/ (* l (cos k_m)) (* (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 * (2.0 * ((l * cos(k_m)) / (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 * (2.0d0 * ((l * cos(k_m)) / ((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 * (2.0 * ((l * Math.cos(k_m)) / (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 * (2.0 * ((l * math.cos(k_m)) / (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(l * Float64(2.0 * Float64(Float64(l * cos(k_m)) / 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 * (2.0 * ((l * cos(k_m)) / ((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[(l * N[(2.0 * N[(N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / 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]), $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(\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k\_m}{{k\_m}^{2} \cdot \left(t\_m \cdot {k\_m}^{2}\right)}\right)\right)
\end{array}
Derivation
  1. Initial program 35.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. *-commutative35.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*35.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. 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. associate-*l/44.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 69.5% accurate, 3.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 \left(\ell \cdot \left(2 \cdot \frac{\frac{\ell}{{k\_m}^{4}}}{t\_m}\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 (* 2.0 (/ (/ l (pow k_m 4.0)) t_m)))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (l * (2.0 * ((l / pow(k_m, 4.0)) / t_m)));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * (l * (2.0d0 * ((l / (k_m ** 4.0d0)) / t_m)))
end function
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (l * (2.0 * ((l / Math.pow(k_m, 4.0)) / t_m)));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * (l * (2.0 * ((l / math.pow(k_m, 4.0)) / t_m)))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 4.0)) / t_m))))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * (l * (2.0 * ((l / (k_m ^ 4.0)) / t_m)));
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(l * N[(2.0 * N[(N[(l / N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\ell \cdot \left(2 \cdot \frac{\frac{\ell}{{k\_m}^{4}}}{t\_m}\right)\right)
\end{array}
Derivation
  1. Initial program 35.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. *-commutative35.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*35.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. 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. associate-*l/44.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 68.8% accurate, 3.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 \left(\ell \cdot \left(2 \cdot \frac{\ell}{t\_m \cdot {k\_m}^{4}}\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 (* 2.0 (/ l (* t_m (pow k_m 4.0)))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (l * (2.0 * (l / (t_m * pow(k_m, 4.0)))));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * (l * (2.0d0 * (l / (t_m * (k_m ** 4.0d0)))))
end function
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (l * (2.0 * (l / (t_m * Math.pow(k_m, 4.0)))));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * (l * (2.0 * (l / (t_m * math.pow(k_m, 4.0)))))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(l * Float64(2.0 * Float64(l / Float64(t_m * (k_m ^ 4.0))))))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * (l * (2.0 * (l / (t_m * (k_m ^ 4.0)))));
end
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k$95$m_] := N[(t$95$s * N[(l * N[(2.0 * N[(l / N[(t$95$m * N[Power[k$95$m, 4.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(\ell \cdot \left(2 \cdot \frac{\ell}{t\_m \cdot {k\_m}^{4}}\right)\right)
\end{array}
Derivation
  1. Initial program 35.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. *-commutative35.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*35.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. 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. associate-*l/44.1%

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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