Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.7% → 86.5%
Time: 23.3s
Alternatives: 19
Speedup: 1.9×

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 19 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: 86.5% accurate, 0.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\sin k}^{2}\\ t_3 := \frac{t\_m}{\cos k}\\ t_4 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5.9 \cdot 10^{-235}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{t\_3}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 2.05 \cdot 10^{-178}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{t\_2}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 3.7 \cdot 10^{-147}:\\ \;\;\;\;{\left(\left(\frac{\sqrt{2}}{\sin k} \cdot \frac{\ell}{k}\right) \cdot \sqrt{\frac{\cos k}{t\_m}}\right)}^{2}\\ \mathbf{elif}\;t\_m \leq 3.3 \cdot 10^{-114}:\\ \;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{\frac{t\_3 \cdot t\_2}{{\ell}^{2}}}\right)}^{3}}\\ \mathbf{elif}\;t\_m \leq 3.8 \cdot 10^{-94}:\\ \;\;\;\;\frac{2}{{\left(t\_4 \cdot \left(k \cdot \left(\sqrt[3]{\frac{t\_2}{\cos k \cdot \left(k \cdot {t\_m}^{2}\right)}} + 0.6666666666666666 \cdot \sqrt[3]{{t\_m}^{4} \cdot \frac{t\_2}{\cos k \cdot {k}^{7}}}\right)\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(t\_4 \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \tan 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 (pow (sin k) 2.0))
        (t_3 (/ t_m (cos k)))
        (t_4 (/ t_m (pow (cbrt l) 2.0))))
   (*
    t_s
    (if (<= t_m 5.9e-235)
      (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt t_3)) 2.0))
      (if (<= t_m 2.05e-178)
        (/ 2.0 (* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ t_2 (cos k))))
        (if (<= t_m 3.7e-147)
          (pow
           (* (* (/ (sqrt 2.0) (sin k)) (/ l k)) (sqrt (/ (cos k) t_m)))
           2.0)
          (if (<= t_m 3.3e-114)
            (/
             2.0
             (pow
              (* (pow (cbrt k) 2.0) (cbrt (/ (* t_3 t_2) (pow l 2.0))))
              3.0))
            (if (<= t_m 3.8e-94)
              (/
               2.0
               (pow
                (*
                 t_4
                 (*
                  k
                  (+
                   (cbrt (/ t_2 (* (cos k) (* k (pow t_m 2.0)))))
                   (*
                    0.6666666666666666
                    (cbrt
                     (* (pow t_m 4.0) (/ t_2 (* (cos k) (pow k 7.0)))))))))
                3.0))
              (/
               2.0
               (pow
                (*
                 t_4
                 (*
                  (cbrt (sin k))
                  (cbrt (* (+ 2.0 (pow (/ k t_m) 2.0)) (tan 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 = pow(sin(k), 2.0);
	double t_3 = t_m / cos(k);
	double t_4 = t_m / pow(cbrt(l), 2.0);
	double tmp;
	if (t_m <= 5.9e-235) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt(t_3)), 2.0);
	} else if (t_m <= 2.05e-178) {
		tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (t_2 / cos(k)));
	} else if (t_m <= 3.7e-147) {
		tmp = pow((((sqrt(2.0) / sin(k)) * (l / k)) * sqrt((cos(k) / t_m))), 2.0);
	} else if (t_m <= 3.3e-114) {
		tmp = 2.0 / pow((pow(cbrt(k), 2.0) * cbrt(((t_3 * t_2) / pow(l, 2.0)))), 3.0);
	} else if (t_m <= 3.8e-94) {
		tmp = 2.0 / pow((t_4 * (k * (cbrt((t_2 / (cos(k) * (k * pow(t_m, 2.0))))) + (0.6666666666666666 * cbrt((pow(t_m, 4.0) * (t_2 / (cos(k) * pow(k, 7.0))))))))), 3.0);
	} else {
		tmp = 2.0 / pow((t_4 * (cbrt(sin(k)) * cbrt(((2.0 + pow((k / t_m), 2.0)) * tan(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.pow(Math.sin(k), 2.0);
	double t_3 = t_m / Math.cos(k);
	double t_4 = t_m / Math.pow(Math.cbrt(l), 2.0);
	double tmp;
	if (t_m <= 5.9e-235) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt(t_3)), 2.0);
	} else if (t_m <= 2.05e-178) {
		tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (t_2 / Math.cos(k)));
	} else if (t_m <= 3.7e-147) {
		tmp = Math.pow((((Math.sqrt(2.0) / Math.sin(k)) * (l / k)) * Math.sqrt((Math.cos(k) / t_m))), 2.0);
	} else if (t_m <= 3.3e-114) {
		tmp = 2.0 / Math.pow((Math.pow(Math.cbrt(k), 2.0) * Math.cbrt(((t_3 * t_2) / Math.pow(l, 2.0)))), 3.0);
	} else if (t_m <= 3.8e-94) {
		tmp = 2.0 / Math.pow((t_4 * (k * (Math.cbrt((t_2 / (Math.cos(k) * (k * Math.pow(t_m, 2.0))))) + (0.6666666666666666 * Math.cbrt((Math.pow(t_m, 4.0) * (t_2 / (Math.cos(k) * Math.pow(k, 7.0))))))))), 3.0);
	} else {
		tmp = 2.0 / Math.pow((t_4 * (Math.cbrt(Math.sin(k)) * Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) * Math.tan(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 = sin(k) ^ 2.0
	t_3 = Float64(t_m / cos(k))
	t_4 = Float64(t_m / (cbrt(l) ^ 2.0))
	tmp = 0.0
	if (t_m <= 5.9e-235)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(t_3)) ^ 2.0));
	elseif (t_m <= 2.05e-178)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64(t_2 / cos(k))));
	elseif (t_m <= 3.7e-147)
		tmp = Float64(Float64(Float64(sqrt(2.0) / sin(k)) * Float64(l / k)) * sqrt(Float64(cos(k) / t_m))) ^ 2.0;
	elseif (t_m <= 3.3e-114)
		tmp = Float64(2.0 / (Float64((cbrt(k) ^ 2.0) * cbrt(Float64(Float64(t_3 * t_2) / (l ^ 2.0)))) ^ 3.0));
	elseif (t_m <= 3.8e-94)
		tmp = Float64(2.0 / (Float64(t_4 * Float64(k * Float64(cbrt(Float64(t_2 / Float64(cos(k) * Float64(k * (t_m ^ 2.0))))) + Float64(0.6666666666666666 * cbrt(Float64((t_m ^ 4.0) * Float64(t_2 / Float64(cos(k) * (k ^ 7.0))))))))) ^ 3.0));
	else
		tmp = Float64(2.0 / (Float64(t_4 * Float64(cbrt(sin(k)) * cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * tan(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[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.9e-235], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.05e-178], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.7e-147], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 3.3e-114], N[(2.0 / N[Power[N[(N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[(t$95$3 * t$95$2), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.8e-94], N[(2.0 / N[Power[N[(t$95$4 * N[(k * N[(N[Power[N[(t$95$2 / N[(N[Cos[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.6666666666666666 * N[Power[N[(N[Power[t$95$m, 4.0], $MachinePrecision] * N[(t$95$2 / N[(N[Cos[k], $MachinePrecision] * N[Power[k, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$4 * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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}^{2}\\
t_3 := \frac{t\_m}{\cos k}\\
t_4 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.9 \cdot 10^{-235}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{t\_3}\right)}^{2}}\\

\mathbf{elif}\;t\_m \leq 2.05 \cdot 10^{-178}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{t\_2}{\cos k}}\\

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

\mathbf{elif}\;t\_m \leq 3.3 \cdot 10^{-114}:\\
\;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{\frac{t\_3 \cdot t\_2}{{\ell}^{2}}}\right)}^{3}}\\

\mathbf{elif}\;t\_m \leq 3.8 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{{\left(t\_4 \cdot \left(k \cdot \left(\sqrt[3]{\frac{t\_2}{\cos k \cdot \left(k \cdot {t\_m}^{2}\right)}} + 0.6666666666666666 \cdot \sqrt[3]{{t\_m}^{4} \cdot \frac{t\_2}{\cos k \cdot {k}^{7}}}\right)\right)\right)}^{3}}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < 5.9000000000000003e-235

    1. Initial program 43.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. Simplified43.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. Applied egg-rr4.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}}} \]
    5. Taylor expanded in t around 0 27.9%

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

    if 5.9000000000000003e-235 < t < 2.05e-178

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

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

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

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

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

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

    if 2.05e-178 < t < 3.7000000000000002e-147

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

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

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

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

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

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

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

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

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

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

    if 3.7000000000000002e-147 < t < 3.30000000000000035e-114

    1. Initial program 28.6%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified28.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. Step-by-step derivation
      1. associate-*l*28.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.30000000000000035e-114 < t < 3.79999999999999999e-94

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\frac{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. associate-*l*0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.79999999999999999e-94 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \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}} \]
    8. Step-by-step derivation
      1. *-commutative97.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.9 \cdot 10^{-235}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-178}:\\ \;\;\;\;\frac{2}{\frac{t \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\ \mathbf{elif}\;t \leq 3.7 \cdot 10^{-147}:\\ \;\;\;\;{\left(\left(\frac{\sqrt{2}}{\sin k} \cdot \frac{\ell}{k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-114}:\\ \;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{k}\right)}^{2} \cdot \sqrt[3]{\frac{\frac{t}{\cos k} \cdot {\sin k}^{2}}{{\ell}^{2}}}\right)}^{3}}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{-94}:\\ \;\;\;\;\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(k \cdot \left(\sqrt[3]{\frac{{\sin k}^{2}}{\cos k \cdot \left(k \cdot {t}^{2}\right)}} + 0.6666666666666666 \cdot \sqrt[3]{{t}^{4} \cdot \frac{{\sin k}^{2}}{\cos k \cdot {k}^{7}}}\right)\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \tan k}\right)\right)}^{3}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 75.1% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < -2.00000000000000008e-215

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000008e-215 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 1.99999999999999985e75

    1. Initial program 77.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. Simplified77.7%

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

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

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

    if 1.99999999999999985e75 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))))

    1. Initial program 24.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. Simplified24.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. Applied egg-rr41.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}}} \]
    5. Taylor expanded in t around 0 52.0%

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

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

Alternative 3: 86.5% accurate, 0.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sqrt{\frac{t\_m}{\cos k}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.75 \cdot 10^{-236}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot t\_2\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 1.95 \cdot 10^{-178}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 2.25 \cdot 10^{-98}:\\ \;\;\;\;\frac{2}{{\left(t\_2 \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \tan 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 (sqrt (/ t_m (cos k)))))
   (*
    t_s
    (if (<= t_m 1.75e-236)
      (/ 2.0 (pow (* (/ (* k (sin k)) l) t_2) 2.0))
      (if (<= t_m 1.95e-178)
        (/
         2.0
         (* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
        (if (<= t_m 2.25e-98)
          (/ 2.0 (pow (* t_2 (* k (/ (sin k) l))) 2.0))
          (/
           2.0
           (pow
            (*
             (/ t_m (pow (cbrt l) 2.0))
             (* (cbrt (sin k)) (cbrt (* (+ 2.0 (pow (/ k t_m) 2.0)) (tan 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 = sqrt((t_m / cos(k)));
	double tmp;
	if (t_m <= 1.75e-236) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * t_2), 2.0);
	} else if (t_m <= 1.95e-178) {
		tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
	} else if (t_m <= 2.25e-98) {
		tmp = 2.0 / pow((t_2 * (k * (sin(k) / l))), 2.0);
	} else {
		tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * cbrt(((2.0 + pow((k / t_m), 2.0)) * tan(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.sqrt((t_m / Math.cos(k)));
	double tmp;
	if (t_m <= 1.75e-236) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * t_2), 2.0);
	} else if (t_m <= 1.95e-178) {
		tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
	} else if (t_m <= 2.25e-98) {
		tmp = 2.0 / Math.pow((t_2 * (k * (Math.sin(k) / l))), 2.0);
	} else {
		tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) * Math.tan(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 = sqrt(Float64(t_m / cos(k)))
	tmp = 0.0
	if (t_m <= 1.75e-236)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * t_2) ^ 2.0));
	elseif (t_m <= 1.95e-178)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k))));
	elseif (t_m <= 2.25e-98)
		tmp = Float64(2.0 / (Float64(t_2 * Float64(k * Float64(sin(k) / l))) ^ 2.0));
	else
		tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * tan(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[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.75e-236], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.95e-178], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.25e-98], N[(2.0 / N[Power[N[(t$95$2 * N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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 := \sqrt{\frac{t\_m}{\cos k}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.75 \cdot 10^{-236}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot t\_2\right)}^{2}}\\

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

\mathbf{elif}\;t\_m \leq 2.25 \cdot 10^{-98}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}^{2}}\\

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


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

    1. Initial program 43.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. Simplified43.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. Applied egg-rr4.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}}} \]
    5. Taylor expanded in t around 0 27.9%

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

    if 1.74999999999999997e-236 < t < 1.95000000000000013e-178

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

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

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

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

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

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

    if 1.95000000000000013e-178 < t < 2.24999999999999998e-98

    1. Initial program 36.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. Simplified36.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. Applied egg-rr64.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}}} \]
    5. Taylor expanded in t around 0 71.1%

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

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

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

    if 2.24999999999999998e-98 < t

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \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}} \]
    8. Step-by-step derivation
      1. *-commutative96.1%

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

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

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

Alternative 4: 82.7% 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 := \sqrt{\frac{t\_m}{\cos k}}\\ t_3 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.6 \cdot 10^{-237}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot t\_2\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 3.2 \cdot 10^{-180}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 8.5 \cdot 10^{-99}:\\ \;\;\;\;\frac{2}{{\left(t\_2 \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 2.1 \cdot 10^{+73}:\\ \;\;\;\;\frac{\ell \cdot \frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{t\_3} \cdot \frac{\ell}{t\_3}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\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 (sqrt (/ t_m (cos k)))) (t_3 (hypot 1.0 (hypot 1.0 (/ k t_m)))))
   (*
    t_s
    (if (<= t_m 3.6e-237)
      (/ 2.0 (pow (* (/ (* k (sin k)) l) t_2) 2.0))
      (if (<= t_m 3.2e-180)
        (/
         2.0
         (* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
        (if (<= t_m 8.5e-99)
          (/ 2.0 (pow (* t_2 (* k (/ (sin k) l))) 2.0))
          (if (<= t_m 2.1e+73)
            (*
             (/ (* l (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k))))) t_3)
             (/ l t_3))
            (/
             2.0
             (*
              (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
              (* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.0))))))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = sqrt((t_m / cos(k)));
	double t_3 = hypot(1.0, hypot(1.0, (k / t_m)));
	double tmp;
	if (t_m <= 3.6e-237) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * t_2), 2.0);
	} else if (t_m <= 3.2e-180) {
		tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
	} else if (t_m <= 8.5e-99) {
		tmp = 2.0 / pow((t_2 * (k * (sin(k) / l))), 2.0);
	} else if (t_m <= 2.1e+73) {
		tmp = ((l * (2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k))))) / t_3) * (l / t_3);
	} else {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.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.sqrt((t_m / Math.cos(k)));
	double t_3 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
	double tmp;
	if (t_m <= 3.6e-237) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * t_2), 2.0);
	} else if (t_m <= 3.2e-180) {
		tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
	} else if (t_m <= 8.5e-99) {
		tmp = 2.0 / Math.pow((t_2 * (k * (Math.sin(k) / l))), 2.0);
	} else if (t_m <= 2.1e+73) {
		tmp = ((l * (2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k))))) / t_3) * (l / t_3);
	} else {
		tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.0))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = sqrt(Float64(t_m / cos(k)))
	t_3 = hypot(1.0, hypot(1.0, Float64(k / t_m)))
	tmp = 0.0
	if (t_m <= 3.6e-237)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * t_2) ^ 2.0));
	elseif (t_m <= 3.2e-180)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k))));
	elseif (t_m <= 8.5e-99)
		tmp = Float64(2.0 / (Float64(t_2 * Float64(k * Float64(sin(k) / l))) ^ 2.0));
	elseif (t_m <= 2.1e+73)
		tmp = Float64(Float64(Float64(l * Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k))))) / t_3) * Float64(l / t_3));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.0)))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.6e-237], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.2e-180], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8.5e-99], N[(2.0 / N[Power[N[(t$95$2 * N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.1e+73], N[(N[(N[(l * N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision] * N[(l / t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

\mathbf{elif}\;t\_m \leq 8.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}^{2}}\\

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < 3.59999999999999997e-237

    1. Initial program 43.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. Simplified43.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. Applied egg-rr4.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}}} \]
    5. Taylor expanded in t around 0 27.9%

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

    if 3.59999999999999997e-237 < t < 3.20000000000000015e-180

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

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

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

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

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

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

    if 3.20000000000000015e-180 < t < 8.5000000000000004e-99

    1. Initial program 36.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. Simplified36.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. Applied egg-rr64.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}}} \]
    5. Taylor expanded in t around 0 71.1%

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

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

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

    if 8.5000000000000004e-99 < t < 2.1000000000000001e73

    1. Initial program 91.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. Simplified91.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1000000000000001e73 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.6 \cdot 10^{-237}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-180}:\\ \;\;\;\;\frac{2}{\frac{t \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-99}:\\ \;\;\;\;\frac{2}{{\left(\sqrt{\frac{t}{\cos k}} \cdot \left(k \cdot \frac{\sin k}{\ell}\right)\right)}^{2}}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+73}:\\ \;\;\;\;\frac{\ell \cdot \frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)}}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;k \leq 6 \cdot 10^{+138}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \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}} \]
    8. Step-by-step derivation
      1. *-commutative87.3%

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

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

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

    if 4.8000000000000001e-58 < k < 6200

    1. Initial program 58.6%

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

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

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

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

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

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

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

    if 6200 < k < 6.0000000000000002e138

    1. Initial program 40.2%

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

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

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

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

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

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

    if 6.0000000000000002e138 < k

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 75.3% accurate, 0.6× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \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}} \]
    8. Step-by-step derivation
      1. *-commutative87.3%

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

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

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

    if 4.5000000000000003e-58 < k < 6200

    1. Initial program 58.6%

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

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

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

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

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

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

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

    if 6200 < k

    1. Initial program 42.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. Simplified42.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 t around 0 69.7%

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

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

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

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

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

Alternative 7: 75.3% accurate, 0.6× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \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}} \]
    8. Step-by-step derivation
      1. *-commutative87.3%

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

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

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

    if 4.5000000000000003e-58 < k < 2100

    1. Initial program 58.6%

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

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

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

    if 2100 < k

    1. Initial program 42.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. Simplified42.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 t around 0 69.7%

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

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

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

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

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

Alternative 8: 74.6% accurate, 0.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \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}} \]
    8. Step-by-step derivation
      1. *-commutative86.9%

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

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

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

    if 2.8e14 < k

    1. Initial program 42.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. Simplified42.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 t around 0 69.7%

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \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}} \]
    8. Step-by-step derivation
      1. *-commutative86.9%

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

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

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

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

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

    if 4e14 < k

    1. Initial program 42.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. Simplified42.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 t around 0 69.7%

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

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

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

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

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

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

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

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

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


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

    1. Initial program 42.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified42.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. Applied egg-rr15.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}}} \]
    5. Taylor expanded in t around 0 35.6%

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

    if 6.4000000000000001e-99 < t < 1.49999999999999988e70

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.49999999999999988e70 < t

    1. Initial program 56.5%

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

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Applied egg-rr58.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}}} \]
    5. Taylor expanded in k around 0 71.7%

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

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

Alternative 11: 74.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 42.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified42.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. Applied egg-rr15.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}}} \]
    5. Taylor expanded in t around 0 35.6%

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

    if 2.19999999999999996e-98 < t

    1. Initial program 72.1%

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

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

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

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

Alternative 12: 74.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 42.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified42.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. Applied egg-rr15.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}}} \]
    5. Taylor expanded in t around 0 35.6%

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

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

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

    if 1.85e-98 < t

    1. Initial program 72.1%

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

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

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

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

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

Alternative 13: 68.7% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.8 \cdot 10^{-130}:\\ \;\;\;\;\frac{2}{\mathsf{log1p}\left(\mathsf{expm1}\left({k}^{4} \cdot \left(t\_m \cdot {\ell}^{-2}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\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 (<= t_m 4.8e-130)
    (/ 2.0 (log1p (expm1 (* (pow k 4.0) (* t_m (pow l -2.0))))))
    (/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.8e-130) {
		tmp = 2.0 / log1p(expm1((pow(k, 4.0) * (t_m * pow(l, -2.0)))));
	} else {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.8e-130) {
		tmp = 2.0 / Math.log1p(Math.expm1((Math.pow(k, 4.0) * (t_m * Math.pow(l, -2.0)))));
	} else {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 4.8e-130:
		tmp = 2.0 / math.log1p(math.expm1((math.pow(k, 4.0) * (t_m * math.pow(l, -2.0)))))
	else:
		tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 4.8e-130)
		tmp = Float64(2.0 / log1p(expm1(Float64((k ^ 4.0) * Float64(t_m * (l ^ -2.0))))));
	else
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.8e-130], N[(2.0 / N[Log[1 + N[(Exp[N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.8 \cdot 10^{-130}:\\
\;\;\;\;\frac{2}{\mathsf{log1p}\left(\mathsf{expm1}\left({k}^{4} \cdot \left(t\_m \cdot {\ell}^{-2}\right)\right)\right)}\\

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


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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. log1p-expm1-u53.2%

        \[\leadsto \frac{2}{\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)\right)}} \]
      2. div-inv53.2%

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

        \[\leadsto \frac{2}{\mathsf{log1p}\left(\mathsf{expm1}\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)\right)} \]
      4. metadata-eval53.2%

        \[\leadsto \frac{2}{\mathsf{log1p}\left(\mathsf{expm1}\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)\right)} \]
    11. Applied egg-rr53.2%

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

    if 4.79999999999999993e-130 < t

    1. Initial program 71.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. Simplified71.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. Applied egg-rr65.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}}} \]
    5. Taylor expanded in k around 0 74.7%

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

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

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

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


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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow151.0%

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
    13. Simplified51.0%

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

    if 6.8000000000000001e-130 < t

    1. Initial program 71.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. Simplified71.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. Applied egg-rr65.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}}} \]
    5. Taylor expanded in k around 0 74.7%

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

Alternative 15: 58.1% accurate, 1.9× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

    if 1.27999999999999994e76 < k

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 56.0% accurate, 1.9× speedup?

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

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

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


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

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

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

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

    if 9.99999999999999983e76 < k

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 56.7% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.02 \cdot 10^{+67}:\\
\;\;\;\;\ell \cdot \frac{\frac{2}{\frac{{t\_m}^{3}}{\ell}}}{2 \cdot {k}^{2}}\\

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


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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{\left({t}^{1.5} \cdot \left({t}^{1.5} \cdot \frac{1}{\ell}\right)\right) \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
      6. associate-*r*30.5%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left(\left({t}^{1.5} \cdot {t}^{1.5}\right) \cdot \frac{1}{\ell}\right)} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}} \]
      7. pow-prod-up58.6%

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

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

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

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

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

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

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

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

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

    if 1.02000000000000002e67 < k

    1. Initial program 41.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. Simplified41.4%

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow149.0%

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
    13. Simplified49.0%

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

Alternative 18: 52.0% accurate, 2.0× speedup?

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

\\
t\_s \cdot \frac{2}{{k}^{4} \cdot \left(t\_m \cdot {\ell}^{-2}\right)}
\end{array}
Derivation
  1. Initial program 51.6%

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  10. Step-by-step derivation
    1. pow151.6%

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

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

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

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

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

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

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

Alternative 19: 51.1% accurate, 2.0× speedup?

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

\\
t\_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\right)
\end{array}
Derivation
  1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  11. Final simplification49.9%

    \[\leadsto 2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}} \]
  12. Add Preprocessing

Reproduce

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