Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.9% → 84.4%
Time: 20.1s
Alternatives: 17
Speedup: 35.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

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

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sqrt[3]{\sin k \cdot \tan k}\\ t_3 := \sqrt[3]{\sqrt{l\_m}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5.9 \cdot 10^{-176}:\\ \;\;\;\;{\left(\frac{l\_m \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \frac{t\_m}{k}}{{\left(t\_m \cdot \left({\left(\sqrt[3]{l\_m}\right)}^{-2} \cdot t\_2\right)\right)}^{2}} \cdot \frac{\frac{\sqrt{2}}{k} \cdot \frac{1}{{\left(t\_3 \cdot t\_3\right)}^{-2}}}{t\_2}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k)
 :precision binary64
 (let* ((t_2 (cbrt (* (sin k) (tan k)))) (t_3 (cbrt (sqrt l_m))))
   (*
    t_s
    (if (<= t_m 5.9e-176)
      (pow (* (/ (* l_m (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
      (*
       (/
        (* (sqrt 2.0) (/ t_m k))
        (pow (* t_m (* (pow (cbrt l_m) -2.0) t_2)) 2.0))
       (/ (* (/ (sqrt 2.0) k) (/ 1.0 (pow (* t_3 t_3) -2.0))) t_2))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = cbrt((sin(k) * tan(k)));
	double t_3 = cbrt(sqrt(l_m));
	double tmp;
	if (t_m <= 5.9e-176) {
		tmp = pow((((l_m * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
	} else {
		tmp = ((sqrt(2.0) * (t_m / k)) / pow((t_m * (pow(cbrt(l_m), -2.0) * t_2)), 2.0)) * (((sqrt(2.0) / k) * (1.0 / pow((t_3 * t_3), -2.0))) / t_2);
	}
	return t_s * tmp;
}
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
	double t_3 = Math.cbrt(Math.sqrt(l_m));
	double tmp;
	if (t_m <= 5.9e-176) {
		tmp = Math.pow((((l_m * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
	} else {
		tmp = ((Math.sqrt(2.0) * (t_m / k)) / Math.pow((t_m * (Math.pow(Math.cbrt(l_m), -2.0) * t_2)), 2.0)) * (((Math.sqrt(2.0) / k) * (1.0 / Math.pow((t_3 * t_3), -2.0))) / t_2);
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k)
	t_2 = cbrt(Float64(sin(k) * tan(k)))
	t_3 = cbrt(sqrt(l_m))
	tmp = 0.0
	if (t_m <= 5.9e-176)
		tmp = Float64(Float64(Float64(l_m * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0;
	else
		tmp = Float64(Float64(Float64(sqrt(2.0) * Float64(t_m / k)) / (Float64(t_m * Float64((cbrt(l_m) ^ -2.0) * t_2)) ^ 2.0)) * Float64(Float64(Float64(sqrt(2.0) / k) * Float64(1.0 / (Float64(t_3 * t_3) ^ -2.0))) / t_2));
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $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$95$m_, k_] := Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[l$95$m], $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.9e-176], N[Power[N[(N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision] / N[Power[N[(t$95$m * N[(N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(1.0 / N[Power[N[(t$95$3 * t$95$3), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 5.8999999999999997e-176 < t

    1. Initial program 27.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. *-commutative27.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*27.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. Simplified32.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. add-sqr-sqrt32.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.4% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sqrt[3]{\sin k \cdot \tan k}\\ t_3 := {\left(\sqrt[3]{l\_m}\right)}^{-2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.22 \cdot 10^{-173}:\\ \;\;\;\;{\left(\frac{l\_m \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{2} \cdot \frac{\frac{t\_m}{k}}{{\left(t\_3 \cdot \left(t\_m \cdot t\_2\right)\right)}^{2}}\right) \cdot \frac{\frac{\sqrt{2}}{k} \cdot \frac{1}{t\_3}}{t\_2}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k)
 :precision binary64
 (let* ((t_2 (cbrt (* (sin k) (tan k)))) (t_3 (pow (cbrt l_m) -2.0)))
   (*
    t_s
    (if (<= t_m 1.22e-173)
      (pow (* (/ (* l_m (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
      (*
       (* (sqrt 2.0) (/ (/ t_m k) (pow (* t_3 (* t_m t_2)) 2.0)))
       (/ (* (/ (sqrt 2.0) k) (/ 1.0 t_3)) t_2))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = cbrt((sin(k) * tan(k)));
	double t_3 = pow(cbrt(l_m), -2.0);
	double tmp;
	if (t_m <= 1.22e-173) {
		tmp = pow((((l_m * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
	} else {
		tmp = (sqrt(2.0) * ((t_m / k) / pow((t_3 * (t_m * t_2)), 2.0))) * (((sqrt(2.0) / k) * (1.0 / t_3)) / t_2);
	}
	return t_s * tmp;
}
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
	double t_3 = Math.pow(Math.cbrt(l_m), -2.0);
	double tmp;
	if (t_m <= 1.22e-173) {
		tmp = Math.pow((((l_m * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
	} else {
		tmp = (Math.sqrt(2.0) * ((t_m / k) / Math.pow((t_3 * (t_m * t_2)), 2.0))) * (((Math.sqrt(2.0) / k) * (1.0 / t_3)) / t_2);
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k)
	t_2 = cbrt(Float64(sin(k) * tan(k)))
	t_3 = cbrt(l_m) ^ -2.0
	tmp = 0.0
	if (t_m <= 1.22e-173)
		tmp = Float64(Float64(Float64(l_m * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0;
	else
		tmp = Float64(Float64(sqrt(2.0) * Float64(Float64(t_m / k) / (Float64(t_3 * Float64(t_m * t_2)) ^ 2.0))) * Float64(Float64(Float64(sqrt(2.0) / k) * Float64(1.0 / t_3)) / t_2));
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $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$95$m_, k_] := Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.22e-173], N[Power[N[(N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[(t$95$m / k), $MachinePrecision] / N[Power[N[(t$95$3 * N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(1.0 / t$95$3), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 1.21999999999999993e-173 < t

    1. Initial program 27.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. *-commutative27.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*27.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. Simplified32.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. add-sqr-sqrt32.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 84.4% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sqrt[3]{\sin k \cdot \tan k}\\ t_3 := {\left(\sqrt[3]{l\_m}\right)}^{-2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.15 \cdot 10^{-174}:\\ \;\;\;\;{\left(\frac{l\_m \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \frac{t\_m}{k}}{{\left(t\_m \cdot \left(t\_3 \cdot t\_2\right)\right)}^{2}} \cdot \frac{\frac{\frac{\sqrt{2}}{k}}{t\_3}}{t\_2}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k)
 :precision binary64
 (let* ((t_2 (cbrt (* (sin k) (tan k)))) (t_3 (pow (cbrt l_m) -2.0)))
   (*
    t_s
    (if (<= t_m 2.15e-174)
      (pow (* (/ (* l_m (sqrt 2.0)) (* k (sin k))) (sqrt (/ (cos k) t_m))) 2.0)
      (*
       (/ (* (sqrt 2.0) (/ t_m k)) (pow (* t_m (* t_3 t_2)) 2.0))
       (/ (/ (/ (sqrt 2.0) k) t_3) t_2))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = cbrt((sin(k) * tan(k)));
	double t_3 = pow(cbrt(l_m), -2.0);
	double tmp;
	if (t_m <= 2.15e-174) {
		tmp = pow((((l_m * sqrt(2.0)) / (k * sin(k))) * sqrt((cos(k) / t_m))), 2.0);
	} else {
		tmp = ((sqrt(2.0) * (t_m / k)) / pow((t_m * (t_3 * t_2)), 2.0)) * (((sqrt(2.0) / k) / t_3) / t_2);
	}
	return t_s * tmp;
}
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
	double t_3 = Math.pow(Math.cbrt(l_m), -2.0);
	double tmp;
	if (t_m <= 2.15e-174) {
		tmp = Math.pow((((l_m * Math.sqrt(2.0)) / (k * Math.sin(k))) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
	} else {
		tmp = ((Math.sqrt(2.0) * (t_m / k)) / Math.pow((t_m * (t_3 * t_2)), 2.0)) * (((Math.sqrt(2.0) / k) / t_3) / t_2);
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k)
	t_2 = cbrt(Float64(sin(k) * tan(k)))
	t_3 = cbrt(l_m) ^ -2.0
	tmp = 0.0
	if (t_m <= 2.15e-174)
		tmp = Float64(Float64(Float64(l_m * sqrt(2.0)) / Float64(k * sin(k))) * sqrt(Float64(cos(k) / t_m))) ^ 2.0;
	else
		tmp = Float64(Float64(Float64(sqrt(2.0) * Float64(t_m / k)) / (Float64(t_m * Float64(t_3 * t_2)) ^ 2.0)) * Float64(Float64(Float64(sqrt(2.0) / k) / t_3) / t_2));
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $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$95$m_, k_] := Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.15e-174], N[Power[N[(N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / k), $MachinePrecision]), $MachinePrecision] / N[Power[N[(t$95$m * N[(t$95$3 * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] / t$95$3), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 2.1500000000000002e-174 < t

    1. Initial program 27.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. *-commutative27.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*27.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. Simplified32.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. add-sqr-sqrt32.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt{2} \cdot \frac{t}{k}}{{\left(t \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k \cdot \tan k}\right)\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 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 79.5% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k \cdot \tan k\\ t_3 := \frac{\sqrt{2}}{k}\\ t_4 := \sqrt[3]{t\_2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.6 \cdot 10^{-114}:\\ \;\;\;\;{\left(\frac{\sqrt{\frac{1}{t\_m}} \cdot \left(l\_m \cdot t\_3\right)}{\sqrt{t\_2}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{t\_m \cdot \sqrt{2}}{k} \cdot \left(t\_3 \cdot {l\_m}^{0.6666666666666666}\right)}{t\_4 \cdot {\left(t\_4 \cdot \left(t\_m \cdot {\left(\sqrt[3]{l\_m}\right)}^{-2}\right)\right)}^{2}}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k)
 :precision binary64
 (let* ((t_2 (* (sin k) (tan k))) (t_3 (/ (sqrt 2.0) k)) (t_4 (cbrt t_2)))
   (*
    t_s
    (if (<= t_m 3.6e-114)
      (pow (/ (* (sqrt (/ 1.0 t_m)) (* l_m t_3)) (sqrt t_2)) 2.0)
      (/
       (* (/ (* t_m (sqrt 2.0)) k) (* t_3 (pow l_m 0.6666666666666666)))
       (* t_4 (pow (* t_4 (* t_m (pow (cbrt l_m) -2.0))) 2.0)))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = sin(k) * tan(k);
	double t_3 = sqrt(2.0) / k;
	double t_4 = cbrt(t_2);
	double tmp;
	if (t_m <= 3.6e-114) {
		tmp = pow(((sqrt((1.0 / t_m)) * (l_m * t_3)) / sqrt(t_2)), 2.0);
	} else {
		tmp = (((t_m * sqrt(2.0)) / k) * (t_3 * pow(l_m, 0.6666666666666666))) / (t_4 * pow((t_4 * (t_m * pow(cbrt(l_m), -2.0))), 2.0));
	}
	return t_s * tmp;
}
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = Math.sin(k) * Math.tan(k);
	double t_3 = Math.sqrt(2.0) / k;
	double t_4 = Math.cbrt(t_2);
	double tmp;
	if (t_m <= 3.6e-114) {
		tmp = Math.pow(((Math.sqrt((1.0 / t_m)) * (l_m * t_3)) / Math.sqrt(t_2)), 2.0);
	} else {
		tmp = (((t_m * Math.sqrt(2.0)) / k) * (t_3 * Math.pow(l_m, 0.6666666666666666))) / (t_4 * Math.pow((t_4 * (t_m * Math.pow(Math.cbrt(l_m), -2.0))), 2.0));
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k)
	t_2 = Float64(sin(k) * tan(k))
	t_3 = Float64(sqrt(2.0) / k)
	t_4 = cbrt(t_2)
	tmp = 0.0
	if (t_m <= 3.6e-114)
		tmp = Float64(Float64(sqrt(Float64(1.0 / t_m)) * Float64(l_m * t_3)) / sqrt(t_2)) ^ 2.0;
	else
		tmp = Float64(Float64(Float64(Float64(t_m * sqrt(2.0)) / k) * Float64(t_3 * (l_m ^ 0.6666666666666666))) / Float64(t_4 * (Float64(t_4 * Float64(t_m * (cbrt(l_m) ^ -2.0))) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $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$95$m_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$4 = N[Power[t$95$2, 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.6e-114], N[Power[N[(N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * t$95$3), $MachinePrecision]), $MachinePrecision] / N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(t$95$3 * N[Power[l$95$m, 0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$4 * N[Power[N[(t$95$4 * N[(t$95$m * N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sin k \cdot \tan k\\
t_3 := \frac{\sqrt{2}}{k}\\
t_4 := \sqrt[3]{t\_2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.6 \cdot 10^{-114}:\\
\;\;\;\;{\left(\frac{\sqrt{\frac{1}{t\_m}} \cdot \left(l\_m \cdot t\_3\right)}{\sqrt{t\_2}}\right)}^{2}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.60000000000000018e-114 < t

    1. Initial program 29.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. *-commutative29.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*29.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. Simplified35.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-sqrt35.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.2% accurate, 0.5× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k \cdot \tan k\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 4.8 \cdot 10^{-16}:\\ \;\;\;\;{\left(\frac{\left(l\_m \cdot \sqrt{2}\right) \cdot \frac{\sqrt{\frac{1}{t\_m}}}{k}}{\sqrt{t\_2}}\right)}^{2}\\ \mathbf{elif}\;k \leq 2.2 \cdot 10^{+147}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k}} \cdot \left(l\_m \cdot l\_m\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot {\left(\frac{t\_m}{k}\right)}^{2}}}{\sqrt[3]{t\_2} \cdot \left(t\_m \cdot {\left(\sqrt[3]{l\_m}\right)}^{-2}\right)}\right)}^{3}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k)
 :precision binary64
 (let* ((t_2 (* (sin k) (tan k))))
   (*
    t_s
    (if (<= k 4.8e-16)
      (pow (/ (* (* l_m (sqrt 2.0)) (/ (sqrt (/ 1.0 t_m)) k)) (sqrt t_2)) 2.0)
      (if (<= k 2.2e+147)
        (*
         (/ 2.0 (/ (* (pow k 2.0) (* t_m (pow (sin k) 2.0))) (cos k)))
         (* l_m l_m))
        (pow
         (/
          (cbrt (* 2.0 (pow (/ t_m k) 2.0)))
          (* (cbrt t_2) (* t_m (pow (cbrt l_m) -2.0))))
         3.0))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = sin(k) * tan(k);
	double tmp;
	if (k <= 4.8e-16) {
		tmp = pow((((l_m * sqrt(2.0)) * (sqrt((1.0 / t_m)) / k)) / sqrt(t_2)), 2.0);
	} else if (k <= 2.2e+147) {
		tmp = (2.0 / ((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / cos(k))) * (l_m * l_m);
	} else {
		tmp = pow((cbrt((2.0 * pow((t_m / k), 2.0))) / (cbrt(t_2) * (t_m * pow(cbrt(l_m), -2.0)))), 3.0);
	}
	return t_s * tmp;
}
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = Math.sin(k) * Math.tan(k);
	double tmp;
	if (k <= 4.8e-16) {
		tmp = Math.pow((((l_m * Math.sqrt(2.0)) * (Math.sqrt((1.0 / t_m)) / k)) / Math.sqrt(t_2)), 2.0);
	} else if (k <= 2.2e+147) {
		tmp = (2.0 / ((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / Math.cos(k))) * (l_m * l_m);
	} else {
		tmp = Math.pow((Math.cbrt((2.0 * Math.pow((t_m / k), 2.0))) / (Math.cbrt(t_2) * (t_m * Math.pow(Math.cbrt(l_m), -2.0)))), 3.0);
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k)
	t_2 = Float64(sin(k) * tan(k))
	tmp = 0.0
	if (k <= 4.8e-16)
		tmp = Float64(Float64(Float64(l_m * sqrt(2.0)) * Float64(sqrt(Float64(1.0 / t_m)) / k)) / sqrt(t_2)) ^ 2.0;
	elseif (k <= 2.2e+147)
		tmp = Float64(Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / cos(k))) * Float64(l_m * l_m));
	else
		tmp = Float64(cbrt(Float64(2.0 * (Float64(t_m / k) ^ 2.0))) / Float64(cbrt(t_2) * Float64(t_m * (cbrt(l_m) ^ -2.0)))) ^ 3.0;
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $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$95$m_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 4.8e-16], N[Power[N[(N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[k, 2.2e+147], N[(N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[N[(2.0 * N[Power[N[(t$95$m / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(N[Power[t$95$2, 1/3], $MachinePrecision] * N[(t$95$m * N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sin k \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.8 \cdot 10^{-16}:\\
\;\;\;\;{\left(\frac{\left(l\_m \cdot \sqrt{2}\right) \cdot \frac{\sqrt{\frac{1}{t\_m}}}{k}}{\sqrt{t\_2}}\right)}^{2}\\

\mathbf{elif}\;k \leq 2.2 \cdot 10^{+147}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}{\cos k}} \cdot \left(l\_m \cdot l\_m\right)\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000001e-16 < k < 2.2000000000000002e147

    1. Initial program 17.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. Simplified34.9%

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

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

    if 2.2000000000000002e147 < k

    1. Initial program 39.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. *-commutative39.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*39.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. Simplified46.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-sqrt46.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-cbrt46.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-frac46.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-rr78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 82.4% accurate, 0.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k \cdot \tan k\\ t_3 := \sqrt{\frac{1}{t\_m}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.56 \cdot 10^{-103}:\\ \;\;\;\;{\left(\frac{t\_3 \cdot \left(l\_m \cdot \frac{\sqrt{2}}{k}\right)}{\sqrt{t\_2}}\right)}^{2}\\ \mathbf{elif}\;t\_m \leq 1.7 \cdot 10^{+75}:\\ \;\;\;\;{\left(l\_m \cdot \left(\frac{t\_m}{k} \cdot \sqrt{2 \cdot {t\_m}^{-3}}\right)\right)}^{2} \cdot {t\_2}^{-1}\\ \mathbf{else}:\\ \;\;\;\;{\left(l\_m \cdot \frac{\sqrt{2} \cdot t\_3}{{k}^{2}}\right)}^{2}\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k)
 :precision binary64
 (let* ((t_2 (* (sin k) (tan k))) (t_3 (sqrt (/ 1.0 t_m))))
   (*
    t_s
    (if (<= t_m 1.56e-103)
      (pow (/ (* t_3 (* l_m (/ (sqrt 2.0) k))) (sqrt t_2)) 2.0)
      (if (<= t_m 1.7e+75)
        (*
         (pow (* l_m (* (/ t_m k) (sqrt (* 2.0 (pow t_m -3.0))))) 2.0)
         (pow t_2 -1.0))
        (pow (* l_m (/ (* (sqrt 2.0) t_3) (pow k 2.0))) 2.0))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = sin(k) * tan(k);
	double t_3 = sqrt((1.0 / t_m));
	double tmp;
	if (t_m <= 1.56e-103) {
		tmp = pow(((t_3 * (l_m * (sqrt(2.0) / k))) / sqrt(t_2)), 2.0);
	} else if (t_m <= 1.7e+75) {
		tmp = pow((l_m * ((t_m / k) * sqrt((2.0 * pow(t_m, -3.0))))), 2.0) * pow(t_2, -1.0);
	} else {
		tmp = pow((l_m * ((sqrt(2.0) * t_3) / pow(k, 2.0))), 2.0);
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_2 = sin(k) * tan(k)
    t_3 = sqrt((1.0d0 / t_m))
    if (t_m <= 1.56d-103) then
        tmp = ((t_3 * (l_m * (sqrt(2.0d0) / k))) / sqrt(t_2)) ** 2.0d0
    else if (t_m <= 1.7d+75) then
        tmp = ((l_m * ((t_m / k) * sqrt((2.0d0 * (t_m ** (-3.0d0)))))) ** 2.0d0) * (t_2 ** (-1.0d0))
    else
        tmp = (l_m * ((sqrt(2.0d0) * t_3) / (k ** 2.0d0))) ** 2.0d0
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
	double t_2 = Math.sin(k) * Math.tan(k);
	double t_3 = Math.sqrt((1.0 / t_m));
	double tmp;
	if (t_m <= 1.56e-103) {
		tmp = Math.pow(((t_3 * (l_m * (Math.sqrt(2.0) / k))) / Math.sqrt(t_2)), 2.0);
	} else if (t_m <= 1.7e+75) {
		tmp = Math.pow((l_m * ((t_m / k) * Math.sqrt((2.0 * Math.pow(t_m, -3.0))))), 2.0) * Math.pow(t_2, -1.0);
	} else {
		tmp = Math.pow((l_m * ((Math.sqrt(2.0) * t_3) / Math.pow(k, 2.0))), 2.0);
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k):
	t_2 = math.sin(k) * math.tan(k)
	t_3 = math.sqrt((1.0 / t_m))
	tmp = 0
	if t_m <= 1.56e-103:
		tmp = math.pow(((t_3 * (l_m * (math.sqrt(2.0) / k))) / math.sqrt(t_2)), 2.0)
	elif t_m <= 1.7e+75:
		tmp = math.pow((l_m * ((t_m / k) * math.sqrt((2.0 * math.pow(t_m, -3.0))))), 2.0) * math.pow(t_2, -1.0)
	else:
		tmp = math.pow((l_m * ((math.sqrt(2.0) * t_3) / math.pow(k, 2.0))), 2.0)
	return t_s * tmp
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k)
	t_2 = Float64(sin(k) * tan(k))
	t_3 = sqrt(Float64(1.0 / t_m))
	tmp = 0.0
	if (t_m <= 1.56e-103)
		tmp = Float64(Float64(t_3 * Float64(l_m * Float64(sqrt(2.0) / k))) / sqrt(t_2)) ^ 2.0;
	elseif (t_m <= 1.7e+75)
		tmp = Float64((Float64(l_m * Float64(Float64(t_m / k) * sqrt(Float64(2.0 * (t_m ^ -3.0))))) ^ 2.0) * (t_2 ^ -1.0));
	else
		tmp = Float64(l_m * Float64(Float64(sqrt(2.0) * t_3) / (k ^ 2.0))) ^ 2.0;
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l_m, k)
	t_2 = sin(k) * tan(k);
	t_3 = sqrt((1.0 / t_m));
	tmp = 0.0;
	if (t_m <= 1.56e-103)
		tmp = ((t_3 * (l_m * (sqrt(2.0) / k))) / sqrt(t_2)) ^ 2.0;
	elseif (t_m <= 1.7e+75)
		tmp = ((l_m * ((t_m / k) * sqrt((2.0 * (t_m ^ -3.0))))) ^ 2.0) * (t_2 ^ -1.0);
	else
		tmp = (l_m * ((sqrt(2.0) * t_3) / (k ^ 2.0))) ^ 2.0;
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $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$95$m_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.56e-103], N[Power[N[(N[(t$95$3 * N[(l$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 1.7e+75], N[(N[Power[N[(l$95$m * N[(N[(t$95$m / k), $MachinePrecision] * N[Sqrt[N[(2.0 * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[t$95$2, -1.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$3), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{elif}\;t\_m \leq 1.7 \cdot 10^{+75}:\\
\;\;\;\;{\left(l\_m \cdot \left(\frac{t\_m}{k} \cdot \sqrt{2 \cdot {t\_m}^{-3}}\right)\right)}^{2} \cdot {t\_2}^{-1}\\

\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot \frac{\sqrt{2} \cdot t\_3}{{k}^{2}}\right)}^{2}\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5600000000000001e-103 < t < 1.70000000000000006e75

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.70000000000000006e75 < t

    1. Initial program 19.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 77.7% accurate, 0.7× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000001e-16 < k

    1. Initial program 29.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. Simplified41.3%

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

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

Alternative 8: 77.9% accurate, 0.7× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000002e-16 < k

    1. Initial program 29.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. Simplified41.3%

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

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

Alternative 9: 77.7% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.79999999999999973e-17 < k

    1. Initial program 29.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. Simplified41.3%

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

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

Alternative 10: 77.7% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000001e-16 < k

    1. Initial program 29.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. Simplified41.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 74.4% accurate, 1.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.14999999999999992e-169

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

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

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

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

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

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

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

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

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

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

    if 2.14999999999999992e-169 < l

    1. Initial program 29.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. Simplified38.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 73.4% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 63.6% accurate, 3.7× speedup?

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

\\
t\_s \cdot \left(\left(l\_m \cdot l\_m\right) \cdot \frac{2}{\left(k \cdot k\right) \cdot \left(t\_m \cdot {k}^{2}\right)}\right)
\end{array}
Derivation
  1. Initial program 34.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. Simplified40.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 42.1% accurate, 3.7× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.2 \cdot 10^{-16}:\\
\;\;\;\;\left(l\_m \cdot l\_m\right) \cdot \frac{2}{0}\\

\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot l\_m\right) \cdot {\left(\frac{t\_m}{-0.11666666666666667}\right)}^{-1}\\


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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000002e-16 < k

    1. Initial program 29.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. Simplified41.3%

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

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

      \[\leadsto \color{blue}{\frac{-0.11666666666666667}{t}} \cdot \left(\ell \cdot \ell\right) \]
    6. Step-by-step derivation
      1. clear-num38.9%

        \[\leadsto \color{blue}{\frac{1}{\frac{t}{-0.11666666666666667}}} \cdot \left(\ell \cdot \ell\right) \]
      2. inv-pow38.9%

        \[\leadsto \color{blue}{{\left(\frac{t}{-0.11666666666666667}\right)}^{-1}} \cdot \left(\ell \cdot \ell\right) \]
    7. Applied egg-rr38.9%

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

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

Alternative 15: 62.1% accurate, 3.8× speedup?

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

\\
t\_s \cdot \left(\left(l\_m \cdot l\_m\right) \cdot \frac{2}{t\_m \cdot {k}^{4}}\right)
\end{array}
Derivation
  1. Initial program 34.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. Simplified40.9%

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

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

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

Alternative 16: 42.1% accurate, 35.0× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-16}:\\
\;\;\;\;\left(l\_m \cdot l\_m\right) \cdot \frac{2}{0}\\

\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot l\_m\right) \cdot \frac{-0.11666666666666667}{t\_m}\\


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

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

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

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

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

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

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

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

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

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

    if 2.2e-16 < k

    1. Initial program 29.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. Simplified41.3%

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

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

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

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

Alternative 17: 19.3% accurate, 60.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left(l\_m \cdot l\_m\right) \cdot \frac{-0.11666666666666667}{t\_m}\right) \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k)
 :precision binary64
 (* t_s (* (* l_m l_m) (/ -0.11666666666666667 t_m))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
	return t_s * ((l_m * l_m) * (-0.11666666666666667 / t_m));
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    code = t_s * ((l_m * l_m) * ((-0.11666666666666667d0) / t_m))
end function
l_m = Math.abs(l);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
	return t_s * ((l_m * l_m) * (-0.11666666666666667 / t_m));
}
l_m = math.fabs(l)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k):
	return t_s * ((l_m * l_m) * (-0.11666666666666667 / t_m))
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k)
	return Float64(t_s * Float64(Float64(l_m * l_m) * Float64(-0.11666666666666667 / t_m)))
end
l_m = abs(l);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l_m, k)
	tmp = t_s * ((l_m * l_m) * (-0.11666666666666667 / t_m));
end
l_m = N[Abs[l], $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$95$m_, k_] := N[(t$95$s * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-0.11666666666666667 / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left(l\_m \cdot l\_m\right) \cdot \frac{-0.11666666666666667}{t\_m}\right)
\end{array}
Derivation
  1. Initial program 34.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. Simplified40.9%

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

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

    \[\leadsto \color{blue}{\frac{-0.11666666666666667}{t}} \cdot \left(\ell \cdot \ell\right) \]
  6. Final simplification19.7%

    \[\leadsto \left(\ell \cdot \ell\right) \cdot \frac{-0.11666666666666667}{t} \]
  7. Add Preprocessing

Reproduce

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