Toniolo and Linder, Equation (10+)

Percentage Accurate: 55.1% → 83.2%
Time: 20.2s
Alternatives: 24
Speedup: 24.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 24 alternatives:

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

Initial Program: 55.1% accurate, 1.0× speedup?

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

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

Alternative 1: 83.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_2 := t\_m \cdot \sqrt[3]{\sin k}\\
t_3 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\
t_4 := \sqrt[3]{\frac{2 \cdot {\ell}^{2}}{\tan k}}\\
t_5 := \frac{\ell}{t\_3}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.6 \cdot 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\

\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{{\left(\frac{t\_4}{t\_2}\right)}^{2}}{t\_3} \cdot \frac{t\_4}{t\_2 \cdot t\_3}\\

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

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


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

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999991e-200 < t < 5.4999999999999998e-104

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

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

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

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

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

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

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

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

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

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

    if 5.4999999999999998e-104 < t < 4.5000000000000003e87

    1. Initial program 61.9%

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified76.6%

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

    if 4.5000000000000003e87 < t

    1. Initial program 60.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. Simplified60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\color{blue}{\tan k} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)} \]
      4. unpow293.5%

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\sqrt[3]{\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}} \cdot \sqrt[3]{\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right) \cdot \sqrt[3]{\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}}^{3} \cdot \left(\tan k \cdot {\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}\right)} \]
      2. add-cube-cbrt93.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.6 \cdot 10^{-200}:\\ \;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-104}:\\ \;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2 \cdot {\ell}^{2}}{\tan k}}}{t \cdot \sqrt[3]{\sin k}}\right)}^{2}}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \frac{\sqrt[3]{\frac{2 \cdot {\ell}^{2}}{\tan k}}}{\left(t \cdot \sqrt[3]{\sin k}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+87}:\\ \;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot \sqrt[3]{\sin k}\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot {\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 83.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_2 := t\_m \cdot \sqrt[3]{\sin k}\\
t_3 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\
t_4 := \frac{\sqrt[3]{{\ell}^{2} \cdot \frac{2}{\tan k}}}{t\_2}\\
t_5 := \frac{\ell}{t\_3}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.6 \cdot 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\

\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{{t\_4}^{2}}{t\_3} \cdot \frac{t\_4}{t\_3}\\

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

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


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

    1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999991e-200 < t < 5.4999999999999998e-104

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

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

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

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

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

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

    if 5.4999999999999998e-104 < t < 9.2000000000000007e87

    1. Initial program 61.9%

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified76.6%

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

    if 9.2000000000000007e87 < t

    1. Initial program 60.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. Simplified60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\color{blue}{\tan k} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)} \]
      4. unpow293.5%

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\sqrt[3]{\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}} \cdot \sqrt[3]{\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right) \cdot \sqrt[3]{\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}}^{3} \cdot \left(\tan k \cdot {\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}\right)} \]
      2. add-cube-cbrt93.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.6 \cdot 10^{-200}:\\ \;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-104}:\\ \;\;\;\;\frac{{\left(\frac{\sqrt[3]{{\ell}^{2} \cdot \frac{2}{\tan k}}}{t \cdot \sqrt[3]{\sin k}}\right)}^{2}}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \frac{\frac{\sqrt[3]{{\ell}^{2} \cdot \frac{2}{\tan k}}}{t \cdot \sqrt[3]{\sin k}}}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+87}:\\ \;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot \sqrt[3]{\sin k}\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot {\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 84.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_2 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\
t_3 := \frac{\ell}{t\_2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.95 \cdot 10^{-255}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\

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

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

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


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

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.95e-255 < t < 5.4999999999999998e-104

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

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

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

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

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

    if 5.4999999999999998e-104 < t < 2.79999999999999989e88

    1. Initial program 61.9%

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified76.6%

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

    if 2.79999999999999989e88 < t

    1. Initial program 60.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. Simplified60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\color{blue}{\tan k} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)} \]
      4. unpow293.5%

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\sqrt[3]{\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}} \cdot \sqrt[3]{\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right) \cdot \sqrt[3]{\frac{\sqrt[3]{\sin k} \cdot t}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}}^{3} \cdot \left(\tan k \cdot {\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}\right)} \]
      2. add-cube-cbrt93.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.95 \cdot 10^{-255}:\\ \;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-104}:\\ \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+88}:\\ \;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot \sqrt[3]{\sin k}\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3} \cdot \left(\tan k \cdot {\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 84.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_2 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.6 \cdot 10^{-253}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\

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

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

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


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

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.60000000000000011e-253 < t < 5.4999999999999998e-104

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

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

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

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

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

    if 5.4999999999999998e-104 < t < 2.85000000000000011e88

    1. Initial program 61.9%

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified76.6%

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

    if 2.85000000000000011e88 < t

    1. Initial program 60.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. Simplified60.2%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.6 \cdot 10^{-253}:\\ \;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-104}:\\ \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t \leq 2.85 \cdot 10^{+88}:\\ \;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 77.9% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;t\_m \leq 28000000000000:\\
\;\;\;\;\left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\right) \cdot \frac{t\_m \cdot \ell}{k}\\

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


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

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8600000000000001e-252 < t < 5.4999999999999998e-104

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

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

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

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

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

    if 5.4999999999999998e-104 < t < 2.8e13

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

    if 2.8e13 < t

    1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.86 \cdot 10^{-252}:\\ \;\;\;\;{\left(\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-104}:\\ \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(t \cdot {\sin k}^{2}\right)}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t \leq 28000000000000:\\ \;\;\;\;\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{t \cdot \ell}{k}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 76.0% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9999999999999999e-19 < k < 1.10000000000000003e189

    1. Initial program 51.6%

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

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

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

    if 1.10000000000000003e189 < k

    1. Initial program 36.6%

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified68.4%

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

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

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

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

        \[\leadsto \left(\frac{2}{k} \cdot \color{blue}{\left(\frac{\ell}{{t}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    10. Simplified41.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 4 \cdot 10^{-19}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\ \mathbf{elif}\;k \leq 1.1 \cdot 10^{+189}:\\ \;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{\left(t \cdot {\sin k}^{2}\right) \cdot {k}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \left(\frac{2}{k} \cdot \left(\frac{\ell}{{t}^{2}} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 75.9% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;k \leq 3.5 \cdot 10^{+264}:\\
\;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)} \cdot \left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \frac{t\_m}{k}\right)\right)\\

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


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

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.50000000000000015e-19 < k < 1.2e189

    1. Initial program 51.6%

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

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

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

    if 1.2e189 < k < 3.49999999999999987e264

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified77.9%

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

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

        \[\leadsto \left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \color{blue}{\left(\ell \cdot \frac{t}{k}\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    10. Simplified40.6%

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

    if 3.49999999999999987e264 < k

    1. Initial program 28.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.5 \cdot 10^{-19}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\ \mathbf{elif}\;k \leq 1.2 \cdot 10^{+189}:\\ \;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{\left(t \cdot {\sin k}^{2}\right) \cdot {k}^{2}}\\ \mathbf{elif}\;k \leq 3.5 \cdot 10^{+264}:\\ \;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \frac{t}{k}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 75.9% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;k \leq 9.5 \cdot 10^{+265}:\\
\;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)} \cdot \left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \frac{t\_m}{k}\right)\right)\\

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


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

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.30000000000000006e-19 < k < 1.40000000000000003e189

    1. Initial program 51.6%

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

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

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

    if 1.40000000000000003e189 < k < 9.4999999999999993e265

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{2}{\color{blue}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    7. Simplified77.9%

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

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

        \[\leadsto \left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \color{blue}{\left(\ell \cdot \frac{t}{k}\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
    10. Simplified40.6%

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

    if 9.4999999999999993e265 < k

    1. Initial program 28.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.3 \cdot 10^{-19}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\ \mathbf{elif}\;k \leq 1.4 \cdot 10^{+189}:\\ \;\;\;\;2 \cdot \frac{\cos k \cdot {\ell}^{2}}{\left(t \cdot {\sin k}^{2}\right) \cdot {k}^{2}}\\ \mathbf{elif}\;k \leq 9.5 \cdot 10^{+265}:\\ \;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \left(\ell \cdot \frac{t}{k}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 79.4% accurate, 0.8× speedup?

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

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

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

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

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


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

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.00000000000000002e-255 < t < 7.3999999999999997e-26

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

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

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

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

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

    if 7.3999999999999997e-26 < t < 5.60000000000000037e102

    1. Initial program 60.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. Simplified63.5%

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

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

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

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

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

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

    if 5.60000000000000037e102 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 75.8% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.70000000000000001e-18 < k

    1. Initial program 46.3%

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

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

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

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

Alternative 11: 75.8% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6500000000000001e-18 < k

    1. Initial program 46.3%

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

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

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

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

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

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

Alternative 12: 79.3% accurate, 0.8× speedup?

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

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

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

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

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


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

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.0000000000000001e-255 < t < 2.15000000000000019e-22

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

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

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

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

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

    if 2.15000000000000019e-22 < t < 5.60000000000000037e102

    1. Initial program 60.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. Simplified63.5%

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

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

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

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

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

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

    if 5.60000000000000037e102 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 79.3% accurate, 0.8× speedup?

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

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

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

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

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


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

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.79999999999999922e-255 < t < 3.09999999999999995e-25

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

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

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

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

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

    if 3.09999999999999995e-25 < t < 5.60000000000000037e102

    1. Initial program 60.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. Simplified63.5%

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

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

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

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

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

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

    if 5.60000000000000037e102 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 78.9% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 47.0%

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

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

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

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

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

    if 5.7999999999999996e-26 < t < 5.60000000000000037e102

    1. Initial program 60.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. Simplified63.5%

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

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

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

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

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

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

    if 5.60000000000000037e102 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 73.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1999999999999999e-29 < k

    1. Initial program 46.3%

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

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

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

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

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

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

Alternative 16: 70.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.70000000000000001e-18 < k

    1. Initial program 46.3%

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

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

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

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

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

Alternative 17: 69.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000007e-63 < k

    1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 68.4% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

    if 1.60000000000000011e-62 < k

    1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{\frac{k}{{\ell}^{2}}} \cdot t\right)}}^{3} \cdot \left(2 \cdot k\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.6 \cdot 10^{-62}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\sqrt{2} \cdot k\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 68.5% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.8 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\sqrt{2} \cdot k\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.8e-35)
    (/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* (sqrt 2.0) k)) 2.0))
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.8e-35) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (sqrt(2.0) * k)), 2.0);
	} else {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 1.8d-35) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (sqrt(2.0d0) * k)) ** 2.0d0)
    else
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (l ** 2.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.8e-35) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.sqrt(2.0) * k)), 2.0);
	} else {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 1.8e-35:
		tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (math.sqrt(2.0) * k)), 2.0)
	else:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * math.pow(l, 2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 1.8e-35)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(sqrt(2.0) * k)) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 1.8e-35)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) * (sqrt(2.0) * k)) ^ 2.0);
	else
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (l ^ 2.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.8e-35], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.8 \cdot 10^{-35}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\sqrt{2} \cdot k\right)\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.80000000000000009e-35

    1. Initial program 52.1%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified52.7%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 52.7%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. unpow258.9%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left(k \cdot k\right)} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
    6. Applied egg-rr52.7%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
    7. Applied egg-rr37.3%

      \[\leadsto \color{blue}{2 \cdot \frac{1}{{\left(\left(k \cdot \sqrt{2}\right) \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. associate-*r/37.3%

        \[\leadsto \color{blue}{\frac{2 \cdot 1}{{\left(\left(k \cdot \sqrt{2}\right) \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2}}} \]
      2. metadata-eval37.3%

        \[\leadsto \frac{\color{blue}{2}}{{\left(\left(k \cdot \sqrt{2}\right) \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2}} \]
      3. *-commutative37.3%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}}^{2}} \]
    9. Simplified37.3%

      \[\leadsto \color{blue}{\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}} \]

    if 1.80000000000000009e-35 < k

    1. Initial program 46.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified46.3%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 62.3%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Taylor expanded in k around 0 51.4%

      \[\leadsto \frac{2}{\frac{\color{blue}{{k}^{4} \cdot t}}{{\ell}^{2} \cdot \cos k}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.8 \cdot 10^{-35}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\sqrt{2} \cdot k\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 62.3% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.4 \cdot 10^{-63}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t\_m}^{3}}{{\ell}^{2}}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 2.4e-63)
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0))))
    (/ 2.0 (* (* 2.0 k) (/ (* k (pow t_m 3.0)) (pow l 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.4e-63) {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * ((k * pow(t_m, 3.0)) / pow(l, 2.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 2.4d-63) then
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (l ** 2.0d0)))
    else
        tmp = 2.0d0 / ((2.0d0 * k) * ((k * (t_m ** 3.0d0)) / (l ** 2.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.4e-63) {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * ((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 2.4e-63:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * math.pow(l, 2.0)))
	else:
		tmp = 2.0 / ((2.0 * k) * ((k * math.pow(t_m, 3.0)) / math.pow(l, 2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 2.4e-63)
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 2.4e-63)
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (l ^ 2.0)));
	else
		tmp = 2.0 / ((2.0 * k) * ((k * (t_m ^ 3.0)) / (l ^ 2.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.4e-63], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.4 \cdot 10^{-63}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t\_m}^{3}}{{\ell}^{2}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.4000000000000001e-63

    1. Initial program 46.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified46.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 62.3%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Taylor expanded in k around 0 50.8%

      \[\leadsto \frac{2}{\frac{\color{blue}{{k}^{4} \cdot t}}{{\ell}^{2} \cdot \cos k}} \]

    if 2.4000000000000001e-63 < t

    1. Initial program 61.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified61.7%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-cube-cbrt61.7%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right) \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow361.7%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. associate-/r*68.7%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}} \cdot \sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      4. *-commutative68.7%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\sin k \cdot \frac{\frac{{t}^{3}}{\ell}}{\ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. cbrt-prod68.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\frac{\frac{{t}^{3}}{\ell}}{\ell}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      6. associate-/r*61.7%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      7. cbrt-div63.0%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \color{blue}{\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      8. rem-cbrt-cube68.4%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{\color{blue}{t}}{\sqrt[3]{\ell \cdot \ell}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      9. cbrt-prod84.6%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      10. pow284.6%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr84.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    6. Taylor expanded in k around 0 69.9%

      \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \color{blue}{\left(2 \cdot k\right)}} \]
    7. Taylor expanded in k around 0 60.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \left(2 \cdot k\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification53.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.4 \cdot 10^{-63}:\\ \;\;\;\;\frac{2}{\frac{t \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t}^{3}}{{\ell}^{2}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 61.5% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-104}:\\ \;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t\_m}^{3}}{{\ell}^{2}}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 5.5e-104)
    (/ 2.0 (* (pow k 4.0) (/ t_m (pow l 2.0))))
    (/ 2.0 (* (* 2.0 k) (/ (* k (pow t_m 3.0)) (pow l 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 5.5e-104) {
		tmp = 2.0 / (pow(k, 4.0) * (t_m / pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * ((k * pow(t_m, 3.0)) / pow(l, 2.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 5.5d-104) then
        tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (l ** 2.0d0)))
    else
        tmp = 2.0d0 / ((2.0d0 * k) * ((k * (t_m ** 3.0d0)) / (l ** 2.0d0)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 5.5e-104) {
		tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * k) * ((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 5.5e-104:
		tmp = 2.0 / (math.pow(k, 4.0) * (t_m / math.pow(l, 2.0)))
	else:
		tmp = 2.0 / ((2.0 * k) * ((k * math.pow(t_m, 3.0)) / math.pow(l, 2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 5.5e-104)
		tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 5.5e-104)
		tmp = 2.0 / ((k ^ 4.0) * (t_m / (l ^ 2.0)));
	else
		tmp = 2.0 / ((2.0 * k) * ((k * (t_m ^ 3.0)) / (l ^ 2.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.5e-104], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t\_m}^{3}}{{\ell}^{2}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 5.4999999999999998e-104

    1. Initial program 45.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. Simplified45.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 62.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Taylor expanded in k around 0 49.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    6. Step-by-step derivation
      1. associate-/l*50.0%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    7. Simplified50.0%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]

    if 5.4999999999999998e-104 < t

    1. Initial program 61.1%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified61.1%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-cube-cbrt61.1%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right) \cdot \sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      2. pow361.1%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. associate-/r*68.5%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}} \cdot \sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      4. *-commutative68.5%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\sin k \cdot \frac{\frac{{t}^{3}}{\ell}}{\ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      5. cbrt-prod68.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\frac{\frac{{t}^{3}}{\ell}}{\ell}}\right)}}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      6. associate-/r*61.0%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      7. cbrt-div62.2%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \color{blue}{\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{\ell \cdot \ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      8. rem-cbrt-cube67.0%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{\color{blue}{t}}{\sqrt[3]{\ell \cdot \ell}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      9. cbrt-prod82.6%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{\sqrt[3]{\ell} \cdot \sqrt[3]{\ell}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      10. pow282.6%

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{\color{blue}{{\left(\sqrt[3]{\ell}\right)}^{2}}}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    5. Applied egg-rr82.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}} \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    6. Taylor expanded in k around 0 66.3%

      \[\leadsto \frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \color{blue}{\left(2 \cdot k\right)}} \]
    7. Taylor expanded in k around 0 59.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \left(2 \cdot k\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.5 \cdot 10^{-104}:\\ \;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t}^{3}}{{\ell}^{2}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 60.6% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.02 \cdot 10^{-86}:\\ \;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left({t\_m}^{2} \cdot \frac{1}{\ell}\right) \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.02e-86)
    (/ 2.0 (* (pow k 4.0) (/ t_m (pow l 2.0))))
    (/ 2.0 (* (* (* (pow t_m 2.0) (/ 1.0 l)) (/ t_m l)) (* 2.0 (* k k)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 1.02e-86) {
		tmp = 2.0 / (pow(k, 4.0) * (t_m / pow(l, 2.0)));
	} else {
		tmp = 2.0 / (((pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 1.02d-86) then
        tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (l ** 2.0d0)))
    else
        tmp = 2.0d0 / ((((t_m ** 2.0d0) * (1.0d0 / l)) * (t_m / l)) * (2.0d0 * (k * k)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 1.02e-86) {
		tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 1.02e-86:
		tmp = 2.0 / (math.pow(k, 4.0) * (t_m / math.pow(l, 2.0)))
	else:
		tmp = 2.0 / (((math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 1.02e-86)
		tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(1.0 / l)) * Float64(t_m / l)) * Float64(2.0 * Float64(k * k))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 1.02e-86)
		tmp = 2.0 / ((k ^ 4.0) * (t_m / (l ^ 2.0)));
	else
		tmp = 2.0 / ((((t_m ^ 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.02e-86], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.02 \cdot 10^{-86}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left({t\_m}^{2} \cdot \frac{1}{\ell}\right) \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.02000000000000005e-86

    1. Initial program 45.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. Simplified45.5%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 62.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Taylor expanded in k around 0 49.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    6. Step-by-step derivation
      1. associate-/l*50.0%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    7. Simplified50.0%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]

    if 1.02000000000000005e-86 < t

    1. Initial program 61.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified62.9%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 55.9%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. unpow254.0%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left(k \cdot k\right)} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
    6. Applied egg-rr55.9%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
    7. Step-by-step derivation
      1. associate-/r*55.3%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
      2. unpow355.3%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
      3. times-frac58.2%

        \[\leadsto \frac{2}{\color{blue}{\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
      4. pow258.2%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
    8. Applied egg-rr58.2%

      \[\leadsto \frac{2}{\color{blue}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
    9. Step-by-step derivation
      1. div-inv58.2%

        \[\leadsto \frac{2}{\left(\color{blue}{\left({t}^{2} \cdot \frac{1}{\ell}\right)} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
    10. Applied egg-rr58.2%

      \[\leadsto \frac{2}{\left(\color{blue}{\left({t}^{2} \cdot \frac{1}{\ell}\right)} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 23: 57.5% accurate, 3.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\left(\left({t\_m}^{2} \cdot \frac{1}{\ell}\right) \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (* (* (pow t_m 2.0) (/ 1.0 l)) (/ t_m l)) (* 2.0 (* k k))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (((pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / ((((t_m ** 2.0d0) * (1.0d0 / l)) * (t_m / l)) * (2.0d0 * (k * k))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (((Math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / (((math.pow(t_m, 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(1.0 / l)) * Float64(t_m / l)) * Float64(2.0 * Float64(k * k)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / ((((t_m ^ 2.0) * (1.0 / l)) * (t_m / l)) * (2.0 * (k * k))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{\left(\left({t\_m}^{2} \cdot \frac{1}{\ell}\right) \cdot \frac{t\_m}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)}
\end{array}
Derivation
  1. Initial program 50.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. Simplified53.0%

    \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in k around 0 50.8%

    \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
  5. Step-by-step derivation
    1. unpow259.8%

      \[\leadsto \frac{2}{\frac{\color{blue}{\left(k \cdot k\right)} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
  6. Applied egg-rr50.8%

    \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
  7. Step-by-step derivation
    1. associate-/r*49.1%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
    2. unpow349.0%

      \[\leadsto \frac{2}{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
    3. times-frac53.2%

      \[\leadsto \frac{2}{\color{blue}{\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
    4. pow253.2%

      \[\leadsto \frac{2}{\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  8. Applied egg-rr53.2%

    \[\leadsto \frac{2}{\color{blue}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  9. Step-by-step derivation
    1. div-inv53.2%

      \[\leadsto \frac{2}{\left(\color{blue}{\left({t}^{2} \cdot \frac{1}{\ell}\right)} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  10. Applied egg-rr53.2%

    \[\leadsto \frac{2}{\left(\color{blue}{\left({t}^{2} \cdot \frac{1}{\ell}\right)} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  11. Add Preprocessing

Alternative 24: 57.5% accurate, 24.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (* (/ t_m l) (/ (* t_m t_m) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * Float64(Float64(t_m * t_m) / l)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}
\end{array}
Derivation
  1. Initial program 50.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. Simplified53.0%

    \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in k around 0 50.8%

    \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
  5. Step-by-step derivation
    1. unpow259.8%

      \[\leadsto \frac{2}{\frac{\color{blue}{\left(k \cdot k\right)} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
  6. Applied egg-rr50.8%

    \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
  7. Step-by-step derivation
    1. associate-/r*49.1%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
    2. unpow349.0%

      \[\leadsto \frac{2}{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
    3. times-frac53.2%

      \[\leadsto \frac{2}{\color{blue}{\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
    4. pow253.2%

      \[\leadsto \frac{2}{\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  8. Applied egg-rr53.2%

    \[\leadsto \frac{2}{\color{blue}{\left(\frac{{t}^{2}}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  9. Step-by-step derivation
    1. unpow253.2%

      \[\leadsto \frac{2}{\left(\frac{\color{blue}{t \cdot t}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  10. Applied egg-rr53.2%

    \[\leadsto \frac{2}{\left(\frac{\color{blue}{t \cdot t}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
  11. Final simplification53.2%

    \[\leadsto \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t}{\ell} \cdot \frac{t \cdot t}{\ell}\right)} \]
  12. Add Preprocessing

Reproduce

?
herbie shell --seed 2024149 
(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))))