Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.6% → 84.2%
Time: 17.8s
Alternatives: 23
Speedup: 24.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 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.6% accurate, 1.0× speedup?

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

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

Alternative 1: 84.2% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;t\_m \leq 4.5 \cdot 10^{+46}:\\
\;\;\;\;t\_3 \cdot \left(\frac{2}{t\_2 \cdot {t\_m}^{3}} \cdot t\_3\right)\\

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


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

    1. Initial program 49.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. Add Preprocessing
    3. Applied egg-rr10.9%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*10.9%

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

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

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

    if 9.9999999999999995e-179 < t < 5.40000000000000019e-103

    1. Initial program 23.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. Add Preprocessing
    3. Applied egg-rr54.2%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.40000000000000019e-103 < t < 4.5000000000000001e46

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

    if 4.5000000000000001e46 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.3% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 49.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. Add Preprocessing
    3. Applied egg-rr10.9%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*10.9%

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

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

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

    if 8.80000000000000018e-179 < t

    1. Initial program 56.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. Simplified56.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 49.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. Add Preprocessing
    3. Applied egg-rr10.9%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*10.9%

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

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

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

    if 1.4000000000000001e-178 < t

    1. Initial program 56.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. Simplified56.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 49.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. Add Preprocessing
    3. Applied egg-rr10.9%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*10.9%

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

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

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

    if 1.4000000000000001e-178 < t

    1. Initial program 56.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. Simplified56.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 74.8% accurate, 0.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{{t\_m}^{1.5}}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 0.0175:\\ \;\;\;\;\frac{2}{{\left(\left(t\_2 \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right) \cdot \left(k \cdot \left(1 + {k}^{2} \cdot 0.08333333333333333\right)\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 1.9 \cdot 10^{+30}:\\ \;\;\;\;\frac{\frac{2}{\sin k \cdot \tan k}}{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot {t\_2}^{2}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (/ (pow t_m 1.5) l)))
   (*
    t_s
    (if (<= k 0.0175)
      (/
       2.0
       (pow
        (*
         (* t_2 (hypot 1.0 (hypot 1.0 (/ k t_m))))
         (* k (+ 1.0 (* (pow k 2.0) 0.08333333333333333))))
        2.0))
      (if (<= k 1.9e+30)
        (/
         (/ 2.0 (* (sin k) (tan k)))
         (* (+ 2.0 (pow (/ k t_m) 2.0)) (pow t_2 2.0)))
        (*
         2.0
         (/
          (* (pow l 2.0) (cos k))
          (* (pow k 2.0) (* t_m (pow (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(t_m, 1.5) / l;
	double tmp;
	if (k <= 0.0175) {
		tmp = 2.0 / pow(((t_2 * hypot(1.0, hypot(1.0, (k / t_m)))) * (k * (1.0 + (pow(k, 2.0) * 0.08333333333333333)))), 2.0);
	} else if (k <= 1.9e+30) {
		tmp = (2.0 / (sin(k) * tan(k))) / ((2.0 + pow((k / t_m), 2.0)) * pow(t_2, 2.0));
	} else {
		tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(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(t_m, 1.5) / l;
	double tmp;
	if (k <= 0.0175) {
		tmp = 2.0 / Math.pow(((t_2 * Math.hypot(1.0, Math.hypot(1.0, (k / t_m)))) * (k * (1.0 + (Math.pow(k, 2.0) * 0.08333333333333333)))), 2.0);
	} else if (k <= 1.9e+30) {
		tmp = (2.0 / (Math.sin(k) * Math.tan(k))) / ((2.0 + Math.pow((k / t_m), 2.0)) * Math.pow(t_2, 2.0));
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(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(t_m, 1.5) / l
	tmp = 0
	if k <= 0.0175:
		tmp = 2.0 / math.pow(((t_2 * math.hypot(1.0, math.hypot(1.0, (k / t_m)))) * (k * (1.0 + (math.pow(k, 2.0) * 0.08333333333333333)))), 2.0)
	elif k <= 1.9e+30:
		tmp = (2.0 / (math.sin(k) * math.tan(k))) / ((2.0 + math.pow((k / t_m), 2.0)) * math.pow(t_2, 2.0))
	else:
		tmp = 2.0 * ((math.pow(l, 2.0) * math.cos(k)) / (math.pow(k, 2.0) * (t_m * math.pow(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((t_m ^ 1.5) / l)
	tmp = 0.0
	if (k <= 0.0175)
		tmp = Float64(2.0 / (Float64(Float64(t_2 * hypot(1.0, hypot(1.0, Float64(k / t_m)))) * Float64(k * Float64(1.0 + Float64((k ^ 2.0) * 0.08333333333333333)))) ^ 2.0));
	elseif (k <= 1.9e+30)
		tmp = Float64(Float64(2.0 / Float64(sin(k) * tan(k))) / Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * (t_2 ^ 2.0)));
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (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 = (t_m ^ 1.5) / l;
	tmp = 0.0;
	if (k <= 0.0175)
		tmp = 2.0 / (((t_2 * hypot(1.0, hypot(1.0, (k / t_m)))) * (k * (1.0 + ((k ^ 2.0) * 0.08333333333333333)))) ^ 2.0);
	elseif (k <= 1.9e+30)
		tmp = (2.0 / (sin(k) * tan(k))) / ((2.0 + ((k / t_m) ^ 2.0)) * (t_2 ^ 2.0));
	else
		tmp = 2.0 * (((l ^ 2.0) * cos(k)) / ((k ^ 2.0) * (t_m * (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[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 0.0175], N[(2.0 / N[Power[N[(N[(t$95$2 * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] * N[(k * N[(1.0 + N[(N[Power[k, 2.0], $MachinePrecision] * 0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.9e+30], N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $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)

\\
\begin{array}{l}
t_2 := \frac{{t\_m}^{1.5}}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 0.0175:\\
\;\;\;\;\frac{2}{{\left(\left(t\_2 \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right) \cdot \left(k \cdot \left(1 + {k}^{2} \cdot 0.08333333333333333\right)\right)\right)}^{2}}\\

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

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


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

    1. Initial program 54.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. Add Preprocessing
    3. Applied egg-rr32.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*32.5%

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

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

      \[\leadsto \frac{2}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \color{blue}{\left(k \cdot \left(1 + 0.08333333333333333 \cdot {k}^{2}\right)\right)}\right)}^{2}} \]
    7. Step-by-step derivation
      1. *-commutative40.9%

        \[\leadsto \frac{2}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \left(k \cdot \left(1 + \color{blue}{{k}^{2} \cdot 0.08333333333333333}\right)\right)\right)}^{2}} \]
    8. Simplified40.9%

      \[\leadsto \frac{2}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \color{blue}{\left(k \cdot \left(1 + {k}^{2} \cdot 0.08333333333333333\right)\right)}\right)}^{2}} \]

    if 0.017500000000000002 < k < 1.9000000000000001e30

    1. Initial program 74.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. Add Preprocessing
    3. Applied egg-rr0.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*0.0%

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity0.0%

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

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

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

        \[\leadsto 1 \cdot \frac{2}{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\sin k \cdot \tan k}\right)} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}} \]
      5. add-sqr-sqrt0.0%

        \[\leadsto 1 \cdot \frac{2}{\color{blue}{\left(\sin k \cdot \tan k\right)} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}} \]
      6. *-commutative0.0%

        \[\leadsto 1 \cdot \frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\color{blue}{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \frac{{t}^{1.5}}{\ell}\right)}}^{2}} \]
      7. unpow-prod-down0.0%

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

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

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

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

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

    if 1.9000000000000001e30 < k

    1. Initial program 45.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. Add Preprocessing
    3. Taylor expanded in t around 0 72.4%

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

Alternative 6: 71.0% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 53.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. Simplified53.7%

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

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

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

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

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

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

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

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

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

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

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

    if 4.8999999999999997e-102 < k < 7.6000000000000003e30

    1. Initial program 63.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. Add Preprocessing
    3. Applied egg-rr44.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*44.0%

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    6. Step-by-step derivation
      1. *-un-lft-identity44.0%

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

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

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

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

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

        \[\leadsto \frac{2}{1 \cdot \left(\left(\sin k \cdot \tan k\right) \cdot {\color{blue}{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \frac{{t}^{1.5}}{\ell}\right)}}^{2}\right)} \]
      7. unpow-prod-down40.0%

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

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

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

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

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

    if 7.6000000000000003e30 < k

    1. Initial program 45.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. Add Preprocessing
    3. Taylor expanded in t around 0 72.4%

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

Alternative 7: 71.2% accurate, 0.8× speedup?

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

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


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

    1. Initial program 54.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. Simplified54.8%

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

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

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

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

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

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

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

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

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

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

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

    if 5.5000000000000005e-26 < k

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in t around 0 73.5%

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

Alternative 8: 70.7% accurate, 0.8× speedup?

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

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


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

    1. Initial program 54.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. Simplified54.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.05000000000000001e-25 < k

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in t around 0 73.5%

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

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

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

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

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

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

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

Alternative 9: 70.7% accurate, 0.8× speedup?

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

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


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

    1. Initial program 54.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. Simplified54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3199999999999999e-25 < k

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in t around 0 73.5%

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

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

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

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

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

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

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

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

Alternative 10: 73.2% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 49.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. Add Preprocessing
    3. Applied egg-rr10.8%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*10.9%

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

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

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

    if 4.8999999999999999e-166 < t < 4.79999999999999985e153

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

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

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

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

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

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

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

    if 4.79999999999999985e153 < t

    1. Initial program 63.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. Simplified63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 73.2% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 49.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. Add Preprocessing
    3. Applied egg-rr10.8%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*10.9%

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

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

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

    if 4.8999999999999999e-166 < t < 3.29999999999999994e153

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

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

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

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

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

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

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

    if 3.29999999999999994e153 < t

    1. Initial program 63.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. Simplified63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 73.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 49.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. Add Preprocessing
    3. Applied egg-rr10.8%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*10.9%

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

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

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

    if 4.8999999999999999e-166 < t < 5.5e140

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

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

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

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

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

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

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

    if 5.5e140 < t

    1. Initial program 59.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. Simplified59.2%

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

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

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

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

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

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

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

Alternative 13: 74.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 48.1%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Applied egg-rr16.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*16.4%

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

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

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

    if 6.9999999999999997e-91 < t < 3.3e94

    1. Initial program 67.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. Simplified67.7%

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

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

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

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

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

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

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

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

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

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

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

    if 3.3e94 < t

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

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

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

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

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

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

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

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

Alternative 14: 74.5% 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 9.8 \cdot 10^{-91}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 3.3 \cdot 10^{+94}:\\ \;\;\;\;\left(\frac{2}{{t\_m}^{3}} \cdot \frac{\ell}{\sin k \cdot \tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 2.8 \cdot 10^{+196}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 9.8e-91)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 3.3e+94)
      (*
       (* (/ 2.0 (pow t_m 3.0)) (/ l (* (sin k) (tan k))))
       (/ l (+ 2.0 (pow (/ k t_m) 2.0))))
      (if (<= t_m 2.8e+196)
        (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
        (/ 2.0 (pow (* (/ (* k (sqrt 2.0)) l) (sqrt (pow t_m 3.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 (t_m <= 9.8e-91) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 3.3e+94) {
		tmp = ((2.0 / pow(t_m, 3.0)) * (l / (sin(k) * tan(k)))) * (l / (2.0 + pow((k / t_m), 2.0)));
	} else if (t_m <= 2.8e+196) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / pow((((k * sqrt(2.0)) / l) * sqrt(pow(t_m, 3.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 (t_m <= 9.8d-91) then
        tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
    else if (t_m <= 3.3d+94) then
        tmp = ((2.0d0 / (t_m ** 3.0d0)) * (l / (sin(k) * tan(k)))) * (l / (2.0d0 + ((k / t_m) ** 2.0d0)))
    else if (t_m <= 2.8d+196) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
    else
        tmp = 2.0d0 / ((((k * sqrt(2.0d0)) / l) * sqrt((t_m ** 3.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 (t_m <= 9.8e-91) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 3.3e+94) {
		tmp = ((2.0 / Math.pow(t_m, 3.0)) * (l / (Math.sin(k) * Math.tan(k)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
	} else if (t_m <= 2.8e+196) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / Math.pow((((k * Math.sqrt(2.0)) / l) * Math.sqrt(Math.pow(t_m, 3.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 t_m <= 9.8e-91:
		tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0)
	elif t_m <= 3.3e+94:
		tmp = ((2.0 / math.pow(t_m, 3.0)) * (l / (math.sin(k) * math.tan(k)))) * (l / (2.0 + math.pow((k / t_m), 2.0)))
	elif t_m <= 2.8e+196:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)))
	else:
		tmp = 2.0 / math.pow((((k * math.sqrt(2.0)) / l) * math.sqrt(math.pow(t_m, 3.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 (t_m <= 9.8e-91)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 3.3e+94)
		tmp = Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) * Float64(l / Float64(sin(k) * tan(k)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))));
	elseif (t_m <= 2.8e+196)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sqrt(2.0)) / l) * sqrt((t_m ^ 3.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 (t_m <= 9.8e-91)
		tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0);
	elseif (t_m <= 3.3e+94)
		tmp = ((2.0 / (t_m ^ 3.0)) * (l / (sin(k) * tan(k)))) * (l / (2.0 + ((k / t_m) ^ 2.0)));
	elseif (t_m <= 2.8e+196)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k)));
	else
		tmp = 2.0 / ((((k * sqrt(2.0)) / l) * sqrt((t_m ^ 3.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[t$95$m, 9.8e-91], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.3e+94], N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.8e+196], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.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}\;t\_m \leq 9.8 \cdot 10^{-91}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

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

\mathbf{elif}\;t\_m \leq 2.8 \cdot 10^{+196}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\

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


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

    1. Initial program 48.1%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Applied egg-rr16.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*16.4%

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

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

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

    if 9.7999999999999996e-91 < t < 3.3e94

    1. Initial program 67.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. Simplified67.7%

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

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

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

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

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

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

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

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

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

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

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

    if 3.3e94 < t < 2.8000000000000002e196

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000002e196 < t

    1. Initial program 71.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. Add Preprocessing
    3. Applied egg-rr30.2%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*30.2%

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

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

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

Alternative 15: 72.7% 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.1 \cdot 10^{-89}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 8.8 \cdot 10^{+105} \lor \neg \left(t\_m \leq 1.6 \cdot 10^{+198}\right):\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 2.1e-89)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (or (<= t_m 8.8e+105) (not (<= t_m 1.6e+198)))
      (/ 2.0 (pow (* (/ (* k (sqrt 2.0)) l) (sqrt (pow t_m 3.0))) 2.0))
      (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.1e-89) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if ((t_m <= 8.8e+105) || !(t_m <= 1.6e+198)) {
		tmp = 2.0 / pow((((k * sqrt(2.0)) / l) * sqrt(pow(t_m, 3.0))), 2.0);
	} else {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 2.1d-89) then
        tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
    else if ((t_m <= 8.8d+105) .or. (.not. (t_m <= 1.6d+198))) then
        tmp = 2.0d0 / ((((k * sqrt(2.0d0)) / l) * sqrt((t_m ** 3.0d0))) ** 2.0d0)
    else
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.1e-89) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if ((t_m <= 8.8e+105) || !(t_m <= 1.6e+198)) {
		tmp = 2.0 / Math.pow((((k * Math.sqrt(2.0)) / l) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
	} else {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 2.1e-89:
		tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0)
	elif (t_m <= 8.8e+105) or not (t_m <= 1.6e+198):
		tmp = 2.0 / math.pow((((k * math.sqrt(2.0)) / l) * math.sqrt(math.pow(t_m, 3.0))), 2.0)
	else:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 2.1e-89)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif ((t_m <= 8.8e+105) || !(t_m <= 1.6e+198))
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sqrt(2.0)) / l) * sqrt((t_m ^ 3.0))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 2.1e-89)
		tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0);
	elseif ((t_m <= 8.8e+105) || ~((t_m <= 1.6e+198)))
		tmp = 2.0 / ((((k * sqrt(2.0)) / l) * sqrt((t_m ^ 3.0))) ^ 2.0);
	else
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.1e-89], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$m, 8.8e+105], N[Not[LessEqual[t$95$m, 1.6e+198]], $MachinePrecision]], N[(2.0 / N[Power[N[(N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{elif}\;t\_m \leq 8.8 \cdot 10^{+105} \lor \neg \left(t\_m \leq 1.6 \cdot 10^{+198}\right):\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\

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


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

    1. Initial program 48.1%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Applied egg-rr16.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*16.4%

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

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

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

    if 2.1000000000000001e-89 < t < 8.80000000000000027e105 or 1.5999999999999999e198 < t

    1. Initial program 68.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. Add Preprocessing
    3. Applied egg-rr49.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*49.1%

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

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

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

    if 8.80000000000000027e105 < t < 1.5999999999999999e198

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
      8. add-sqr-sqrt62.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.1 \cdot 10^{-89}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{+105} \lor \neg \left(t \leq 1.6 \cdot 10^{+198}\right):\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t}^{3}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 66.2% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.42 \cdot 10^{-120}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\ \mathbf{elif}\;k \leq 1.32 \cdot 10^{-25}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{{\ell}^{2}}{t\_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.42e-120)
    (/ 2.0 (pow (* (/ (* k (sqrt 2.0)) l) (sqrt (pow t_m 3.0))) 2.0))
    (if (<= k 1.32e-25)
      (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
      (*
       (/ 2.0 (* k k))
       (* (/ (pow l 2.0) t_m) (/ (cos k) (pow (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 <= 1.42e-120) {
		tmp = 2.0 / pow((((k * sqrt(2.0)) / l) * sqrt(pow(t_m, 3.0))), 2.0);
	} else if (k <= 1.32e-25) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = (2.0 / (k * k)) * ((pow(l, 2.0) / t_m) * (cos(k) / pow(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 <= 1.42d-120) then
        tmp = 2.0d0 / ((((k * sqrt(2.0d0)) / l) * sqrt((t_m ** 3.0d0))) ** 2.0d0)
    else if (k <= 1.32d-25) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
    else
        tmp = (2.0d0 / (k * k)) * (((l ** 2.0d0) / t_m) * (cos(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 <= 1.42e-120) {
		tmp = 2.0 / Math.pow((((k * Math.sqrt(2.0)) / l) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
	} else if (k <= 1.32e-25) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = (2.0 / (k * k)) * ((Math.pow(l, 2.0) / t_m) * (Math.cos(k) / Math.pow(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 <= 1.42e-120:
		tmp = 2.0 / math.pow((((k * math.sqrt(2.0)) / l) * math.sqrt(math.pow(t_m, 3.0))), 2.0)
	elif k <= 1.32e-25:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)))
	else:
		tmp = (2.0 / (k * k)) * ((math.pow(l, 2.0) / t_m) * (math.cos(k) / math.pow(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 <= 1.42e-120)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sqrt(2.0)) / l) * sqrt((t_m ^ 3.0))) ^ 2.0));
	elseif (k <= 1.32e-25)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64((l ^ 2.0) / t_m) * Float64(cos(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 <= 1.42e-120)
		tmp = 2.0 / ((((k * sqrt(2.0)) / l) * sqrt((t_m ^ 3.0))) ^ 2.0);
	elseif (k <= 1.32e-25)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k)));
	else
		tmp = (2.0 / (k * k)) * (((l ^ 2.0) / t_m) * (cos(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, 1.42e-120], N[(2.0 / N[Power[N[(N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.32e-25], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[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 1.42 \cdot 10^{-120}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\

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

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


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

    1. Initial program 54.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. Add Preprocessing
    3. Applied egg-rr29.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*29.3%

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

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

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

    if 1.42e-120 < k < 1.3199999999999999e-25

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3199999999999999e-25 < k

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in t around 0 73.5%

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

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

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

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

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

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

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

Alternative 17: 63.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}\;k \leq 7.5 \cdot 10^{-121}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\ \mathbf{elif}\;k \leq 2.6 \cdot 10^{-26}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{2}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 7.5e-121)
    (/ 2.0 (pow (* (/ (* k (sqrt 2.0)) l) (sqrt (pow t_m 3.0))) 2.0))
    (if (<= k 2.6e-26)
      (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
      (* (/ 2.0 (pow k 2.0)) (/ (pow l 2.0) (* t_m (pow k 2.0))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 7.5e-121) {
		tmp = 2.0 / pow((((k * sqrt(2.0)) / l) * sqrt(pow(t_m, 3.0))), 2.0);
	} else if (k <= 2.6e-26) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = (2.0 / pow(k, 2.0)) * (pow(l, 2.0) / (t_m * pow(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 <= 7.5d-121) then
        tmp = 2.0d0 / ((((k * sqrt(2.0d0)) / l) * sqrt((t_m ** 3.0d0))) ** 2.0d0)
    else if (k <= 2.6d-26) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
    else
        tmp = (2.0d0 / (k ** 2.0d0)) * ((l ** 2.0d0) / (t_m * (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 <= 7.5e-121) {
		tmp = 2.0 / Math.pow((((k * Math.sqrt(2.0)) / l) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
	} else if (k <= 2.6e-26) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l, 2.0) / (t_m * Math.pow(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 <= 7.5e-121:
		tmp = 2.0 / math.pow((((k * math.sqrt(2.0)) / l) * math.sqrt(math.pow(t_m, 3.0))), 2.0)
	elif k <= 2.6e-26:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)))
	else:
		tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l, 2.0) / (t_m * math.pow(k, 2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 7.5e-121)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sqrt(2.0)) / l) * sqrt((t_m ^ 3.0))) ^ 2.0));
	elseif (k <= 2.6e-26)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l ^ 2.0) / Float64(t_m * (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 <= 7.5e-121)
		tmp = 2.0 / ((((k * sqrt(2.0)) / l) * sqrt((t_m ^ 3.0))) ^ 2.0);
	elseif (k <= 2.6e-26)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k)));
	else
		tmp = (2.0 / (k ^ 2.0)) * ((l ^ 2.0) / (t_m * (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, 7.5e-121], N[(2.0 / N[Power[N[(N[(N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.6e-26], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{2}}\\


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

    1. Initial program 54.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. Add Preprocessing
    3. Applied egg-rr29.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    4. Step-by-step derivation
      1. associate-*r*29.3%

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

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

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

    if 7.50000000000000027e-121 < k < 2.6000000000000001e-26

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.6000000000000001e-26 < k

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in t around 0 73.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.5 \cdot 10^{-121}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sqrt{2}}{\ell} \cdot \sqrt{{t}^{3}}\right)}^{2}}\\ \mathbf{elif}\;k \leq 2.6 \cdot 10^{-26}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t \cdot {k}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 59.7% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.3 \cdot 10^{-25}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{2}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.3e-25)
    (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
    (* (/ 2.0 (pow k 2.0)) (/ (pow l 2.0) (* t_m (pow k 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.3e-25) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = (2.0 / pow(k, 2.0)) * (pow(l, 2.0) / (t_m * pow(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 <= 1.3d-25) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
    else
        tmp = (2.0d0 / (k ** 2.0d0)) * ((l ** 2.0d0) / (t_m * (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 <= 1.3e-25) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l, 2.0) / (t_m * Math.pow(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 <= 1.3e-25:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)))
	else:
		tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l, 2.0) / (t_m * math.pow(k, 2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 1.3e-25)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l ^ 2.0) / Float64(t_m * (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 <= 1.3e-25)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k)));
	else
		tmp = (2.0 / (k ^ 2.0)) * ((l ^ 2.0) / (t_m * (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, 1.3e-25], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{2}}\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3e-25 < k

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in t around 0 73.5%

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

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

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

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

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

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

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

Alternative 19: 59.4% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 5.5 \cdot 10^{-27}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 5.5e-27)
    (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
    (/ (* 2.0 (pow l 2.0)) (* t_m (pow k 4.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 <= 5.5e-27) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = (2.0 * pow(l, 2.0)) / (t_m * pow(k, 4.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 <= 5.5d-27) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
    else
        tmp = (2.0d0 * (l ** 2.0d0)) / (t_m * (k ** 4.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 <= 5.5e-27) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
	} else {
		tmp = (2.0 * Math.pow(l, 2.0)) / (t_m * Math.pow(k, 4.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 <= 5.5e-27:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)))
	else:
		tmp = (2.0 * math.pow(l, 2.0)) / (t_m * math.pow(k, 4.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 <= 5.5e-27)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / Float64(t_m * (k ^ 4.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 <= 5.5e-27)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k)));
	else
		tmp = (2.0 * (l ^ 2.0)) / (t_m * (k ^ 4.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, 5.5e-27], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5000000000000002e-27 < k

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in t around 0 73.5%

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

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

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

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

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

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

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k}^{4}}\\


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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5000000000000002e-27 < k

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in t around 0 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\


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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3199999999999999e-25 < k

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in k around inf 30.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    12. Simplified58.9%

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

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

Alternative 22: 57.1% accurate, 3.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 23: 57.4% accurate, 24.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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