Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.7% → 88.3%
Time: 19.2s
Alternatives: 21
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 21 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.7% 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: 88.3% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k \cdot \tan k\\ t_3 := \sqrt[3]{\frac{1}{\ell}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.02 \cdot 10^{-222}:\\ \;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{t\_2}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 8100000000000:\\ \;\;\;\;\frac{\frac{2}{t\_2}}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \left(t\_3 \cdot t\_3\right)\right) \cdot \left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \sqrt[3]{\sin k}\right)\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_3 (cbrt (/ 1.0 l))))
   (*
    t_s
    (if (<= t_m 1.02e-222)
      (/ 2.0 (pow (* (* (/ k l) (sqrt t_m)) (sqrt t_2)) 2.0))
      (if (<= t_m 8100000000000.0)
        (/
         (/ 2.0 t_2)
         (pow (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k t_m)))) 2.0))
        (/
         2.0
         (pow
          (*
           (* t_m (* t_3 t_3))
           (* (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))) (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 t_2 = sin(k) * tan(k);
	double t_3 = cbrt((1.0 / l));
	double tmp;
	if (t_m <= 1.02e-222) {
		tmp = 2.0 / pow((((k / l) * sqrt(t_m)) * sqrt(t_2)), 2.0);
	} else if (t_m <= 8100000000000.0) {
		tmp = (2.0 / t_2) / pow(((pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k / t_m)))), 2.0);
	} else {
		tmp = 2.0 / pow(((t_m * (t_3 * t_3)) * (cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * 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 t_2 = Math.sin(k) * Math.tan(k);
	double t_3 = Math.cbrt((1.0 / l));
	double tmp;
	if (t_m <= 1.02e-222) {
		tmp = 2.0 / Math.pow((((k / l) * Math.sqrt(t_m)) * Math.sqrt(t_2)), 2.0);
	} else if (t_m <= 8100000000000.0) {
		tmp = (2.0 / t_2) / Math.pow(((Math.pow(t_m, 1.5) / l) * Math.hypot(1.0, Math.hypot(1.0, (k / t_m)))), 2.0);
	} else {
		tmp = 2.0 / Math.pow(((t_m * (t_3 * t_3)) * (Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * 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)
	t_2 = Float64(sin(k) * tan(k))
	t_3 = cbrt(Float64(1.0 / l))
	tmp = 0.0
	if (t_m <= 1.02e-222)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k / l) * sqrt(t_m)) * sqrt(t_2)) ^ 2.0));
	elseif (t_m <= 8100000000000.0)
		tmp = Float64(Float64(2.0 / t_2) / (Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k / t_m)))) ^ 2.0));
	else
		tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(t_3 * t_3)) * Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * 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_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(1.0 / l), $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.02e-222], 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, 8100000000000.0], N[(N[(2.0 / t$95$2), $MachinePrecision] / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[(t$95$3 * t$95$3), $MachinePrecision]), $MachinePrecision] * N[(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] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{elif}\;t\_m \leq 8100000000000:\\
\;\;\;\;\frac{\frac{2}{t\_2}}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)}^{2}}\\

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


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

    1. Initial program 50.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-rr2.7%

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

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

      \[\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 8.1%

      \[\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.01999999999999995e-222 < t < 8.1e12

    1. Initial program 45.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-rr67.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*67.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. Simplified67.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. Step-by-step derivation
      1. *-un-lft-identity67.3%

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

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

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

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

        \[\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}} \]
    7. Applied egg-rr87.3%

      \[\leadsto \color{blue}{1 \cdot \frac{2}{\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}}} \]
    8. Step-by-step derivation
      1. *-lft-identity87.3%

        \[\leadsto \color{blue}{\frac{2}{\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}}} \]
      2. associate-/r*87.4%

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

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

    if 8.1e12 < t

    1. Initial program 68.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. Step-by-step derivation
      1. add-cube-cbrt68.2%

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

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\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)}\right)}^{3}}} \]
    4. Applied egg-rr73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t\_m \leq 12500000000000:\\
\;\;\;\;\frac{\frac{2}{t\_2}}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\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 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\


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

    1. Initial program 50.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-rr2.7%

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

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

      \[\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 8.1%

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

    if 5.39999999999999977e-223 < t < 1.25e13

    1. Initial program 45.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-rr67.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*67.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. Simplified67.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. Step-by-step derivation
      1. *-un-lft-identity67.3%

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

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

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

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

        \[\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}} \]
    7. Applied egg-rr87.3%

      \[\leadsto \color{blue}{1 \cdot \frac{2}{\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}}} \]
    8. Step-by-step derivation
      1. *-lft-identity87.3%

        \[\leadsto \color{blue}{\frac{2}{\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}}} \]
      2. associate-/r*87.4%

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

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

    if 1.25e13 < t

    1. Initial program 68.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. Simplified68.2%

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

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

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

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

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

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

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

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

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

      \[\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)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 85.9% 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\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.02 \cdot 10^{-222}:\\ \;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{t\_2}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 5.7 \cdot 10^{+26}:\\ \;\;\;\;\frac{\frac{2}{t\_2}}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot {\left(\left(t\_m \cdot \sqrt[3]{\sin k}\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-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 1.02e-222)
      (/ 2.0 (pow (* (* (/ k l) (sqrt t_m)) (sqrt t_2)) 2.0))
      (if (<= t_m 5.7e+26)
        (/
         (/ 2.0 t_2)
         (pow (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k t_m)))) 2.0))
        (/
         2.0
         (*
          (* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
          (pow (* (* t_m (cbrt (sin k))) (pow (cbrt 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 <= 1.02e-222) {
		tmp = 2.0 / pow((((k / l) * sqrt(t_m)) * sqrt(t_2)), 2.0);
	} else if (t_m <= 5.7e+26) {
		tmp = (2.0 / t_2) / pow(((pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k / t_m)))), 2.0);
	} else {
		tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * pow(((t_m * cbrt(sin(k))) * pow(cbrt(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 <= 1.02e-222) {
		tmp = 2.0 / Math.pow((((k / l) * Math.sqrt(t_m)) * Math.sqrt(t_2)), 2.0);
	} else if (t_m <= 5.7e+26) {
		tmp = (2.0 / t_2) / Math.pow(((Math.pow(t_m, 1.5) / l) * Math.hypot(1.0, Math.hypot(1.0, (k / t_m)))), 2.0);
	} else {
		tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * Math.pow(((t_m * Math.cbrt(Math.sin(k))) * Math.pow(Math.cbrt(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 <= 1.02e-222)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k / l) * sqrt(t_m)) * sqrt(t_2)) ^ 2.0));
	elseif (t_m <= 5.7e+26)
		tmp = Float64(Float64(2.0 / t_2) / (Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k / t_m)))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * (Float64(Float64(t_m * cbrt(sin(k))) * (cbrt(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, 1.02e-222], 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.7e+26], N[(N[(2.0 / t$95$2), $MachinePrecision] / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 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]), $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 1.02 \cdot 10^{-222}:\\
\;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{t\_2}\right)}^{2}}\\

\mathbf{elif}\;t\_m \leq 5.7 \cdot 10^{+26}:\\
\;\;\;\;\frac{\frac{2}{t\_2}}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)}^{2}}\\

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


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

    1. Initial program 50.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-rr2.7%

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

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

      \[\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 8.1%

      \[\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.01999999999999995e-222 < t < 5.7000000000000003e26

    1. Initial program 50.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-rr67.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*68.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. Simplified68.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-identity68.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. *-commutative68.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-down68.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. pow268.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-sqrt88.4%

        \[\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}} \]
    7. Applied egg-rr88.4%

      \[\leadsto \color{blue}{1 \cdot \frac{2}{\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}}} \]
    8. Step-by-step derivation
      1. *-lft-identity88.4%

        \[\leadsto \color{blue}{\frac{2}{\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}}} \]
      2. associate-/r*88.5%

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

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

    if 5.7000000000000003e26 < t

    1. Initial program 66.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. Simplified66.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-cbrt66.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t \cdot \color{blue}{{\left(\sqrt[3]{\sqrt[3]{\sin k}}\right)}^{3}}}{{\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)} \]
    8. Step-by-step derivation
      1. div-inv91.3%

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

        \[\leadsto \frac{2}{{\left(\left(t \cdot \color{blue}{\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 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      3. pow-flip91.6%

        \[\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 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
      4. metadata-eval91.6%

        \[\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 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
    9. Applied egg-rr91.6%

      \[\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 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.02 \cdot 10^{-222}:\\ \;\;\;\;\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.7 \cdot 10^{+26}:\\ \;\;\;\;\frac{\frac{2}{\sin k \cdot \tan k}}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right) \cdot {\left(\left(t \cdot \sqrt[3]{\sin k}\right) \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 86.0% accurate, 0.7× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k \cdot \tan k\\ t_3 := \sqrt[3]{\sin k}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 10^{-224}:\\ \;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{t\_2}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 3.6 \cdot 10^{+26}:\\ \;\;\;\;\frac{\frac{2}{t\_2}}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 4.3 \cdot 10^{+154}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot \frac{\ell}{\tan k}}}{t\_m \cdot t\_3}\right)}^{3} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \frac{t\_3}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right) \cdot \sqrt[3]{2 \cdot k}\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_3 (cbrt (sin k))))
   (*
    t_s
    (if (<= t_m 1e-224)
      (/ 2.0 (pow (* (* (/ k l) (sqrt t_m)) (sqrt t_2)) 2.0))
      (if (<= t_m 3.6e+26)
        (/
         (/ 2.0 t_2)
         (pow (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k t_m)))) 2.0))
        (if (<= t_m 4.3e+154)
          (*
           (pow (/ (cbrt (* 2.0 (/ l (tan k)))) (* t_m t_3)) 3.0)
           (/ l (+ 2.0 (pow (/ k t_m) 2.0))))
          (/
           2.0
           (pow
            (* (* t_m (/ t_3 (pow (cbrt l) 2.0))) (cbrt (* 2.0 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 t_2 = sin(k) * tan(k);
	double t_3 = cbrt(sin(k));
	double tmp;
	if (t_m <= 1e-224) {
		tmp = 2.0 / pow((((k / l) * sqrt(t_m)) * sqrt(t_2)), 2.0);
	} else if (t_m <= 3.6e+26) {
		tmp = (2.0 / t_2) / pow(((pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k / t_m)))), 2.0);
	} else if (t_m <= 4.3e+154) {
		tmp = pow((cbrt((2.0 * (l / tan(k)))) / (t_m * t_3)), 3.0) * (l / (2.0 + pow((k / t_m), 2.0)));
	} else {
		tmp = 2.0 / pow(((t_m * (t_3 / pow(cbrt(l), 2.0))) * cbrt((2.0 * 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 t_2 = Math.sin(k) * Math.tan(k);
	double t_3 = Math.cbrt(Math.sin(k));
	double tmp;
	if (t_m <= 1e-224) {
		tmp = 2.0 / Math.pow((((k / l) * Math.sqrt(t_m)) * Math.sqrt(t_2)), 2.0);
	} else if (t_m <= 3.6e+26) {
		tmp = (2.0 / t_2) / Math.pow(((Math.pow(t_m, 1.5) / l) * Math.hypot(1.0, Math.hypot(1.0, (k / t_m)))), 2.0);
	} else if (t_m <= 4.3e+154) {
		tmp = Math.pow((Math.cbrt((2.0 * (l / Math.tan(k)))) / (t_m * t_3)), 3.0) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
	} else {
		tmp = 2.0 / Math.pow(((t_m * (t_3 / Math.pow(Math.cbrt(l), 2.0))) * Math.cbrt((2.0 * 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)
	t_2 = Float64(sin(k) * tan(k))
	t_3 = cbrt(sin(k))
	tmp = 0.0
	if (t_m <= 1e-224)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k / l) * sqrt(t_m)) * sqrt(t_2)) ^ 2.0));
	elseif (t_m <= 3.6e+26)
		tmp = Float64(Float64(2.0 / t_2) / (Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k / t_m)))) ^ 2.0));
	elseif (t_m <= 4.3e+154)
		tmp = Float64((Float64(cbrt(Float64(2.0 * Float64(l / tan(k)))) / Float64(t_m * t_3)) ^ 3.0) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))));
	else
		tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(t_3 / (cbrt(l) ^ 2.0))) * cbrt(Float64(2.0 * 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_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1e-224], 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, 3.6e+26], N[(N[(2.0 / t$95$2), $MachinePrecision] / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.3e+154], N[(N[Power[N[(N[Power[N[(2.0 * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t$95$m * t$95$3), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m * N[(t$95$3 / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(2.0 * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{elif}\;t\_m \leq 3.6 \cdot 10^{+26}:\\
\;\;\;\;\frac{\frac{2}{t\_2}}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)}^{2}}\\

\mathbf{elif}\;t\_m \leq 4.3 \cdot 10^{+154}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot \frac{\ell}{\tan k}}}{t\_m \cdot t\_3}\right)}^{3} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\

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


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

    1. Initial program 50.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-rr2.7%

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

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

      \[\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 8.1%

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

    if 1e-224 < t < 3.60000000000000024e26

    1. Initial program 50.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-rr67.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*68.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. Simplified68.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-identity68.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. *-commutative68.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-down68.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. pow268.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-sqrt88.4%

        \[\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}} \]
    7. Applied egg-rr88.4%

      \[\leadsto \color{blue}{1 \cdot \frac{2}{\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}}} \]
    8. Step-by-step derivation
      1. *-lft-identity88.4%

        \[\leadsto \color{blue}{\frac{2}{\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}}} \]
      2. associate-/r*88.5%

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

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

    if 3.60000000000000024e26 < t < 4.2999999999999998e154

    1. Initial program 62.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. Simplified59.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.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2999999999999998e154 < t

    1. Initial program 69.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. Simplified69.2%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 82.7% 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 3.3 \cdot 10^{-195}:\\ \;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 4 \cdot 10^{-76}:\\ \;\;\;\;\frac{2}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2} \cdot \cos k}{{\sin k}^{2}}\\ \mathbf{elif}\;t\_m \leq 4.2 \cdot 10^{+101}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{\frac{2}{{t\_m}^{3}}}{\sin k}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \frac{\sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right) \cdot \sqrt[3]{2 \cdot k}\right)}^{3}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.3e-195)
    (/ 2.0 (pow (* (* (/ k l) (sqrt t_m)) (sqrt (* (sin k) (tan k)))) 2.0))
    (if (<= t_m 4e-76)
      (*
       (/ 2.0 (* t_m (pow k 2.0)))
       (/ (* (pow l 2.0) (cos k)) (pow (sin k) 2.0)))
      (if (<= t_m 4.2e+101)
        (*
         (/ l (+ 2.0 (pow (/ k t_m) 2.0)))
         (* (/ l (tan k)) (/ (/ 2.0 (pow t_m 3.0)) (sin k))))
        (/
         2.0
         (pow
          (* (* t_m (/ (cbrt (sin k)) (pow (cbrt l) 2.0))) (cbrt (* 2.0 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 <= 3.3e-195) {
		tmp = 2.0 / pow((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))), 2.0);
	} else if (t_m <= 4e-76) {
		tmp = (2.0 / (t_m * pow(k, 2.0))) * ((pow(l, 2.0) * cos(k)) / pow(sin(k), 2.0));
	} else if (t_m <= 4.2e+101) {
		tmp = (l / (2.0 + pow((k / t_m), 2.0))) * ((l / tan(k)) * ((2.0 / pow(t_m, 3.0)) / sin(k)));
	} else {
		tmp = 2.0 / pow(((t_m * (cbrt(sin(k)) / pow(cbrt(l), 2.0))) * cbrt((2.0 * 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 <= 3.3e-195) {
		tmp = 2.0 / Math.pow((((k / l) * Math.sqrt(t_m)) * Math.sqrt((Math.sin(k) * Math.tan(k)))), 2.0);
	} else if (t_m <= 4e-76) {
		tmp = (2.0 / (t_m * Math.pow(k, 2.0))) * ((Math.pow(l, 2.0) * Math.cos(k)) / Math.pow(Math.sin(k), 2.0));
	} else if (t_m <= 4.2e+101) {
		tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l / Math.tan(k)) * ((2.0 / Math.pow(t_m, 3.0)) / Math.sin(k)));
	} else {
		tmp = 2.0 / Math.pow(((t_m * (Math.cbrt(Math.sin(k)) / Math.pow(Math.cbrt(l), 2.0))) * Math.cbrt((2.0 * 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 <= 3.3e-195)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k / l) * sqrt(t_m)) * sqrt(Float64(sin(k) * tan(k)))) ^ 2.0));
	elseif (t_m <= 4e-76)
		tmp = Float64(Float64(2.0 / Float64(t_m * (k ^ 2.0))) * Float64(Float64((l ^ 2.0) * cos(k)) / (sin(k) ^ 2.0)));
	elseif (t_m <= 4.2e+101)
		tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l / tan(k)) * Float64(Float64(2.0 / (t_m ^ 3.0)) / sin(k))));
	else
		tmp = Float64(2.0 / (Float64(Float64(t_m * Float64(cbrt(sin(k)) / (cbrt(l) ^ 2.0))) * cbrt(Float64(2.0 * 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, 3.3e-195], 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], If[LessEqual[t$95$m, 4e-76], N[(N[(2.0 / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.2e+101], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $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[(2.0 * k), $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 3.3 \cdot 10^{-195}:\\
\;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\

\mathbf{elif}\;t\_m \leq 4 \cdot 10^{-76}:\\
\;\;\;\;\frac{2}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2} \cdot \cos k}{{\sin k}^{2}}\\

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

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


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

    1. Initial program 49.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-rr4.7%

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

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

      \[\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 9.9%

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

    if 3.3e-195 < t < 3.99999999999999971e-76

    1. Initial program 36.6%

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{t \cdot {k}^{2}}} \cdot \frac{{\ell}^{2} \cdot \cos k}{{\sin k}^{2}} \]
    7. Applied egg-rr79.9%

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

    if 3.99999999999999971e-76 < t < 4.2e101

    1. Initial program 76.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. Simplified74.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*82.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-identity82.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-frac85.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/85.5%

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

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

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

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

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

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

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

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

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

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

    if 4.2e101 < t

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.3 \cdot 10^{-195}:\\ \;\;\;\;\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 \cdot 10^{-76}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{{\ell}^{2} \cdot \cos k}{{\sin k}^{2}}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+101}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{\frac{2}{{t}^{3}}}{\sin k}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot \frac{\sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right) \cdot \sqrt[3]{2 \cdot k}\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 5.49999999999999998e-77 < k

    1. Initial program 52.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-rr27.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*27.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. Simplified27.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. Step-by-step derivation
      1. *-un-lft-identity27.9%

        \[\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. *-commutative27.9%

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

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

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

        \[\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}} \]
    7. Applied egg-rr42.8%

      \[\leadsto \color{blue}{1 \cdot \frac{2}{\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}}} \]
    8. Step-by-step derivation
      1. *-lft-identity42.8%

        \[\leadsto \color{blue}{\frac{2}{\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}}} \]
      2. associate-/r*42.8%

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 5.30000000000000015e-77 < k

    1. Initial program 52.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-rr27.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*27.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. Simplified27.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. Step-by-step derivation
      1. unpow-prod-down27.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 5.3 \cdot 10^{-77}:\\ \;\;\;\;\frac{2}{{\left(\left(t \cdot \frac{\sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right) \cdot \sqrt[3]{2 \cdot k}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\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}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 80.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t\_m \leq 2 \cdot 10^{-76}:\\
\;\;\;\;\frac{2}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2} \cdot \cos k}{{\sin k}^{2}}\\

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

\mathbf{else}:\\
\;\;\;\;\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)}\\


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

    1. Initial program 49.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-rr4.7%

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

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

      \[\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 9.9%

      \[\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.6000000000000001e-195 < t < 1.99999999999999985e-76

    1. Initial program 36.6%

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{t \cdot {k}^{2}}} \cdot \frac{{\ell}^{2} \cdot \cos k}{{\sin k}^{2}} \]
    7. Applied egg-rr79.9%

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

    if 1.99999999999999985e-76 < t < 4.2e101

    1. Initial program 76.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. Simplified74.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*82.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-identity82.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-frac85.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/85.5%

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

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

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

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

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

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

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

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

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

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

    if 4.2e101 < t

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

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

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

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

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

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

        \[\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-cube78.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-prod92.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. pow292.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-rr92.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. Taylor expanded in k around 0 88.6%

      \[\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)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification41.3%

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;\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)}\\


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

    1. Initial program 49.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-rr4.7%

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

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

      \[\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 9.9%

      \[\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.0000000000000004e-196 < t < 4.5000000000000001e-76

    1. Initial program 36.6%

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

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

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

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

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

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

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

    if 4.5000000000000001e-76 < t < 4.2e101

    1. Initial program 76.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. Simplified74.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*82.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-identity82.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-frac85.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/85.5%

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

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

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

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

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

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

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

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

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

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

    if 4.2e101 < t

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

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

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

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

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

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

        \[\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-cube78.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-prod92.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. pow292.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-rr92.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. Taylor expanded in k around 0 88.6%

      \[\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)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification41.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 8 \cdot 10^{-196}:\\ \;\;\;\;\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.5 \cdot 10^{-76}:\\ \;\;\;\;\frac{2 \cdot \left(\cos k \cdot \left(\ell \cdot \ell\right)\right)}{\left(t \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{+101}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{\frac{2}{{t}^{3}}}{\sin k}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 76.9% accurate, 0.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 6.2 \cdot 10^{-196}:\\ \;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 2.75 \cdot 10^{-77}:\\ \;\;\;\;\frac{2 \cdot \left(\cos k \cdot \left(\ell \cdot \ell\right)\right)}{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \mathbf{elif}\;t\_m \leq 4.2 \cdot 10^{+101}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{\frac{2}{{t\_m}^{3}}}{\sin k}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}\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 6.2e-196)
    (/ 2.0 (pow (* (* (/ k l) (sqrt t_m)) (sqrt (* (sin k) (tan k)))) 2.0))
    (if (<= t_m 2.75e-77)
      (/ (* 2.0 (* (cos k) (* l l))) (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)))
      (if (<= t_m 4.2e+101)
        (*
         (/ l (+ 2.0 (pow (/ k t_m) 2.0)))
         (* (/ l (tan k)) (/ (/ 2.0 (pow t_m 3.0)) (sin k))))
        (/ 2.0 (* (* 2.0 k) (* k (/ (pow (/ t_m (cbrt l)) 3.0) l)))))))))
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 <= 6.2e-196) {
		tmp = 2.0 / pow((((k / l) * sqrt(t_m)) * sqrt((sin(k) * tan(k)))), 2.0);
	} else if (t_m <= 2.75e-77) {
		tmp = (2.0 * (cos(k) * (l * l))) / ((t_m * pow(k, 2.0)) * pow(sin(k), 2.0));
	} else if (t_m <= 4.2e+101) {
		tmp = (l / (2.0 + pow((k / t_m), 2.0))) * ((l / tan(k)) * ((2.0 / pow(t_m, 3.0)) / sin(k)));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (pow((t_m / cbrt(l)), 3.0) / l)));
	}
	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 <= 6.2e-196) {
		tmp = 2.0 / Math.pow((((k / l) * Math.sqrt(t_m)) * Math.sqrt((Math.sin(k) * Math.tan(k)))), 2.0);
	} else if (t_m <= 2.75e-77) {
		tmp = (2.0 * (Math.cos(k) * (l * l))) / ((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0));
	} else if (t_m <= 4.2e+101) {
		tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l / Math.tan(k)) * ((2.0 / Math.pow(t_m, 3.0)) / Math.sin(k)));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)));
	}
	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 <= 6.2e-196)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k / l) * sqrt(t_m)) * sqrt(Float64(sin(k) * tan(k)))) ^ 2.0));
	elseif (t_m <= 2.75e-77)
		tmp = Float64(Float64(2.0 * Float64(cos(k) * Float64(l * l))) / Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)));
	elseif (t_m <= 4.2e+101)
		tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l / tan(k)) * Float64(Float64(2.0 / (t_m ^ 3.0)) / sin(k))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(k * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l))));
	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, 6.2e-196], 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], If[LessEqual[t$95$m, 2.75e-77], N[(N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.2e+101], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(k * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.2 \cdot 10^{-196}:\\
\;\;\;\;\frac{2}{{\left(\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}\\

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

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

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


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

    1. Initial program 49.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-rr4.7%

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

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

      \[\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 9.9%

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

    if 6.19999999999999986e-196 < t < 2.74999999999999999e-77

    1. Initial program 36.6%

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

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

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

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

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

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

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

    if 2.74999999999999999e-77 < t < 4.2e101

    1. Initial program 76.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. Simplified74.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*82.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-identity82.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-frac85.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/85.5%

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

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

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

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

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

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

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

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

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

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

    if 4.2e101 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 76.9% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.9 \cdot 10^{-196}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{-76}:\\ \;\;\;\;\frac{2 \cdot \left(\cos k \cdot \left(\ell \cdot \ell\right)\right)}{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \mathbf{elif}\;t\_m \leq 4.2 \cdot 10^{+101}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{\frac{2}{{t\_m}^{3}}}{\sin k}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}\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.9e-196)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 1.25e-76)
      (/ (* 2.0 (* (cos k) (* l l))) (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)))
      (if (<= t_m 4.2e+101)
        (*
         (/ l (+ 2.0 (pow (/ k t_m) 2.0)))
         (* (/ l (tan k)) (/ (/ 2.0 (pow t_m 3.0)) (sin k))))
        (/ 2.0 (* (* 2.0 k) (* k (/ (pow (/ t_m (cbrt l)) 3.0) l)))))))))
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.9e-196) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 1.25e-76) {
		tmp = (2.0 * (cos(k) * (l * l))) / ((t_m * pow(k, 2.0)) * pow(sin(k), 2.0));
	} else if (t_m <= 4.2e+101) {
		tmp = (l / (2.0 + pow((k / t_m), 2.0))) * ((l / tan(k)) * ((2.0 / pow(t_m, 3.0)) / sin(k)));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (pow((t_m / cbrt(l)), 3.0) / l)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.9e-196) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 1.25e-76) {
		tmp = (2.0 * (Math.cos(k) * (l * l))) / ((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0));
	} else if (t_m <= 4.2e+101) {
		tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l / Math.tan(k)) * ((2.0 / Math.pow(t_m, 3.0)) / Math.sin(k)));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)));
	}
	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.9e-196)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 1.25e-76)
		tmp = Float64(Float64(2.0 * Float64(cos(k) * Float64(l * l))) / Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)));
	elseif (t_m <= 4.2e+101)
		tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l / tan(k)) * Float64(Float64(2.0 / (t_m ^ 3.0)) / sin(k))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(k * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.9e-196], 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, 1.25e-76], N[(N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.2e+101], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(k * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{-196}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

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

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

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


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

    1. Initial program 49.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-rr4.7%

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

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

      \[\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 31.5%

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

    if 2.89999999999999987e-196 < t < 1.2499999999999999e-76

    1. Initial program 36.6%

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

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

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

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

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

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

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

    if 1.2499999999999999e-76 < t < 4.2e101

    1. Initial program 76.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. Simplified74.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*82.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-identity82.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-frac85.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/85.5%

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

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

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

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

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

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

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

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

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

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

    if 4.2e101 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 76.9% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.3 \cdot 10^{-195}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{-77}:\\ \;\;\;\;\frac{2 \cdot \left(\cos k \cdot \left(\ell \cdot \ell\right)\right)}{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin k}^{2}}\\ \mathbf{elif}\;t\_m \leq 4.2 \cdot 10^{+101}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t\_m}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}\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.3e-195)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 7.2e-77)
      (/ (* 2.0 (* (cos k) (* l l))) (* (* t_m (pow k 2.0)) (pow (sin k) 2.0)))
      (if (<= t_m 4.2e+101)
        (*
         (/ l (+ 2.0 (pow (/ k t_m) 2.0)))
         (* (/ l (tan k)) (/ 2.0 (* (sin k) (pow t_m 3.0)))))
        (/ 2.0 (* (* 2.0 k) (* k (/ (pow (/ t_m (cbrt l)) 3.0) l)))))))))
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.3e-195) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 7.2e-77) {
		tmp = (2.0 * (cos(k) * (l * l))) / ((t_m * pow(k, 2.0)) * pow(sin(k), 2.0));
	} else if (t_m <= 4.2e+101) {
		tmp = (l / (2.0 + pow((k / t_m), 2.0))) * ((l / tan(k)) * (2.0 / (sin(k) * pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (pow((t_m / cbrt(l)), 3.0) / l)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.3e-195) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 7.2e-77) {
		tmp = (2.0 * (Math.cos(k) * (l * l))) / ((t_m * Math.pow(k, 2.0)) * Math.pow(Math.sin(k), 2.0));
	} else if (t_m <= 4.2e+101) {
		tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l / Math.tan(k)) * (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)));
	}
	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.3e-195)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 7.2e-77)
		tmp = Float64(Float64(2.0 * Float64(cos(k) * Float64(l * l))) / Float64(Float64(t_m * (k ^ 2.0)) * (sin(k) ^ 2.0)));
	elseif (t_m <= 4.2e+101)
		tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l / tan(k)) * Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0)))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(k * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.3e-195], 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, 7.2e-77], N[(N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.2e+101], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(k * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.3 \cdot 10^{-195}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

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

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

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


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

    1. Initial program 49.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-rr4.7%

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

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

      \[\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 31.5%

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

    if 2.3000000000000002e-195 < t < 7.2e-77

    1. Initial program 36.6%

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

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

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

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

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

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

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

    if 7.2e-77 < t < 4.2e101

    1. Initial program 76.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. Simplified74.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*82.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-identity82.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-frac85.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/85.5%

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

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

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

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

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

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

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

    if 4.2e101 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 72.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 4.5 \cdot 10^{-47}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{+95}:\\ \;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sqrt{2}}{\ell}\right) \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}\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 4.5e-47)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 5.1e+95)
      (/ 2.0 (pow (* (* k (/ (sqrt 2.0) l)) (sqrt (pow t_m 3.0))) 2.0))
      (/ 2.0 (* (* 2.0 k) (* k (/ (pow (/ t_m (cbrt l)) 3.0) l))))))))
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.5e-47) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 5.1e+95) {
		tmp = 2.0 / pow(((k * (sqrt(2.0) / l)) * sqrt(pow(t_m, 3.0))), 2.0);
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (pow((t_m / cbrt(l)), 3.0) / l)));
	}
	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.5e-47) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 5.1e+95) {
		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 / ((2.0 * k) * (k * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)));
	}
	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.5e-47)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 5.1e+95)
		tmp = Float64(2.0 / (Float64(Float64(k * Float64(sqrt(2.0) / l)) * sqrt((t_m ^ 3.0))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(k * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l))));
	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.5e-47], 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.1e+95], N[(2.0 / N[Power[N[(N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(k * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.5 \cdot 10^{-47}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

\mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{+95}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sqrt{2}}{\ell}\right) \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\

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


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

    1. Initial program 48.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-rr13.5%

      \[\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*13.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. Simplified13.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 t around 0 37.9%

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

    if 4.5e-47 < t < 5.10000000000000003e95

    1. Initial program 77.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. Add Preprocessing
    3. Applied egg-rr76.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*76.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. Simplified76.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 79.9%

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

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

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

    if 5.10000000000000003e95 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 44.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 4.2 \cdot 10^{-12}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5} \cdot \sqrt{\sin k}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left(\cos k \cdot \left(\ell \cdot \ell\right)\right)}{\left(t\_m \cdot {k}^{2}\right) \cdot {\sin 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 4.2e-12)
    (/ 2.0 (* (* 2.0 k) (pow (/ (* (pow t_m 1.5) (sqrt (sin k))) l) 2.0)))
    (/
     (* 2.0 (* (cos k) (* l l)))
     (* (* t_m (pow k 2.0)) (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.2e-12) {
		tmp = 2.0 / ((2.0 * k) * pow(((pow(t_m, 1.5) * sqrt(sin(k))) / l), 2.0));
	} else {
		tmp = (2.0 * (cos(k) * (l * l))) / ((t_m * pow(k, 2.0)) * 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 <= 4.2d-12) then
        tmp = 2.0d0 / ((2.0d0 * k) * ((((t_m ** 1.5d0) * sqrt(sin(k))) / l) ** 2.0d0))
    else
        tmp = (2.0d0 * (cos(k) * (l * l))) / ((t_m * (k ** 2.0d0)) * (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 <= 4.2e-12) {
		tmp = 2.0 / ((2.0 * k) * Math.pow(((Math.pow(t_m, 1.5) * Math.sqrt(Math.sin(k))) / l), 2.0));
	} else {
		tmp = (2.0 * (Math.cos(k) * (l * l))) / ((t_m * Math.pow(k, 2.0)) * 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 <= 4.2e-12:
		tmp = 2.0 / ((2.0 * k) * math.pow(((math.pow(t_m, 1.5) * math.sqrt(math.sin(k))) / l), 2.0))
	else:
		tmp = (2.0 * (math.cos(k) * (l * l))) / ((t_m * math.pow(k, 2.0)) * 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.2e-12)
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(Float64((t_m ^ 1.5) * sqrt(sin(k))) / l) ^ 2.0)));
	else
		tmp = Float64(Float64(2.0 * Float64(cos(k) * Float64(l * l))) / Float64(Float64(t_m * (k ^ 2.0)) * (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 <= 4.2e-12)
		tmp = 2.0 / ((2.0 * k) * ((((t_m ^ 1.5) * sqrt(sin(k))) / l) ^ 2.0));
	else
		tmp = (2.0 * (cos(k) * (l * l))) / ((t_m * (k ^ 2.0)) * (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, 4.2e-12], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.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 4.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t\_m}^{1.5} \cdot \sqrt{\sin k}}{\ell}\right)}^{2}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.19999999999999988e-12 < k

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

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

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

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

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

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

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

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

Alternative 15: 64.6% 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}\;\ell \leq 7.5 \cdot 10^{+122}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{\ell}{\tan k} \cdot \frac{2}{\sin k \cdot {t\_m}^{3}}\right) \cdot \left(\ell \cdot 0.5\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 (<= l 7.5e+122)
    (/ 2.0 (* (* 2.0 k) (pow (* t_m (cbrt (/ k (pow l 2.0)))) 3.0)))
    (* (* (/ l (tan k)) (/ 2.0 (* (sin k) (pow t_m 3.0)))) (* l 0.5)))))
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 (l <= 7.5e+122) {
		tmp = 2.0 / ((2.0 * k) * pow((t_m * cbrt((k / pow(l, 2.0)))), 3.0));
	} else {
		tmp = ((l / tan(k)) * (2.0 / (sin(k) * pow(t_m, 3.0)))) * (l * 0.5);
	}
	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 (l <= 7.5e+122) {
		tmp = 2.0 / ((2.0 * k) * Math.pow((t_m * Math.cbrt((k / Math.pow(l, 2.0)))), 3.0));
	} else {
		tmp = ((l / Math.tan(k)) * (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l * 0.5);
	}
	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 (l <= 7.5e+122)
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * (Float64(t_m * cbrt(Float64(k / (l ^ 2.0)))) ^ 3.0)));
	else
		tmp = Float64(Float64(Float64(l / tan(k)) * Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l * 0.5));
	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[l, 7.5e+122], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $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}\;\ell \leq 7.5 \cdot 10^{+122}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(t\_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 7.5000000000000002e122

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

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

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

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

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

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

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

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

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

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

    if 7.5000000000000002e122 < l

    1. Initial program 30.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. Simplified30.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 64.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}\;t\_m \leq 2.6 \cdot 10^{-47}:\\ \;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{t\_m \cdot {k}^{4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}\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.6e-47)
    (/ (* 2.0 (* (pow l 2.0) (cos k))) (* t_m (pow k 4.0)))
    (/ 2.0 (* (* 2.0 k) (* k (/ (pow (/ t_m (cbrt l)) 3.0) l)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.6e-47) {
		tmp = (2.0 * (pow(l, 2.0) * cos(k))) / (t_m * pow(k, 4.0));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (pow((t_m / cbrt(l)), 3.0) / l)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.6e-47) {
		tmp = (2.0 * (Math.pow(l, 2.0) * Math.cos(k))) / (t_m * Math.pow(k, 4.0));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 2.6e-47)
		tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * cos(k))) / Float64(t_m * (k ^ 4.0)));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(k * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.6e-47], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(k * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.6 \cdot 10^{-47}:\\
\;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{t\_m \cdot {k}^{4}}\\

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


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

    1. Initial program 48.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. Taylor expanded in t around 0 61.2%

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

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

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

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

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

    if 2.6e-47 < t

    1. Initial program 68.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. Simplified68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left({\color{blue}{\left(\left(t \cdot \sqrt[3]{\frac{1}{\ell}}\right) \cdot \sqrt[3]{\frac{1}{\ell}}\right)}}^{3} \cdot k\right) \cdot \left(2 \cdot k\right)} \]
      15. unpow-prod-down76.0%

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

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

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

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

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

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

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

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

Alternative 17: 64.3% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.3 \cdot 10^{-52}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{{k}^{3} \cdot \left(t\_m \cdot \sin k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}\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.3e-52)
    (* 2.0 (/ (pow l 2.0) (* (pow k 3.0) (* t_m (sin k)))))
    (/ 2.0 (* (* 2.0 k) (* k (/ (pow (/ t_m (cbrt l)) 3.0) l)))))))
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.3e-52) {
		tmp = 2.0 * (pow(l, 2.0) / (pow(k, 3.0) * (t_m * sin(k))));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (pow((t_m / cbrt(l)), 3.0) / l)));
	}
	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.3e-52) {
		tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow(k, 3.0) * (t_m * Math.sin(k))));
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)));
	}
	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.3e-52)
		tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((k ^ 3.0) * Float64(t_m * sin(k)))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(k * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l))));
	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.3e-52], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 3.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(k * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.3 \cdot 10^{-52}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{k}^{3} \cdot \left(t\_m \cdot \sin k\right)}\\

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


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

    1. Initial program 48.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. Simplified48.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. Taylor expanded in k around 0 43.9%

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

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

    if 1.2999999999999999e-52 < t

    1. Initial program 68.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. Simplified68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left({\color{blue}{\left(\left(t \cdot \sqrt[3]{\frac{1}{\ell}}\right) \cdot \sqrt[3]{\frac{1}{\ell}}\right)}}^{3} \cdot k\right) \cdot \left(2 \cdot k\right)} \]
      15. unpow-prod-down76.0%

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

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

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

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

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

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

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

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

Alternative 18: 64.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}\;t\_m \leq 4.6 \cdot 10^{-48}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}\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 4.6e-48)
    (* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t_m))
    (/ 2.0 (* (* 2.0 k) (* k (/ (pow (/ t_m (cbrt l)) 3.0) l)))))))
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.6e-48) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m);
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (pow((t_m / cbrt(l)), 3.0) / l)));
	}
	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.6e-48) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m);
	} else {
		tmp = 2.0 / ((2.0 * k) * (k * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)));
	}
	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.6e-48)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(k * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l))));
	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.6e-48], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(k * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.6 \cdot 10^{-48}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\

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


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

    1. Initial program 48.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. Taylor expanded in t around 0 61.2%

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

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

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

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

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

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

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

    if 4.6000000000000001e-48 < t

    1. Initial program 68.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. Simplified68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left({\color{blue}{\left(\left(t \cdot \sqrt[3]{\frac{1}{\ell}}\right) \cdot \sqrt[3]{\frac{1}{\ell}}\right)}}^{3} \cdot k\right) \cdot \left(2 \cdot k\right)} \]
      15. unpow-prod-down76.0%

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

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

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

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

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

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

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

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

Alternative 19: 64.3% accurate, 2.0× speedup?

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

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


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

    1. Initial program 48.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. Taylor expanded in t around 0 61.2%

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

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

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

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

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

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

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

    if 1.5499999999999999e-47 < t

    1. Initial program 68.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. Simplified68.2%

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

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

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

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

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

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

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

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

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

Alternative 20: 62.3% 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 k\right) \cdot \left(k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (* 2.0 k) (* k (* (/ (pow t_m 2.0) l) (/ 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 * ((pow(t_m, 2.0) / l) * (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 ** 2.0d0) / l) * (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 * ((Math.pow(t_m, 2.0) / l) * (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 * ((math.pow(t_m, 2.0) / l) * (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 * k) * Float64(k * Float64(Float64((t_m ^ 2.0) / l) * Float64(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 ^ 2.0) / l) * (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 * k), $MachinePrecision] * N[(k * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $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 \frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}
\end{array}
Derivation
  1. Initial program 54.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. Simplified54.3%

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

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

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

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

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

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

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

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

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

Alternative 21: 54.8% 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 k\right) \cdot \left(k \cdot \frac{t\_m \cdot \left(t\_m \cdot t\_m\right)}{\ell \cdot \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 (* t_m 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 * ((t_m * (t_m * 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 * (t_m * 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 * ((t_m * (t_m * 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 * ((t_m * (t_m * 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 * k) * Float64(k * Float64(Float64(t_m * Float64(t_m * t_m)) / Float64(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 * (t_m * 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 * k), $MachinePrecision] * N[(k * N[(N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / N[(l * l), $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 \frac{2}{\left(2 \cdot k\right) \cdot \left(k \cdot \frac{t\_m \cdot \left(t\_m \cdot t\_m\right)}{\ell \cdot \ell}\right)}
\end{array}
Derivation
  1. Initial program 54.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. Simplified54.3%

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

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

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

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

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

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

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

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

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

Reproduce

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