Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.0% → 89.6%
Time: 22.0s
Alternatives: 20
Speedup: 2.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 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: 54.0% accurate, 1.0× speedup?

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

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

Alternative 1: 89.6% 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 5.1 \cdot 10^{-11}:\\ \;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right) \cdot \left(\tan k \cdot {\left(\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m}}\right)}^{3}\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 5.1e-11)
    (* (/ (cos k) t_m) (pow (/ (* l (sqrt 2.0)) (* k (sin k))) 2.0))
    (/
     2.0
     (*
      (+ 2.0 (pow (/ k t_m) 2.0))
      (* (tan k) (pow (/ (cbrt (sin k)) (/ (pow (cbrt l) 2.0) t_m)) 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.1e-11) {
		tmp = (cos(k) / t_m) * pow(((l * sqrt(2.0)) / (k * sin(k))), 2.0);
	} else {
		tmp = 2.0 / ((2.0 + pow((k / t_m), 2.0)) * (tan(k) * pow((cbrt(sin(k)) / (pow(cbrt(l), 2.0) / t_m)), 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.1e-11) {
		tmp = (Math.cos(k) / t_m) * Math.pow(((l * Math.sqrt(2.0)) / (k * Math.sin(k))), 2.0);
	} else {
		tmp = 2.0 / ((2.0 + Math.pow((k / t_m), 2.0)) * (Math.tan(k) * Math.pow((Math.cbrt(Math.sin(k)) / (Math.pow(Math.cbrt(l), 2.0) / t_m)), 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.1e-11)
		tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(tan(k) * (Float64(cbrt(sin(k)) / Float64((cbrt(l) ^ 2.0) / t_m)) ^ 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.1e-11], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] / N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.1 \cdot 10^{-11}:\\
\;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\

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


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

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left({\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\right)} - 1} \]
      3. *-commutative37.6%

        \[\leadsto e^{\mathsf{log1p}\left({\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}}^{2}\right)} - 1 \]
      4. unpow-prod-down37.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{\frac{\cos k}{t}}\right)}^{2} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}}\right)} - 1 \]
      5. pow237.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \sqrt{\frac{\cos k}{t}}\right)} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
      6. add-sqr-sqrt51.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cos k}{t}} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
    9. Applied egg-rr51.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def54.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)\right)} \]
      2. expm1-log1p78.9%

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

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

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

    if 5.09999999999999984e-11 < t

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.1 \cdot 10^{-11}:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\tan k \cdot {\left(\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}\right)}^{3}\right)}\\ \end{array} \]

Alternative 2: 82.5% 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 := 1 + \left({\left(\frac{k}{t_m}\right)}^{2} + 1\right)\\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_2 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\ \;\;\;\;\frac{2}{t_2 \cdot \left(\tan k \cdot \frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0))))
   (*
    t_s
    (if (<= (* t_2 (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))) INFINITY)
      (/ 2.0 (* t_2 (* (tan k) (/ (* (sin k) (/ (pow t_m 3.0) l)) l))))
      (* (/ (cos k) t_m) (pow (/ (* l (sqrt 2.0)) (* k (sin k))) 2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = 1.0 + (pow((k / t_m), 2.0) + 1.0);
	double tmp;
	if ((t_2 * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))))) <= ((double) INFINITY)) {
		tmp = 2.0 / (t_2 * (tan(k) * ((sin(k) * (pow(t_m, 3.0) / l)) / l)));
	} else {
		tmp = (cos(k) / t_m) * pow(((l * sqrt(2.0)) / (k * sin(k))), 2.0);
	}
	return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = 1.0 + (Math.pow((k / t_m), 2.0) + 1.0);
	double tmp;
	if ((t_2 * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))))) <= Double.POSITIVE_INFINITY) {
		tmp = 2.0 / (t_2 * (Math.tan(k) * ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / l)));
	} else {
		tmp = (Math.cos(k) / t_m) * Math.pow(((l * Math.sqrt(2.0)) / (k * Math.sin(k))), 2.0);
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	t_2 = 1.0 + (math.pow((k / t_m), 2.0) + 1.0)
	tmp = 0
	if (t_2 * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))) <= math.inf:
		tmp = 2.0 / (t_2 * (math.tan(k) * ((math.sin(k) * (math.pow(t_m, 3.0) / l)) / l)))
	else:
		tmp = (math.cos(k) / t_m) * math.pow(((l * math.sqrt(2.0)) / (k * math.sin(k))), 2.0)
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))
	tmp = 0.0
	if (Float64(t_2 * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) <= Inf)
		tmp = Float64(2.0 / Float64(t_2 * Float64(tan(k) * Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / l))));
	else
		tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = 1.0 + (((k / t_m) ^ 2.0) + 1.0);
	tmp = 0.0;
	if ((t_2 * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l))))) <= Inf)
		tmp = 2.0 / (t_2 * (tan(k) * ((sin(k) * ((t_m ^ 3.0) / l)) / l)));
	else
		tmp = (cos(k) / t_m) * (((l * sqrt(2.0)) / (k * sin(k))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(t$95$2 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 / N[(t$95$2 * N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.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 := 1 + \left({\left(\frac{k}{t_m}\right)}^{2} + 1\right)\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_2 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\
\;\;\;\;\frac{2}{t_2 \cdot \left(\tan k \cdot \frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\ell}\right)}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < +inf.0

    1. Initial program 83.4%

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left({\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\right)} - 1} \]
      3. *-commutative43.7%

        \[\leadsto e^{\mathsf{log1p}\left({\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}}^{2}\right)} - 1 \]
      4. unpow-prod-down43.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{\frac{\cos k}{t}}\right)}^{2} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}}\right)} - 1 \]
      5. pow243.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \sqrt{\frac{\cos k}{t}}\right)} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
      6. add-sqr-sqrt52.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cos k}{t}} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
    9. Applied egg-rr52.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def59.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\ \;\;\;\;\frac{2}{\left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right) \cdot \left(\tan k \cdot \frac{\sin k \cdot \frac{{t}^{3}}{\ell}}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \]

Alternative 3: 82.6% 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 := {\left(\frac{k}{t_m}\right)}^{2}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;\left(1 + \left(t_2 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \frac{t_m \cdot \frac{{t_m}^{2}}{\ell}}{\ell}\right) \cdot \left(\left(2 + t_2\right) \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (pow (/ k t_m) 2.0)))
   (*
    t_s
    (if (<=
         (*
          (+ 1.0 (+ t_2 1.0))
          (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))
         INFINITY)
      (/
       2.0
       (*
        (* (sin k) (/ (* t_m (/ (pow t_m 2.0) l)) l))
        (* (+ 2.0 t_2) (tan k))))
      (* (/ (cos k) t_m) (pow (/ (* l (sqrt 2.0)) (* k (sin k))) 2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = pow((k / t_m), 2.0);
	double tmp;
	if (((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))))) <= ((double) INFINITY)) {
		tmp = 2.0 / ((sin(k) * ((t_m * (pow(t_m, 2.0) / l)) / l)) * ((2.0 + t_2) * tan(k)));
	} else {
		tmp = (cos(k) / t_m) * pow(((l * sqrt(2.0)) / (k * sin(k))), 2.0);
	}
	return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = Math.pow((k / t_m), 2.0);
	double tmp;
	if (((1.0 + (t_2 + 1.0)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))))) <= Double.POSITIVE_INFINITY) {
		tmp = 2.0 / ((Math.sin(k) * ((t_m * (Math.pow(t_m, 2.0) / l)) / l)) * ((2.0 + t_2) * Math.tan(k)));
	} else {
		tmp = (Math.cos(k) / t_m) * Math.pow(((l * Math.sqrt(2.0)) / (k * Math.sin(k))), 2.0);
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	t_2 = math.pow((k / t_m), 2.0)
	tmp = 0
	if ((1.0 + (t_2 + 1.0)) * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))) <= math.inf:
		tmp = 2.0 / ((math.sin(k) * ((t_m * (math.pow(t_m, 2.0) / l)) / l)) * ((2.0 + t_2) * math.tan(k)))
	else:
		tmp = (math.cos(k) / t_m) * math.pow(((l * math.sqrt(2.0)) / (k * math.sin(k))), 2.0)
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(k / t_m) ^ 2.0
	tmp = 0.0
	if (Float64(Float64(1.0 + Float64(t_2 + 1.0)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) <= Inf)
		tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64(t_m * Float64((t_m ^ 2.0) / l)) / l)) * Float64(Float64(2.0 + t_2) * tan(k))));
	else
		tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = (k / t_m) ^ 2.0;
	tmp = 0.0;
	if (((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l))))) <= Inf)
		tmp = 2.0 / ((sin(k) * ((t_m * ((t_m ^ 2.0) / l)) / l)) * ((2.0 + t_2) * tan(k)));
	else
		tmp = (cos(k) / t_m) * (((l * sqrt(2.0)) / (k * sin(k))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(t$95$m * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 + t$95$2), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.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 := {\left(\frac{k}{t_m}\right)}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\left(1 + \left(t_2 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \frac{t_m \cdot \frac{{t_m}^{2}}{\ell}}{\ell}\right) \cdot \left(\left(2 + t_2\right) \cdot \tan k\right)}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < +inf.0

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left({\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\right)} - 1} \]
      3. *-commutative43.7%

        \[\leadsto e^{\mathsf{log1p}\left({\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}}^{2}\right)} - 1 \]
      4. unpow-prod-down43.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{\frac{\cos k}{t}}\right)}^{2} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}}\right)} - 1 \]
      5. pow243.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \sqrt{\frac{\cos k}{t}}\right)} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
      6. add-sqr-sqrt52.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cos k}{t}} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
    9. Applied egg-rr52.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def59.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \frac{t \cdot \frac{{t}^{2}}{\ell}}{\ell}\right) \cdot \left(\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \]

Alternative 4: 82.4% 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 := {\left(\frac{k}{t_m}\right)}^{2}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;\left(1 + \left(t_2 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\ \;\;\;\;\frac{2}{\left(2 + t_2\right) \cdot \left(\tan k \cdot \left(\frac{{t_m}^{3}}{\ell} \cdot \frac{\sin k}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (pow (/ k t_m) 2.0)))
   (*
    t_s
    (if (<=
         (*
          (+ 1.0 (+ t_2 1.0))
          (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))
         INFINITY)
      (/ 2.0 (* (+ 2.0 t_2) (* (tan k) (* (/ (pow t_m 3.0) l) (/ (sin k) l)))))
      (* (/ (cos k) t_m) (pow (/ (* l (sqrt 2.0)) (* k (sin k))) 2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = pow((k / t_m), 2.0);
	double tmp;
	if (((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))))) <= ((double) INFINITY)) {
		tmp = 2.0 / ((2.0 + t_2) * (tan(k) * ((pow(t_m, 3.0) / l) * (sin(k) / l))));
	} else {
		tmp = (cos(k) / t_m) * pow(((l * sqrt(2.0)) / (k * sin(k))), 2.0);
	}
	return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = Math.pow((k / t_m), 2.0);
	double tmp;
	if (((1.0 + (t_2 + 1.0)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))))) <= Double.POSITIVE_INFINITY) {
		tmp = 2.0 / ((2.0 + t_2) * (Math.tan(k) * ((Math.pow(t_m, 3.0) / l) * (Math.sin(k) / l))));
	} else {
		tmp = (Math.cos(k) / t_m) * Math.pow(((l * Math.sqrt(2.0)) / (k * Math.sin(k))), 2.0);
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	t_2 = math.pow((k / t_m), 2.0)
	tmp = 0
	if ((1.0 + (t_2 + 1.0)) * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))) <= math.inf:
		tmp = 2.0 / ((2.0 + t_2) * (math.tan(k) * ((math.pow(t_m, 3.0) / l) * (math.sin(k) / l))))
	else:
		tmp = (math.cos(k) / t_m) * math.pow(((l * math.sqrt(2.0)) / (k * math.sin(k))), 2.0)
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(k / t_m) ^ 2.0
	tmp = 0.0
	if (Float64(Float64(1.0 + Float64(t_2 + 1.0)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) <= Inf)
		tmp = Float64(2.0 / Float64(Float64(2.0 + t_2) * Float64(tan(k) * Float64(Float64((t_m ^ 3.0) / l) * Float64(sin(k) / l)))));
	else
		tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = (k / t_m) ^ 2.0;
	tmp = 0.0;
	if (((1.0 + (t_2 + 1.0)) * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l))))) <= Inf)
		tmp = 2.0 / ((2.0 + t_2) * (tan(k) * (((t_m ^ 3.0) / l) * (sin(k) / l))));
	else
		tmp = (cos(k) / t_m) * (((l * sqrt(2.0)) / (k * sin(k))) ^ 2.0);
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 / N[(N[(2.0 + t$95$2), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.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 := {\left(\frac{k}{t_m}\right)}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\left(1 + \left(t_2 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\
\;\;\;\;\frac{2}{\left(2 + t_2\right) \cdot \left(\tan k \cdot \left(\frac{{t_m}^{3}}{\ell} \cdot \frac{\sin k}{\ell}\right)\right)}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < +inf.0

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left({\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\right)} - 1} \]
      3. *-commutative43.7%

        \[\leadsto e^{\mathsf{log1p}\left({\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}}^{2}\right)} - 1 \]
      4. unpow-prod-down43.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{\frac{\cos k}{t}}\right)}^{2} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}}\right)} - 1 \]
      5. pow243.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \sqrt{\frac{\cos k}{t}}\right)} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
      6. add-sqr-sqrt52.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cos k}{t}} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
    9. Applied egg-rr52.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def59.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \leq \infty:\\ \;\;\;\;\frac{2}{\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\tan k \cdot \left(\frac{{t}^{3}}{\ell} \cdot \frac{\sin k}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \]

Alternative 5: 86.8% accurate, 0.7× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 7.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right) \cdot \left(\tan k \cdot \frac{\sin k}{{\left(\sqrt[3]{\ell} \cdot \frac{\sqrt[3]{\ell}}{t_m}\right)}^{3}}\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 7.8e-11)
    (* (/ (cos k) t_m) (pow (/ (* l (sqrt 2.0)) (* k (sin k))) 2.0))
    (/
     2.0
     (*
      (+ 2.0 (pow (/ k t_m) 2.0))
      (* (tan k) (/ (sin k) (pow (* (cbrt l) (/ (cbrt l) t_m)) 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 <= 7.8e-11) {
		tmp = (cos(k) / t_m) * pow(((l * sqrt(2.0)) / (k * sin(k))), 2.0);
	} else {
		tmp = 2.0 / ((2.0 + pow((k / t_m), 2.0)) * (tan(k) * (sin(k) / pow((cbrt(l) * (cbrt(l) / t_m)), 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 <= 7.8e-11) {
		tmp = (Math.cos(k) / t_m) * Math.pow(((l * Math.sqrt(2.0)) / (k * Math.sin(k))), 2.0);
	} else {
		tmp = 2.0 / ((2.0 + Math.pow((k / t_m), 2.0)) * (Math.tan(k) * (Math.sin(k) / Math.pow((Math.cbrt(l) * (Math.cbrt(l) / t_m)), 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 <= 7.8e-11)
		tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(tan(k) * Float64(sin(k) / (Float64(cbrt(l) * Float64(cbrt(l) / t_m)) ^ 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, 7.8e-11], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[Power[N[(N[Power[l, 1/3], $MachinePrecision] * N[(N[Power[l, 1/3], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 7.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\

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


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

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left({\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\right)} - 1} \]
      3. *-commutative37.6%

        \[\leadsto e^{\mathsf{log1p}\left({\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}}^{2}\right)} - 1 \]
      4. unpow-prod-down37.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{\frac{\cos k}{t}}\right)}^{2} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}}\right)} - 1 \]
      5. pow237.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \sqrt{\frac{\cos k}{t}}\right)} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
      6. add-sqr-sqrt51.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cos k}{t}} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
    9. Applied egg-rr51.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def54.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)\right)} \]
      2. expm1-log1p78.9%

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

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

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

    if 7.80000000000000021e-11 < t

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 7.8 \cdot 10^{-11}:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\tan k \cdot \frac{\sin k}{{\left(\sqrt[3]{\ell} \cdot \frac{\sqrt[3]{\ell}}{t}\right)}^{3}}\right)}\\ \end{array} \]

Alternative 6: 86.8% accurate, 0.7× speedup?

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

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 2.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\

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


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

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left({\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\right)} - 1} \]
      3. *-commutative37.6%

        \[\leadsto e^{\mathsf{log1p}\left({\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}}^{2}\right)} - 1 \]
      4. unpow-prod-down37.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{\frac{\cos k}{t}}\right)}^{2} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}}\right)} - 1 \]
      5. pow237.6%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \sqrt{\frac{\cos k}{t}}\right)} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
      6. add-sqr-sqrt51.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cos k}{t}} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
    9. Applied egg-rr51.5%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1} \]
    10. Step-by-step derivation
      1. expm1-def54.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)\right)} \]
      2. expm1-log1p78.9%

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

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

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

    if 2.1999999999999999e-10 < t

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 85.1% 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 0.085:\\ \;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot {\left({t_m}^{1.5} \cdot \frac{1}{\ell}\right)}^{2}\right)\right) \cdot \left(1 + \left({\left(\frac{k}{t_m}\right)}^{2} + 1\right)\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 0.085)
    (* (/ (cos k) t_m) (pow (* (/ l k) (/ (sqrt 2.0) (sin k))) 2.0))
    (/
     2.0
     (*
      (* (tan k) (* (sin k) (pow (* (pow t_m 1.5) (/ 1.0 l)) 2.0)))
      (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0)))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 0.085) {
		tmp = (cos(k) / t_m) * pow(((l / k) * (sqrt(2.0) / sin(k))), 2.0);
	} else {
		tmp = 2.0 / ((tan(k) * (sin(k) * pow((pow(t_m, 1.5) * (1.0 / l)), 2.0))) * (1.0 + (pow((k / t_m), 2.0) + 1.0)));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 0.085d0) then
        tmp = (cos(k) / t_m) * (((l / k) * (sqrt(2.0d0) / sin(k))) ** 2.0d0)
    else
        tmp = 2.0d0 / ((tan(k) * (sin(k) * (((t_m ** 1.5d0) * (1.0d0 / l)) ** 2.0d0))) * (1.0d0 + (((k / t_m) ** 2.0d0) + 1.0d0)))
    end if
    code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 0.085) {
		tmp = (Math.cos(k) / t_m) * Math.pow(((l / k) * (Math.sqrt(2.0) / Math.sin(k))), 2.0);
	} else {
		tmp = 2.0 / ((Math.tan(k) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) * (1.0 / l)), 2.0))) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0)));
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 0.085:
		tmp = (math.cos(k) / t_m) * math.pow(((l / k) * (math.sqrt(2.0) / math.sin(k))), 2.0)
	else:
		tmp = 2.0 / ((math.tan(k) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) * (1.0 / l)), 2.0))) * (1.0 + (math.pow((k / t_m), 2.0) + 1.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 <= 0.085)
		tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * (Float64((t_m ^ 1.5) * Float64(1.0 / l)) ^ 2.0))) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0))));
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 0.085)
		tmp = (cos(k) / t_m) * (((l / k) * (sqrt(2.0) / sin(k))) ^ 2.0);
	else
		tmp = 2.0 / ((tan(k) * (sin(k) * (((t_m ^ 1.5) * (1.0 / l)) ^ 2.0))) * (1.0 + (((k / t_m) ^ 2.0) + 1.0)));
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 0.085], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.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 0.085:\\
\;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 0.0850000000000000061

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0850000000000000061 < t

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 0.085:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot {\left({t}^{1.5} \cdot \frac{1}{\ell}\right)}^{2}\right)\right) \cdot \left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right)}\\ \end{array} \]

Alternative 8: 85.1% 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 0.09:\\ \;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(1 + \left({\left(\frac{k}{t_m}\right)}^{2} + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot {\left(\frac{{t_m}^{1.5}}{\ell}\right)}^{2}\right)\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 0.09)
    (* (/ (cos k) t_m) (pow (* (/ l k) (/ (sqrt 2.0) (sin k))) 2.0))
    (/
     2.0
     (*
      (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0))
      (* (tan k) (* (sin k) (pow (/ (pow t_m 1.5) 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 <= 0.09) {
		tmp = (cos(k) / t_m) * pow(((l / k) * (sqrt(2.0) / sin(k))), 2.0);
	} else {
		tmp = 2.0 / ((1.0 + (pow((k / t_m), 2.0) + 1.0)) * (tan(k) * (sin(k) * pow((pow(t_m, 1.5) / 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 <= 0.09d0) then
        tmp = (cos(k) / t_m) * (((l / k) * (sqrt(2.0d0) / sin(k))) ** 2.0d0)
    else
        tmp = 2.0d0 / ((1.0d0 + (((k / t_m) ** 2.0d0) + 1.0d0)) * (tan(k) * (sin(k) * (((t_m ** 1.5d0) / 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 <= 0.09) {
		tmp = (Math.cos(k) / t_m) * Math.pow(((l / k) * (Math.sqrt(2.0) / Math.sin(k))), 2.0);
	} else {
		tmp = 2.0 / ((1.0 + (Math.pow((k / t_m), 2.0) + 1.0)) * (Math.tan(k) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / 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 <= 0.09:
		tmp = (math.cos(k) / t_m) * math.pow(((l / k) * (math.sqrt(2.0) / math.sin(k))), 2.0)
	else:
		tmp = 2.0 / ((1.0 + (math.pow((k / t_m), 2.0) + 1.0)) * (math.tan(k) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / 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 <= 0.09)
		tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0)) * Float64(tan(k) * Float64(sin(k) * (Float64((t_m ^ 1.5) / 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 <= 0.09)
		tmp = (cos(k) / t_m) * (((l / k) * (sqrt(2.0) / sin(k))) ^ 2.0);
	else
		tmp = 2.0 / ((1.0 + (((k / t_m) ^ 2.0) + 1.0)) * (tan(k) * (sin(k) * (((t_m ^ 1.5) / 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, 0.09], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 0.09:\\
\;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 0.089999999999999997

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.089999999999999997 < t

    1. Initial program 67.2%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 0.09:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}\right)\right)}\\ \end{array} \]

Alternative 9: 83.0% 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 0.0135:\\ \;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\\ \mathbf{elif}\;t_m \leq 7.8 \cdot 10^{+95}:\\ \;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t_m}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 0.0135)
    (* (/ (cos k) t_m) (pow (* (/ l k) (/ (sqrt 2.0) (sin k))) 2.0))
    (if (<= t_m 7.8e+95)
      (*
       (* l (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0))))
       (/ l (+ 2.0 (pow (/ k t_m) 2.0))))
      (/ (pow l 2.0) (pow (* t_m (pow (cbrt 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 tmp;
	if (t_m <= 0.0135) {
		tmp = (cos(k) / t_m) * pow(((l / k) * (sqrt(2.0) / sin(k))), 2.0);
	} else if (t_m <= 7.8e+95) {
		tmp = (l * ((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0)))) * (l / (2.0 + pow((k / t_m), 2.0)));
	} else {
		tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(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 tmp;
	if (t_m <= 0.0135) {
		tmp = (Math.cos(k) / t_m) * Math.pow(((l / k) * (Math.sqrt(2.0) / Math.sin(k))), 2.0);
	} else if (t_m <= 7.8e+95) {
		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 = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(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)
	tmp = 0.0
	if (t_m <= 0.0135)
		tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k))) ^ 2.0));
	elseif (t_m <= 7.8e+95)
		tmp = Float64(Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))));
	else
		tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(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_] := N[(t$95$s * If[LessEqual[t$95$m, 0.0135], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.8e+95], N[(N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 0.0135:\\
\;\;\;\;\frac{\cos k}{t_m} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\\

\mathbf{elif}\;t_m \leq 7.8 \cdot 10^{+95}:\\
\;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t_m}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 0.0134999999999999998

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0134999999999999998 < t < 7.7999999999999994e95

    1. Initial program 82.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. Simplified82.2%

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

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

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

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

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

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

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

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

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

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

    if 7.7999999999999994e95 < 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{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Taylor expanded in k around 0 50.5%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt50.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 0.0135:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+95}:\\ \;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \]

Alternative 10: 70.3% accurate, 1.0× speedup?

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

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


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

    1. Initial program 58.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. Simplified57.2%

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

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

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

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

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

    if 0.0038999999999999998 < k

    1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\frac{\ell \cdot \ell}{\color{blue}{k \cdot k}} \cdot \cos k}} \]
      6. times-frac89.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 0.0039:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k \cdot {\left(\frac{\ell}{k}\right)}^{2}}}\\ \end{array} \]

Alternative 11: 70.3% accurate, 1.0× speedup?

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

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 0.0036:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t_m}^{3}}}\right)}^{2}\\

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


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

    1. Initial program 58.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. Simplified57.2%

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

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

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

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

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

    if 0.0035999999999999999 < k

    1. Initial program 48.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. Simplified45.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left({\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}}^{2}\right)} - 1 \]
      4. unpow-prod-down52.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{\frac{\cos k}{t}}\right)}^{2} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}}\right)} - 1 \]
      5. pow252.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \sqrt{\frac{\cos k}{t}}\right)} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
      6. add-sqr-sqrt72.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cos k}{t}} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
    9. Applied egg-rr72.5%

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)\right)} \]
      2. expm1-log1p89.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 0.0036:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\frac{\ell}{\frac{k \cdot \sin k}{\sqrt{2}}}\right)}^{2}\\ \end{array} \]

Alternative 12: 70.3% accurate, 1.0× speedup?

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

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 0.00096:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t_m}^{3}}}\right)}^{2}\\

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


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

    1. Initial program 58.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. Simplified57.2%

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

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

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

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

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

    if 9.60000000000000024e-4 < k

    1. Initial program 48.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. Simplified45.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left({\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}}^{2}\right)} - 1 \]
      4. unpow-prod-down52.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{{\left(\sqrt{\frac{\cos k}{t}}\right)}^{2} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}}\right)} - 1 \]
      5. pow252.8%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\left(\sqrt{\frac{\cos k}{t}} \cdot \sqrt{\frac{\cos k}{t}}\right)} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
      6. add-sqr-sqrt72.5%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{\cos k}{t}} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)} - 1 \]
    9. Applied egg-rr72.5%

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\cos k}{t} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)}^{2}\right)\right)} \]
      2. expm1-log1p89.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 0.00096:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \]

Alternative 13: 70.6% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 2.6 \cdot 10^{-94}:\\ \;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2}} \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\ \mathbf{elif}\;t_m \leq 7.8 \cdot 10^{+95}:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t_m}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 2.6e-94)
    (pow (* (/ (* l (sqrt 2.0)) (pow k 2.0)) (sqrt (/ 1.0 t_m))) 2.0)
    (if (<= t_m 7.8e+95)
      (pow (* (/ l k) (sqrt (/ 1.0 (pow t_m 3.0)))) 2.0)
      (/ (pow l 2.0) (pow (* t_m (pow (cbrt 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 tmp;
	if (t_m <= 2.6e-94) {
		tmp = pow((((l * sqrt(2.0)) / pow(k, 2.0)) * sqrt((1.0 / t_m))), 2.0);
	} else if (t_m <= 7.8e+95) {
		tmp = pow(((l / k) * sqrt((1.0 / pow(t_m, 3.0)))), 2.0);
	} else {
		tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(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 tmp;
	if (t_m <= 2.6e-94) {
		tmp = Math.pow((((l * Math.sqrt(2.0)) / Math.pow(k, 2.0)) * Math.sqrt((1.0 / t_m))), 2.0);
	} else if (t_m <= 7.8e+95) {
		tmp = Math.pow(((l / k) * Math.sqrt((1.0 / Math.pow(t_m, 3.0)))), 2.0);
	} else {
		tmp = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(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)
	tmp = 0.0
	if (t_m <= 2.6e-94)
		tmp = Float64(Float64(Float64(l * sqrt(2.0)) / (k ^ 2.0)) * sqrt(Float64(1.0 / t_m))) ^ 2.0;
	elseif (t_m <= 7.8e+95)
		tmp = Float64(Float64(l / k) * sqrt(Float64(1.0 / (t_m ^ 3.0)))) ^ 2.0;
	else
		tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(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_] := N[(t$95$s * If[LessEqual[t$95$m, 2.6e-94], N[Power[N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 7.8e+95], N[Power[N[(N[(l / k), $MachinePrecision] * N[Sqrt[N[(1.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{elif}\;t_m \leq 7.8 \cdot 10^{+95}:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t_m}^{3}}}\right)}^{2}\\

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


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

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

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

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

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

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

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

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

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

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

    if 2.59999999999999994e-94 < t < 7.7999999999999994e95

    1. Initial program 72.1%

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

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

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

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

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

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

    if 7.7999999999999994e95 < 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{\frac{2}{\tan k \cdot \left({t}^{3} \cdot \sin k\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Taylor expanded in k around 0 50.5%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. add-cube-cbrt50.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.6 \cdot 10^{-94}:\\ \;\;\;\;{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2}} \cdot \sqrt{\frac{1}{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+95}:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(t \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\ \end{array} \]

Alternative 14: 62.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}\;k \leq 2.4 \cdot 10^{+15}:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t_m}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{{\ell}^{2} \cdot {k}^{-2}}}{t_m}\right)}^{3}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 2.4e+15)
    (pow (* (/ l k) (sqrt (/ 1.0 (pow t_m 3.0)))) 2.0)
    (pow (/ (cbrt (* (pow l 2.0) (pow k -2.0))) t_m) 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 <= 2.4e+15) {
		tmp = pow(((l / k) * sqrt((1.0 / pow(t_m, 3.0)))), 2.0);
	} else {
		tmp = pow((cbrt((pow(l, 2.0) * pow(k, -2.0))) / t_m), 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 <= 2.4e+15) {
		tmp = Math.pow(((l / k) * Math.sqrt((1.0 / Math.pow(t_m, 3.0)))), 2.0);
	} else {
		tmp = Math.pow((Math.cbrt((Math.pow(l, 2.0) * Math.pow(k, -2.0))) / t_m), 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 <= 2.4e+15)
		tmp = Float64(Float64(l / k) * sqrt(Float64(1.0 / (t_m ^ 3.0)))) ^ 2.0;
	else
		tmp = Float64(cbrt(Float64((l ^ 2.0) * (k ^ -2.0))) / t_m) ^ 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, 2.4e+15], N[Power[N[(N[(l / k), $MachinePrecision] * N[Sqrt[N[(1.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[(N[Power[N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.4 \cdot 10^{+15}:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t_m}^{3}}}\right)}^{2}\\

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


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

    1. Initial program 58.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. Simplified57.0%

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

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

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

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

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

    if 2.4e15 < k

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

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

      \[\leadsto \color{blue}{\frac{{\ell}^{2} \cdot \cos k}{{t}^{3} \cdot {\sin k}^{2}}} \]
    4. Step-by-step derivation
      1. associate-/l*38.0%

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

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

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{\frac{{\sin k}^{2}}{\frac{\cos k}{{t}^{3}}}}} \]
    5. Simplified36.4%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{\frac{{\sin k}^{2}}{\frac{\cos k}{{t}^{3}}}}} \]
    6. Taylor expanded in k around 0 37.1%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    7. Step-by-step derivation
      1. associate-/r*38.5%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{2}}}{{t}^{3}}} \]
    8. Simplified38.5%

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{2}}}{{t}^{3}}} \]
    9. Step-by-step derivation
      1. add-cube-cbrt38.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.4 \cdot 10^{+15}:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{{\ell}^{2} \cdot {k}^{-2}}}{t}\right)}^{3}\\ \end{array} \]

Alternative 15: 62.8% 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 3.7 \cdot 10^{+14}:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t_m}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{\frac{{\ell}^{2}}{{k}^{2}}}}{t_m}\right)}^{3}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 3.7e+14)
    (pow (* (/ l k) (sqrt (/ 1.0 (pow t_m 3.0)))) 2.0)
    (pow (/ (cbrt (/ (pow l 2.0) (pow k 2.0))) t_m) 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 <= 3.7e+14) {
		tmp = pow(((l / k) * sqrt((1.0 / pow(t_m, 3.0)))), 2.0);
	} else {
		tmp = pow((cbrt((pow(l, 2.0) / pow(k, 2.0))) / t_m), 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 <= 3.7e+14) {
		tmp = Math.pow(((l / k) * Math.sqrt((1.0 / Math.pow(t_m, 3.0)))), 2.0);
	} else {
		tmp = Math.pow((Math.cbrt((Math.pow(l, 2.0) / Math.pow(k, 2.0))) / t_m), 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 <= 3.7e+14)
		tmp = Float64(Float64(l / k) * sqrt(Float64(1.0 / (t_m ^ 3.0)))) ^ 2.0;
	else
		tmp = Float64(cbrt(Float64((l ^ 2.0) / (k ^ 2.0))) / t_m) ^ 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, 3.7e+14], N[Power[N[(N[(l / k), $MachinePrecision] * N[Sqrt[N[(1.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[(N[Power[N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.7 \cdot 10^{+14}:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t_m}^{3}}}\right)}^{2}\\

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


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

    1. Initial program 58.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. Simplified57.0%

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

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

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

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

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

    if 3.7e14 < k

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.7 \cdot 10^{+14}:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{\frac{{\ell}^{2}}{{k}^{2}}}}{t}\right)}^{3}\\ \end{array} \]

Alternative 16: 62.2% accurate, 1.4× 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 3.7 \cdot 10^{+177}:\\ \;\;\;\;{\left(\frac{\ell}{k}\right)}^{2} \cdot \left(\cos k \cdot {t_m}^{-3}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{2}{t_m}}{{k}^{4}}}{{\ell}^{-2}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 3.7e+177)
    (* (pow (/ l k) 2.0) (* (cos k) (pow t_m -3.0)))
    (/ (/ (/ 2.0 t_m) (pow k 4.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 (k <= 3.7e+177) {
		tmp = pow((l / k), 2.0) * (cos(k) * pow(t_m, -3.0));
	} else {
		tmp = ((2.0 / t_m) / pow(k, 4.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 (k <= 3.7d+177) then
        tmp = ((l / k) ** 2.0d0) * (cos(k) * (t_m ** (-3.0d0)))
    else
        tmp = ((2.0d0 / t_m) / (k ** 4.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 (k <= 3.7e+177) {
		tmp = Math.pow((l / k), 2.0) * (Math.cos(k) * Math.pow(t_m, -3.0));
	} else {
		tmp = ((2.0 / t_m) / Math.pow(k, 4.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 k <= 3.7e+177:
		tmp = math.pow((l / k), 2.0) * (math.cos(k) * math.pow(t_m, -3.0))
	else:
		tmp = ((2.0 / t_m) / math.pow(k, 4.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 (k <= 3.7e+177)
		tmp = Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) * (t_m ^ -3.0)));
	else
		tmp = Float64(Float64(Float64(2.0 / t_m) / (k ^ 4.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 (k <= 3.7e+177)
		tmp = ((l / k) ^ 2.0) * (cos(k) * (t_m ^ -3.0));
	else
		tmp = ((2.0 / t_m) / (k ^ 4.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[k, 3.7e+177], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.7 \cdot 10^{+177}:\\
\;\;\;\;{\left(\frac{\ell}{k}\right)}^{2} \cdot \left(\cos k \cdot {t_m}^{-3}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{t_m}}{{k}^{4}}}{{\ell}^{-2}}\\


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

    1. Initial program 59.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. Simplified56.9%

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

      \[\leadsto \color{blue}{\frac{{\ell}^{2} \cdot \cos k}{{t}^{3} \cdot {\sin k}^{2}}} \]
    4. Step-by-step derivation
      1. associate-/l*49.8%

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

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

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{\frac{{\sin k}^{2}}{\frac{\cos k}{{t}^{3}}}}} \]
    5. Simplified49.3%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{\frac{{\sin k}^{2}}{\frac{\cos k}{{t}^{3}}}}} \]
    6. Taylor expanded in k around 0 51.3%

      \[\leadsto \frac{{\ell}^{2}}{\frac{\color{blue}{{k}^{2}}}{\frac{\cos k}{{t}^{3}}}} \]
    7. Step-by-step derivation
      1. expm1-log1p-u37.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{\frac{{k}^{2}}{\frac{\cos k}{{t}^{3}}}}\right)\right)} \]
      2. expm1-udef37.7%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{\frac{{k}^{2}}{\frac{\cos k}{{t}^{3}}}}\right)} - 1} \]
      3. associate-/r/37.7%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{{t}^{3}}}\right)} - 1 \]
      4. div-inv37.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \color{blue}{\left(\cos k \cdot \frac{1}{{t}^{3}}\right)}\right)} - 1 \]
      5. pow-flip37.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \left(\cos k \cdot \color{blue}{{t}^{\left(-3\right)}}\right)\right)} - 1 \]
      6. metadata-eval37.7%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \left(\cos k \cdot {t}^{\color{blue}{-3}}\right)\right)} - 1 \]
    8. Applied egg-rr37.7%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \left(\cos k \cdot {t}^{-3}\right)\right)} - 1} \]
    9. Step-by-step derivation
      1. expm1-def38.1%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \left(\cos k \cdot {t}^{-3}\right)\right)\right)} \]
      2. expm1-log1p52.6%

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

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

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

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

        \[\leadsto \left(\cos k \cdot {t}^{-3}\right) \cdot \color{blue}{\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right)} \]
      7. unpow263.5%

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

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

    if 3.70000000000000014e177 < k

    1. Initial program 33.3%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\left(\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    4. Taylor expanded in t around 0 60.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. associate-*r*60.3%

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

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

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

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

        \[\leadsto \color{blue}{2 \cdot \frac{1}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
      2. div-inv60.3%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{2}{t}}{{k}^{4}}}}{{\ell}^{-2}} \]
    11. Simplified60.3%

      \[\leadsto \color{blue}{\frac{\frac{\frac{2}{t}}{{k}^{4}}}{{\ell}^{-2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.7 \cdot 10^{+177}:\\ \;\;\;\;{\left(\frac{\ell}{k}\right)}^{2} \cdot \left(\cos k \cdot {t}^{-3}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{2}{t}}{{k}^{4}}}{{\ell}^{-2}}\\ \end{array} \]

Alternative 17: 62.2% accurate, 1.4× 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.3 \cdot 10^{+131}:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t_m}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{2}{t_m}}{{k}^{4}}}{{\ell}^{-2}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 2.3e+131)
    (pow (* (/ l k) (sqrt (/ 1.0 (pow t_m 3.0)))) 2.0)
    (/ (/ (/ 2.0 t_m) (pow k 4.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 (k <= 2.3e+131) {
		tmp = pow(((l / k) * sqrt((1.0 / pow(t_m, 3.0)))), 2.0);
	} else {
		tmp = ((2.0 / t_m) / pow(k, 4.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 (k <= 2.3d+131) then
        tmp = ((l / k) * sqrt((1.0d0 / (t_m ** 3.0d0)))) ** 2.0d0
    else
        tmp = ((2.0d0 / t_m) / (k ** 4.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 (k <= 2.3e+131) {
		tmp = Math.pow(((l / k) * Math.sqrt((1.0 / Math.pow(t_m, 3.0)))), 2.0);
	} else {
		tmp = ((2.0 / t_m) / Math.pow(k, 4.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 k <= 2.3e+131:
		tmp = math.pow(((l / k) * math.sqrt((1.0 / math.pow(t_m, 3.0)))), 2.0)
	else:
		tmp = ((2.0 / t_m) / math.pow(k, 4.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 (k <= 2.3e+131)
		tmp = Float64(Float64(l / k) * sqrt(Float64(1.0 / (t_m ^ 3.0)))) ^ 2.0;
	else
		tmp = Float64(Float64(Float64(2.0 / t_m) / (k ^ 4.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 (k <= 2.3e+131)
		tmp = ((l / k) * sqrt((1.0 / (t_m ^ 3.0)))) ^ 2.0;
	else
		tmp = ((2.0 / t_m) / (k ^ 4.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[k, 2.3e+131], N[Power[N[(N[(l / k), $MachinePrecision] * N[Sqrt[N[(1.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(N[(2.0 / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.3 \cdot 10^{+131}:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t_m}^{3}}}\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{t_m}}{{k}^{4}}}{{\ell}^{-2}}\\


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

    1. Initial program 60.0%

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

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

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

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

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

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

    if 2.29999999999999992e131 < k

    1. Initial program 35.7%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\left(\color{blue}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    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. associate-*r*62.3%

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

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

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

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

        \[\leadsto \color{blue}{2 \cdot \frac{1}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
      2. div-inv52.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\frac{2}{t}}{{k}^{4}}}}{{\ell}^{-2}} \]
    11. Simplified52.9%

      \[\leadsto \color{blue}{\frac{\frac{\frac{2}{t}}{{k}^{4}}}{{\ell}^{-2}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.3 \cdot 10^{+131}:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \sqrt{\frac{1}{{t}^{3}}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{2}{t}}{{k}^{4}}}{{\ell}^{-2}}\\ \end{array} \]

Alternative 18: 61.9% 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 4.3 \cdot 10^{-125}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t_m}^{3}}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.3e-125)
    (* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t_m))
    (/ (pow (/ l k) 2.0) (pow t_m 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 <= 4.3e-125) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m);
	} else {
		tmp = pow((l / k), 2.0) / pow(t_m, 3.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 <= 4.3d-125) then
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m)
    else
        tmp = ((l / k) ** 2.0d0) / (t_m ** 3.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 <= 4.3e-125) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m);
	} else {
		tmp = Math.pow((l / k), 2.0) / Math.pow(t_m, 3.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 <= 4.3e-125:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m)
	else:
		tmp = math.pow((l / k), 2.0) / math.pow(t_m, 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 <= 4.3e-125)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m));
	else
		tmp = Float64((Float64(l / k) ^ 2.0) / (t_m ^ 3.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 <= 4.3e-125)
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m);
	else
		tmp = ((l / k) ^ 2.0) / (t_m ^ 3.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, 4.3e-125], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4.3 \cdot 10^{-125}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t_m}^{3}}\\


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

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

      \[\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. associate-*r*62.5%

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Taylor expanded in k around 0 51.7%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    9. Step-by-step derivation
      1. associate-/r*52.3%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    10. Simplified52.3%

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

    if 4.3000000000000002e-125 < t

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

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

      \[\leadsto \color{blue}{\frac{{\ell}^{2} \cdot \cos k}{{t}^{3} \cdot {\sin k}^{2}}} \]
    4. Step-by-step derivation
      1. associate-/l*47.8%

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

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

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{\frac{{\sin k}^{2}}{\frac{\cos k}{{t}^{3}}}}} \]
    5. Simplified47.8%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{\frac{{\sin k}^{2}}{\frac{\cos k}{{t}^{3}}}}} \]
    6. Taylor expanded in k around 0 53.3%

      \[\leadsto \frac{{\ell}^{2}}{\frac{\color{blue}{{k}^{2}}}{\frac{\cos k}{{t}^{3}}}} \]
    7. Taylor expanded in k around 0 53.3%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    8. Step-by-step derivation
      1. associate-/r*53.3%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{2}}}{{t}^{3}}} \]
      2. unpow253.3%

        \[\leadsto \frac{\frac{\color{blue}{\ell \cdot \ell}}{{k}^{2}}}{{t}^{3}} \]
      3. unpow253.3%

        \[\leadsto \frac{\frac{\ell \cdot \ell}{\color{blue}{k \cdot k}}}{{t}^{3}} \]
      4. times-frac66.9%

        \[\leadsto \frac{\color{blue}{\frac{\ell}{k} \cdot \frac{\ell}{k}}}{{t}^{3}} \]
      5. unpow266.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.3 \cdot 10^{-125}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t}^{3}}\\ \end{array} \]

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

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 3.2 \cdot 10^{-124}:\\
\;\;\;\;\frac{2}{\frac{{k}^{4}}{\frac{{\ell}^{2}}{t_m}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t_m}^{3}}\\


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

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

      \[\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. associate-*r*62.5%

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*53.8%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{\frac{{\ell}^{2}}{t}}}} \]
    9. Simplified53.8%

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

    if 3.20000000000000004e-124 < t

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

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

      \[\leadsto \color{blue}{\frac{{\ell}^{2} \cdot \cos k}{{t}^{3} \cdot {\sin k}^{2}}} \]
    4. Step-by-step derivation
      1. associate-/l*47.8%

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

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

        \[\leadsto \frac{{\ell}^{2}}{\color{blue}{\frac{{\sin k}^{2}}{\frac{\cos k}{{t}^{3}}}}} \]
    5. Simplified47.8%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{\frac{{\sin k}^{2}}{\frac{\cos k}{{t}^{3}}}}} \]
    6. Taylor expanded in k around 0 53.3%

      \[\leadsto \frac{{\ell}^{2}}{\frac{\color{blue}{{k}^{2}}}{\frac{\cos k}{{t}^{3}}}} \]
    7. Taylor expanded in k around 0 53.3%

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    8. Step-by-step derivation
      1. associate-/r*53.3%

        \[\leadsto \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{2}}}{{t}^{3}}} \]
      2. unpow253.3%

        \[\leadsto \frac{\frac{\color{blue}{\ell \cdot \ell}}{{k}^{2}}}{{t}^{3}} \]
      3. unpow253.3%

        \[\leadsto \frac{\frac{\ell \cdot \ell}{\color{blue}{k \cdot k}}}{{t}^{3}} \]
      4. times-frac66.9%

        \[\leadsto \frac{\color{blue}{\frac{\ell}{k} \cdot \frac{\ell}{k}}}{{t}^{3}} \]
      5. unpow266.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.2 \cdot 10^{-124}:\\ \;\;\;\;\frac{2}{\frac{{k}^{4}}{\frac{{\ell}^{2}}{t}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t}^{3}}\\ \end{array} \]

Alternative 20: 59.0% accurate, 2.0× speedup?

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

\\
t_s \cdot \frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t_m}^{3}}
\end{array}
Derivation
  1. Initial program 56.0%

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

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

    \[\leadsto \color{blue}{\frac{{\ell}^{2} \cdot \cos k}{{t}^{3} \cdot {\sin k}^{2}}} \]
  4. Step-by-step derivation
    1. associate-/l*47.6%

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

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

      \[\leadsto \frac{{\ell}^{2}}{\color{blue}{\frac{{\sin k}^{2}}{\frac{\cos k}{{t}^{3}}}}} \]
  5. Simplified47.3%

    \[\leadsto \color{blue}{\frac{{\ell}^{2}}{\frac{{\sin k}^{2}}{\frac{\cos k}{{t}^{3}}}}} \]
  6. Taylor expanded in k around 0 49.2%

    \[\leadsto \frac{{\ell}^{2}}{\frac{\color{blue}{{k}^{2}}}{\frac{\cos k}{{t}^{3}}}} \]
  7. Taylor expanded in k around 0 48.7%

    \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
  8. Step-by-step derivation
    1. associate-/r*49.5%

      \[\leadsto \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{2}}}{{t}^{3}}} \]
    2. unpow249.5%

      \[\leadsto \frac{\frac{\color{blue}{\ell \cdot \ell}}{{k}^{2}}}{{t}^{3}} \]
    3. unpow249.5%

      \[\leadsto \frac{\frac{\ell \cdot \ell}{\color{blue}{k \cdot k}}}{{t}^{3}} \]
    4. times-frac59.0%

      \[\leadsto \frac{\color{blue}{\frac{\ell}{k} \cdot \frac{\ell}{k}}}{{t}^{3}} \]
    5. unpow259.0%

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

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

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

Reproduce

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