Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.8% → 83.3%
Time: 22.5s
Alternatives: 26
Speedup: 2.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

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

\\
\begin{array}{l}
t_2 := \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 1.45 \cdot 10^{-201}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

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

\mathbf{elif}\;t\_m \leq 9.2 \cdot 10^{+76}:\\
\;\;\;\;\frac{\ell \cdot \frac{\frac{2}{\sin k \cdot {t\_m}^{3}}}{\tan k}}{t\_2} \cdot \frac{\ell}{t\_2}\\

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


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

    1. Initial program 57.3%

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

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

    if 1.4500000000000001e-201 < t < 1.1599999999999999e-114

    1. Initial program 33.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. Simplified33.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 86.5%

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

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

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

    if 1.1599999999999999e-114 < t < 9.20000000000000005e76

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

      \[\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*75.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-sqrt75.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-frac79.7%

        \[\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}}}} \]
    5. Applied egg-rr93.2%

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

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

        \[\leadsto \frac{\ell \cdot \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \sin k}}{\tan k}}}{\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)} \]
    7. Simplified93.3%

      \[\leadsto \color{blue}{\frac{\ell \cdot \frac{\frac{2}{{t}^{3} \cdot \sin k}}{\tan k}}{\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 9.20000000000000005e76 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 57.3%

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

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

    if 1.82000000000000006e-203 < t < 3.3999999999999998e-115

    1. Initial program 33.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. Simplified33.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 86.5%

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

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

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

    if 3.3999999999999998e-115 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 57.3%

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

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

    if 4.0000000000000001e-203 < t < 6.7999999999999996e-115

    1. Initial program 33.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. Simplified33.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 86.5%

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

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

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

    if 6.7999999999999996e-115 < t

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 81.1% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 57.3%

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

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

    if 1.65000000000000012e-203 < t < 7.29999999999999965e-115

    1. Initial program 33.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. Simplified33.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 86.5%

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

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

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

    if 7.29999999999999965e-115 < t

    1. Initial program 64.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. Simplified60.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*67.3%

        \[\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. *-un-lft-identity67.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 78.3% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 57.3%

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

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

    if 4.0500000000000001e-199 < t < 6.59999999999999979e-115

    1. Initial program 33.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. Simplified33.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 86.5%

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

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

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

    if 6.59999999999999979e-115 < t

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 78.3% accurate, 0.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.65 \cdot 10^{-199}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}}}{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{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 (<= t_m 3.65e-199)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 7.2e-115)
      (*
       2.0
       (* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* t_m (pow (sin k) 2.0)))))
      (/
       (/ 2.0 (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)))
       (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.65e-199) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 7.2e-115) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * pow(sin(k), 2.0))));
	} else {
		tmp = (2.0 / (sin(k) * pow((pow(t_m, 1.5) / l), 2.0))) / (tan(k) * (2.0 + pow((k / t_m), 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 <= 3.65d-199) then
        tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
    else if (t_m <= 7.2d-115) then
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 2.0d0)) * (cos(k) / (t_m * (sin(k) ** 2.0d0))))
    else
        tmp = (2.0d0 / (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0))) / (tan(k) * (2.0d0 + ((k / t_m) ** 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 <= 3.65e-199) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 7.2e-115) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
	} else {
		tmp = (2.0 / (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0))) / (Math.tan(k) * (2.0 + Math.pow((k / t_m), 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 <= 3.65e-199:
		tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0)
	elif t_m <= 7.2e-115:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * math.pow(math.sin(k), 2.0))))
	else:
		tmp = (2.0 / (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))) / (math.tan(k) * (2.0 + math.pow((k / t_m), 2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 3.65e-199)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 7.2e-115)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0)))));
	else
		tmp = Float64(Float64(2.0 / Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0))) / Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 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 <= 3.65e-199)
		tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0);
	elseif (t_m <= 7.2e-115)
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t_m * (sin(k) ^ 2.0))));
	else
		tmp = (2.0 / (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0))) / (tan(k) * (2.0 + ((k / t_m) ^ 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, 3.65e-199], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e-115], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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


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

    1. Initial program 57.3%

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

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

    if 3.65e-199 < t < 7.20000000000000018e-115

    1. Initial program 33.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. Simplified33.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 86.5%

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

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

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

    if 7.20000000000000018e-115 < t

    1. Initial program 64.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. Simplified64.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-/r*64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{{\left({t}^{1.5} \cdot \frac{1}{\ell}\right)}^{2}}}}{\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)} \]
      11. div-inv80.0%

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

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

Alternative 7: 78.5% accurate, 0.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4 \cdot 10^{-203}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{-114}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\ \mathbf{elif}\;t\_m \leq 1.22 \cdot 10^{+99}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \frac{\ell \cdot \frac{2}{\sin k \cdot {t\_m}^{3}}}{\tan k}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4e-203)
    (/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
    (if (<= t_m 1.05e-114)
      (*
       2.0
       (* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* t_m (pow (sin k) 2.0)))))
      (if (<= t_m 1.22e+99)
        (*
         (/ l (+ 2.0 (pow (/ k t_m) 2.0)))
         (/ (* l (/ 2.0 (* (sin k) (pow t_m 3.0)))) (tan k)))
        (/
         2.0
         (pow
          (* (/ (pow t_m 1.5) l) (* k (hypot 1.0 (hypot 1.0 (/ k t_m)))))
          2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4e-203) {
		tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
	} else if (t_m <= 1.05e-114) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * pow(sin(k), 2.0))));
	} else if (t_m <= 1.22e+99) {
		tmp = (l / (2.0 + pow((k / t_m), 2.0))) * ((l * (2.0 / (sin(k) * pow(t_m, 3.0)))) / tan(k));
	} else {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))), 2.0);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4e-203) {
		tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
	} else if (t_m <= 1.05e-114) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
	} else if (t_m <= 1.22e+99) {
		tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * ((l * (2.0 / (Math.sin(k) * Math.pow(t_m, 3.0)))) / Math.tan(k));
	} else {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.hypot(1.0, Math.hypot(1.0, (k / t_m))))), 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 <= 4e-203:
		tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0)
	elif t_m <= 1.05e-114:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * math.pow(math.sin(k), 2.0))))
	elif t_m <= 1.22e+99:
		tmp = (l / (2.0 + math.pow((k / t_m), 2.0))) * ((l * (2.0 / (math.sin(k) * math.pow(t_m, 3.0)))) / math.tan(k))
	else:
		tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.hypot(1.0, math.hypot(1.0, (k / t_m))))), 2.0)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 4e-203)
		tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0));
	elseif (t_m <= 1.05e-114)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0)))));
	elseif (t_m <= 1.22e+99)
		tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(l * Float64(2.0 / Float64(sin(k) * (t_m ^ 3.0)))) / tan(k)));
	else
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * hypot(1.0, hypot(1.0, Float64(k / t_m))))) ^ 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 <= 4e-203)
		tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0);
	elseif (t_m <= 1.05e-114)
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t_m * (sin(k) ^ 2.0))));
	elseif (t_m <= 1.22e+99)
		tmp = (l / (2.0 + ((k / t_m) ^ 2.0))) * ((l * (2.0 / (sin(k) * (t_m ^ 3.0)))) / tan(k));
	else
		tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * hypot(1.0, hypot(1.0, (k / t_m))))) ^ 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, 4e-203], 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.05e-114], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.22e+99], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $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 \cdot 10^{-203}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\

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

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

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


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

    1. Initial program 57.3%

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

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

    if 4.0000000000000001e-203 < t < 1.04999999999999996e-114

    1. Initial program 33.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. Simplified33.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 86.5%

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

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

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

    if 1.04999999999999996e-114 < t < 1.2199999999999999e99

    1. Initial program 68.2%

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

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

        \[\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. *-un-lft-identity76.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.2199999999999999e99 < t

    1. Initial program 58.7%

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

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

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

Alternative 8: 79.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t\_m \leq 2.2 \cdot 10^{-77} \lor \neg \left(t\_m \leq 1.22 \cdot 10^{+99}\right):\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\

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


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

    1. Initial program 57.3%

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

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

    if 5.20000000000000003e-194 < t < 2.20000000000000007e-77 or 1.2199999999999999e99 < t

    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. Applied egg-rr59.7%

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

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

    if 2.20000000000000007e-77 < t < 1.2199999999999999e99

    1. Initial program 68.4%

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

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

        \[\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. *-un-lft-identity75.8%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.2 \cdot 10^{-194}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-77} \lor \neg \left(t \leq 1.22 \cdot 10^{+99}\right):\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \cdot \frac{\ell \cdot \frac{2}{\sin k \cdot {t}^{3}}}{\tan k}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 77.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t\_m \leq 2 \cdot 10^{-78} \lor \neg \left(t\_m \leq 1.22 \cdot 10^{+99}\right):\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\

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


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

    1. Initial program 57.3%

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

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

    if 2.6999999999999999e-190 < t < 2e-78 or 1.2199999999999999e99 < t

    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. Applied egg-rr59.7%

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

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

    if 2e-78 < t < 1.2199999999999999e99

    1. Initial program 68.4%

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

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

        \[\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. *-un-lft-identity75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 75.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{-77} \lor \neg \left(t\_m \leq 2.1 \cdot 10^{+31}\right):\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\

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


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

    1. Initial program 57.3%

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

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

    if 7.00000000000000009e-193 < t < 1.05000000000000008e-77 or 2.09999999999999979e31 < t

    1. Initial program 57.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. Simplified57.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. Applied egg-rr62.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 82.9%

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

    if 1.05000000000000008e-77 < t < 2.09999999999999979e31

    1. Initial program 69.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 7 \cdot 10^{-193}:\\ \;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t}{\cos k}}\right)}^{2}}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-77} \lor \neg \left(t \leq 2.1 \cdot 10^{+31}\right):\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

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

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

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

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

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


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

    1. Initial program 57.3%

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

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

    if 3.0000000000000001e-203 < t < 2.20000000000000008e-83

    1. Initial program 45.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified45.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*59.3%

        \[\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. *-un-lft-identity59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000008e-83 < t < 1.2199999999999999e99

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

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

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

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

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

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

    if 1.2199999999999999e99 < t

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 57.3%

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

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

    if 2.10000000000000002e-199 < t < 1.81999999999999991e-84

    1. Initial program 45.7%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified45.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*59.3%

        \[\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. *-un-lft-identity59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.81999999999999991e-84 < t < 1.2199999999999999e99

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

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

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

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

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

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

    if 1.2199999999999999e99 < t

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 68.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 55.8%

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

      \[\leadsto \color{blue}{\frac{\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*60.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. *-un-lft-identity60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.0000000000000001e-84 < t < 1.2199999999999999e99

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

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

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

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

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

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

    if 1.2199999999999999e99 < t

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 69.3% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 55.8%

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

      \[\leadsto \color{blue}{\frac{\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*60.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. *-un-lft-identity60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6199999999999999e-83 < t < 1.2199999999999999e99

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

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

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

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

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

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

    if 1.2199999999999999e99 < t < 9.4999999999999995e185

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

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

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

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

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

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

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

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

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

    if 9.4999999999999995e185 < t

    1. Initial program 74.2%

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

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

        \[\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. *-un-lft-identity74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 67.4% accurate, 1.3× speedup?

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

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

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

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


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

    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. Simplified54.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. associate-*r*60.4%

        \[\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. *-un-lft-identity60.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.4000000000000002e-38 < t < 1.0000000000000001e97

    1. Initial program 74.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. Simplified72.2%

      \[\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*78.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. *-un-lft-identity78.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e97 < t < 9.2000000000000005e185

    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. Simplified41.2%

      \[\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 36.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. sqr-pow36.3%

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

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

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

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

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

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

    if 9.2000000000000005e185 < t

    1. Initial program 74.2%

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

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

        \[\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. *-un-lft-identity74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 68.8% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 55.9%

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

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

        \[\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. *-un-lft-identity60.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999998e-95 < t < 1.15000000000000003e97

    1. Initial program 68.2%

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

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

        \[\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. *-un-lft-identity73.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15000000000000003e97 < t < 2.6000000000000001e186

    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. Simplified41.2%

      \[\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 36.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. sqr-pow36.3%

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

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

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

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

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

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

    if 2.6000000000000001e186 < t

    1. Initial program 74.2%

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

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

        \[\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. *-un-lft-identity74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 56.0%

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

      \[\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*60.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. *-un-lft-identity60.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999953e-45 < t

    1. Initial program 63.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{\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*66.4%

        \[\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. *-un-lft-identity66.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 66.4% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 56.0%

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

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

        \[\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. *-un-lft-identity60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.89999999999999995e-36 < t

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

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

        \[\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. *-un-lft-identity66.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 66.4% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 56.0%

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

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

        \[\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. *-un-lft-identity60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.49999999999999994e-35 < t

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

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

        \[\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. *-un-lft-identity66.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 60.3% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 59.3%

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

        \[\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. *-un-lft-identity63.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.00000000000000034e183 < k

    1. Initial program 47.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. Simplified48.5%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 48.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. associate-*l/48.7%

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

      \[\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-/l*48.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    8. Simplified48.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    9. Step-by-step derivation
      1. add-cube-cbrt48.7%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{{t}^{3}}{\ell}} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell}}\right) \cdot \sqrt[3]{\frac{{t}^{3}}{\ell}}\right)} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
      2. pow348.7%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{{t}^{3}}{\ell}}\right)}^{3}} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
      3. cbrt-div48.7%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{\ell}}\right)}}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
      4. rem-cbrt-cube58.2%

        \[\leadsto \frac{2}{{\left(\frac{\color{blue}{t}}{\sqrt[3]{\ell}}\right)}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
    10. Applied egg-rr58.2%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{t}{\sqrt[3]{\ell}}\right)}^{3}} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 9 \cdot 10^{+183}:\\ \;\;\;\;\ell \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{\sin k \cdot {t}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t}{\sqrt[3]{\ell}}\right)}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 60.3% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 9 \cdot 10^{+183}:\\ \;\;\;\;\ell \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{\sin k \cdot {t\_m}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\ \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 9e+183)
    (* l (* (/ l k) (/ (cos k) (* (sin k) (pow t_m 3.0)))))
    (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (pow (/ t_m (cbrt l)) 3.0) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 9e+183) {
		tmp = l * ((l / k) * (cos(k) / (sin(k) * pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * (pow((t_m / cbrt(l)), 3.0) / l));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 9e+183) {
		tmp = l * ((l / k) * (Math.cos(k) / (Math.sin(k) * Math.pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 9e+183)
		tmp = Float64(l * Float64(Float64(l / k) * Float64(cos(k) / Float64(sin(k) * (t_m ^ 3.0)))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 9e+183], N[(l * N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 9 \cdot 10^{+183}:\\
\;\;\;\;\ell \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{\sin k \cdot {t\_m}^{3}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 9.00000000000000034e183

    1. Initial program 59.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified56.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. associate-*r*63.6%

        \[\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. *-un-lft-identity63.6%

        \[\leadsto \frac{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}{\color{blue}{1 \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}} \]
      3. times-frac63.1%

        \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
      4. associate-*r*66.7%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr66.7%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    6. Step-by-step derivation
      1. /-rgt-identity66.7%

        \[\leadsto \color{blue}{\left(\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. *-commutative66.7%

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. associate-/r*66.7%

        \[\leadsto \left(\ell \cdot \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \sin k}}{\tan k}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified66.7%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{\frac{2}{{t}^{3} \cdot \sin k}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    8. Taylor expanded in k around 0 61.5%

      \[\leadsto \left(\ell \cdot \frac{\frac{2}{\color{blue}{k \cdot {t}^{3}}}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    9. Step-by-step derivation
      1. associate-*r/62.8%

        \[\leadsto \color{blue}{\frac{\left(\ell \cdot \frac{\frac{2}{k \cdot {t}^{3}}}{\tan k}\right) \cdot \ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
      2. associate-/r*62.8%

        \[\leadsto \frac{\left(\ell \cdot \frac{\color{blue}{\frac{\frac{2}{k}}{{t}^{3}}}}{\tan k}\right) \cdot \ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    10. Applied egg-rr62.8%

      \[\leadsto \color{blue}{\frac{\left(\ell \cdot \frac{\frac{\frac{2}{k}}{{t}^{3}}}{\tan k}\right) \cdot \ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/61.5%

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{\frac{\frac{2}{k}}{{t}^{3}}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
      2. associate-*l*61.5%

        \[\leadsto \color{blue}{\ell \cdot \left(\frac{\frac{\frac{2}{k}}{{t}^{3}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right)} \]
      3. associate-/l/61.5%

        \[\leadsto \ell \cdot \left(\frac{\color{blue}{\frac{2}{{t}^{3} \cdot k}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right) \]
      4. *-commutative61.5%

        \[\leadsto \ell \cdot \left(\frac{\frac{2}{\color{blue}{k \cdot {t}^{3}}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right) \]
    12. Simplified61.5%

      \[\leadsto \color{blue}{\ell \cdot \left(\frac{\frac{2}{k \cdot {t}^{3}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right)} \]
    13. Taylor expanded in t around inf 64.5%

      \[\leadsto \ell \cdot \color{blue}{\frac{\ell \cdot \cos k}{k \cdot \left({t}^{3} \cdot \sin k\right)}} \]
    14. Step-by-step derivation
      1. times-frac64.8%

        \[\leadsto \ell \cdot \color{blue}{\left(\frac{\ell}{k} \cdot \frac{\cos k}{{t}^{3} \cdot \sin k}\right)} \]
    15. Simplified64.8%

      \[\leadsto \ell \cdot \color{blue}{\left(\frac{\ell}{k} \cdot \frac{\cos k}{{t}^{3} \cdot \sin k}\right)} \]

    if 9.00000000000000034e183 < k

    1. Initial program 47.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. Simplified48.5%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 48.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. add-cube-cbrt48.7%

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\sqrt[3]{\frac{{t}^{3}}{\ell}} \cdot \sqrt[3]{\frac{{t}^{3}}{\ell}}\right) \cdot \sqrt[3]{\frac{{t}^{3}}{\ell}}\right)} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
      2. pow348.7%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt[3]{\frac{{t}^{3}}{\ell}}\right)}^{3}} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
      3. cbrt-div48.7%

        \[\leadsto \frac{2}{{\color{blue}{\left(\frac{\sqrt[3]{{t}^{3}}}{\sqrt[3]{\ell}}\right)}}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
      4. rem-cbrt-cube58.2%

        \[\leadsto \frac{2}{{\left(\frac{\color{blue}{t}}{\sqrt[3]{\ell}}\right)}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
    6. Applied egg-rr58.0%

      \[\leadsto \frac{2}{\frac{\color{blue}{{\left(\frac{t}{\sqrt[3]{\ell}}\right)}^{3}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification64.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 9 \cdot 10^{+183}:\\ \;\;\;\;\ell \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{\sin k \cdot {t}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{\left(\frac{t}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 60.2% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 8.4 \cdot 10^{+183}:\\ \;\;\;\;\ell \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{\sin k \cdot {t\_m}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \left({t\_m}^{2} \cdot \frac{t\_m}{\ell}\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 8.4e+183)
    (* l (* (/ l k) (/ (cos k) (* (sin k) (pow t_m 3.0)))))
    (/ 2.0 (* (/ (* 2.0 (pow k 2.0)) l) (* (pow t_m 2.0) (/ t_m l)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 8.4e+183) {
		tmp = l * ((l / k) * (cos(k) / (sin(k) * pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / (((2.0 * pow(k, 2.0)) / l) * (pow(t_m, 2.0) * (t_m / l)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 8.4d+183) then
        tmp = l * ((l / k) * (cos(k) / (sin(k) * (t_m ** 3.0d0))))
    else
        tmp = 2.0d0 / (((2.0d0 * (k ** 2.0d0)) / l) * ((t_m ** 2.0d0) * (t_m / l)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 8.4e+183) {
		tmp = l * ((l / k) * (Math.cos(k) / (Math.sin(k) * Math.pow(t_m, 3.0))));
	} else {
		tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) / l) * (Math.pow(t_m, 2.0) * (t_m / l)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 8.4e+183:
		tmp = l * ((l / k) * (math.cos(k) / (math.sin(k) * math.pow(t_m, 3.0))))
	else:
		tmp = 2.0 / (((2.0 * math.pow(k, 2.0)) / l) * (math.pow(t_m, 2.0) * (t_m / l)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 8.4e+183)
		tmp = Float64(l * Float64(Float64(l / k) * Float64(cos(k) / Float64(sin(k) * (t_m ^ 3.0)))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) / l) * Float64((t_m ^ 2.0) * Float64(t_m / l))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 8.4e+183)
		tmp = l * ((l / k) * (cos(k) / (sin(k) * (t_m ^ 3.0))));
	else
		tmp = 2.0 / (((2.0 * (k ^ 2.0)) / l) * ((t_m ^ 2.0) * (t_m / l)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 8.4e+183], N[(l * N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 8.4 \cdot 10^{+183}:\\
\;\;\;\;\ell \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{\sin k \cdot {t\_m}^{3}}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \left({t\_m}^{2} \cdot \frac{t\_m}{\ell}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 8.4e183

    1. Initial program 59.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified56.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. associate-*r*63.6%

        \[\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. *-un-lft-identity63.6%

        \[\leadsto \frac{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}{\color{blue}{1 \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}} \]
      3. times-frac63.1%

        \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
      4. associate-*r*66.7%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr66.7%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    6. Step-by-step derivation
      1. /-rgt-identity66.7%

        \[\leadsto \color{blue}{\left(\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. *-commutative66.7%

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      3. associate-/r*66.7%

        \[\leadsto \left(\ell \cdot \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \sin k}}{\tan k}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified66.7%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{\frac{2}{{t}^{3} \cdot \sin k}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    8. Taylor expanded in k around 0 61.5%

      \[\leadsto \left(\ell \cdot \frac{\frac{2}{\color{blue}{k \cdot {t}^{3}}}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    9. Step-by-step derivation
      1. associate-*r/62.8%

        \[\leadsto \color{blue}{\frac{\left(\ell \cdot \frac{\frac{2}{k \cdot {t}^{3}}}{\tan k}\right) \cdot \ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
      2. associate-/r*62.8%

        \[\leadsto \frac{\left(\ell \cdot \frac{\color{blue}{\frac{\frac{2}{k}}{{t}^{3}}}}{\tan k}\right) \cdot \ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    10. Applied egg-rr62.8%

      \[\leadsto \color{blue}{\frac{\left(\ell \cdot \frac{\frac{\frac{2}{k}}{{t}^{3}}}{\tan k}\right) \cdot \ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    11. Step-by-step derivation
      1. associate-*r/61.5%

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{\frac{\frac{2}{k}}{{t}^{3}}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
      2. associate-*l*61.5%

        \[\leadsto \color{blue}{\ell \cdot \left(\frac{\frac{\frac{2}{k}}{{t}^{3}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right)} \]
      3. associate-/l/61.5%

        \[\leadsto \ell \cdot \left(\frac{\color{blue}{\frac{2}{{t}^{3} \cdot k}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right) \]
      4. *-commutative61.5%

        \[\leadsto \ell \cdot \left(\frac{\frac{2}{\color{blue}{k \cdot {t}^{3}}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right) \]
    12. Simplified61.5%

      \[\leadsto \color{blue}{\ell \cdot \left(\frac{\frac{2}{k \cdot {t}^{3}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right)} \]
    13. Taylor expanded in t around inf 64.5%

      \[\leadsto \ell \cdot \color{blue}{\frac{\ell \cdot \cos k}{k \cdot \left({t}^{3} \cdot \sin k\right)}} \]
    14. Step-by-step derivation
      1. times-frac64.8%

        \[\leadsto \ell \cdot \color{blue}{\left(\frac{\ell}{k} \cdot \frac{\cos k}{{t}^{3} \cdot \sin k}\right)} \]
    15. Simplified64.8%

      \[\leadsto \ell \cdot \color{blue}{\left(\frac{\ell}{k} \cdot \frac{\cos k}{{t}^{3} \cdot \sin k}\right)} \]

    if 8.4e183 < k

    1. Initial program 47.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. Simplified48.5%

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 48.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. associate-*l/48.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    6. Applied egg-rr48.7%

      \[\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-/l*48.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    8. Simplified48.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    9. Step-by-step derivation
      1. unpow348.7%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
      2. *-un-lft-identity48.7%

        \[\leadsto \frac{2}{\frac{\left(t \cdot t\right) \cdot t}{\color{blue}{1 \cdot \ell}} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
      3. times-frac48.7%

        \[\leadsto \frac{2}{\color{blue}{\left(\frac{t \cdot t}{1} \cdot \frac{t}{\ell}\right)} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
      4. pow248.7%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{{t}^{2}}}{1} \cdot \frac{t}{\ell}\right) \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
    10. Applied egg-rr48.7%

      \[\leadsto \frac{2}{\color{blue}{\left(\frac{{t}^{2}}{1} \cdot \frac{t}{\ell}\right)} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 8.4 \cdot 10^{+183}:\\ \;\;\;\;\ell \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{\sin k \cdot {t}^{3}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \left({t}^{2} \cdot \frac{t}{\ell}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 57.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}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (* (pow t_m 2.0) (/ t_m l)) l)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 2.0) * (t_m / l)) / l)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 2.0d0) * (t_m / l)) / l)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 2.0) * (t_m / l)) / l)));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 2.0) * (t_m / l)) / l)))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 2.0) * (t_m / l)) / l)));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}
\end{array}
Derivation
  1. Initial program 58.3%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified62.1%

    \[\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.7%

    \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
  5. Step-by-step derivation
    1. unpow358.1%

      \[\leadsto \frac{2}{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
    2. *-un-lft-identity58.1%

      \[\leadsto \frac{2}{\frac{\left(t \cdot t\right) \cdot t}{\color{blue}{1 \cdot \ell}} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
    3. times-frac60.9%

      \[\leadsto \frac{2}{\color{blue}{\left(\frac{t \cdot t}{1} \cdot \frac{t}{\ell}\right)} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
    4. pow260.9%

      \[\leadsto \frac{2}{\left(\frac{\color{blue}{{t}^{2}}}{1} \cdot \frac{t}{\ell}\right) \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
  6. Applied egg-rr61.4%

    \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{t}^{2}}{1} \cdot \frac{t}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
  7. Final simplification61.4%

    \[\leadsto \frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t}^{2} \cdot \frac{t}{\ell}}{\ell}} \]
  8. Add Preprocessing

Alternative 24: 57.5% 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}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \left({t\_m}^{2} \cdot \frac{t\_m}{\ell}\right)} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (/ (* 2.0 (pow k 2.0)) l) (* (pow t_m 2.0) (/ t_m l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (((2.0 * pow(k, 2.0)) / l) * (pow(t_m, 2.0) * (t_m / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / (((2.0d0 * (k ** 2.0d0)) / l) * ((t_m ** 2.0d0) * (t_m / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (((2.0 * Math.pow(k, 2.0)) / l) * (Math.pow(t_m, 2.0) * (t_m / l))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / (((2.0 * math.pow(k, 2.0)) / l) * (math.pow(t_m, 2.0) * (t_m / l))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) / l) * Float64((t_m ^ 2.0) * Float64(t_m / l)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / (((2.0 * (k ^ 2.0)) / l) * ((t_m ^ 2.0) * (t_m / l))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \left({t\_m}^{2} \cdot \frac{t\_m}{\ell}\right)}
\end{array}
Derivation
  1. Initial program 58.3%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified62.1%

    \[\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.7%

    \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
  5. Step-by-step derivation
    1. associate-*l/58.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
  6. Applied egg-rr58.4%

    \[\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-/l*58.1%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
  8. Simplified58.1%

    \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
  9. Step-by-step derivation
    1. unpow358.1%

      \[\leadsto \frac{2}{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
    2. *-un-lft-identity58.1%

      \[\leadsto \frac{2}{\frac{\left(t \cdot t\right) \cdot t}{\color{blue}{1 \cdot \ell}} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
    3. times-frac60.9%

      \[\leadsto \frac{2}{\color{blue}{\left(\frac{t \cdot t}{1} \cdot \frac{t}{\ell}\right)} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
    4. pow260.9%

      \[\leadsto \frac{2}{\left(\frac{\color{blue}{{t}^{2}}}{1} \cdot \frac{t}{\ell}\right) \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
  10. Applied egg-rr60.9%

    \[\leadsto \frac{2}{\color{blue}{\left(\frac{{t}^{2}}{1} \cdot \frac{t}{\ell}\right)} \cdot \frac{2 \cdot {k}^{2}}{\ell}} \]
  11. Final simplification60.9%

    \[\leadsto \frac{2}{\frac{2 \cdot {k}^{2}}{\ell} \cdot \left({t}^{2} \cdot \frac{t}{\ell}\right)} \]
  12. Add Preprocessing

Alternative 25: 54.7% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\ell \cdot \frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}\right) \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* l (/ 2.0 (/ (* (pow t_m 3.0) (* 2.0 (pow k 2.0))) l)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (l * (2.0 / ((pow(t_m, 3.0) * (2.0 * pow(k, 2.0))) / l)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (l * (2.0d0 / (((t_m ** 3.0d0) * (2.0d0 * (k ** 2.0d0))) / l)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (l * (2.0 / ((Math.pow(t_m, 3.0) * (2.0 * Math.pow(k, 2.0))) / l)));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (l * (2.0 / ((math.pow(t_m, 3.0) * (2.0 * math.pow(k, 2.0))) / l)))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(l * Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(2.0 * (k ^ 2.0))) / l))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (l * (2.0 / (((t_m ^ 3.0) * (2.0 * (k ^ 2.0))) / l)));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\ell \cdot \frac{2}{\frac{{t\_m}^{3} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}\right)
\end{array}
Derivation
  1. Initial program 58.3%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified62.1%

    \[\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.7%

    \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
  5. Step-by-step derivation
    1. associate-*l/58.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
  6. Applied egg-rr58.4%

    \[\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.4%

      \[\leadsto \color{blue}{\frac{2}{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \cdot \ell} \]
    2. associate-*l/58.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \cdot \ell \]
  8. Applied egg-rr58.8%

    \[\leadsto \color{blue}{\frac{2}{\frac{{t}^{3} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}} \cdot \ell} \]
  9. Final simplification58.8%

    \[\leadsto \ell \cdot \frac{2}{\frac{{t}^{3} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}} \]
  10. Add Preprocessing

Alternative 26: 54.7% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\ell \cdot \frac{\ell}{{k}^{2} \cdot {t\_m}^{3}}\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 (* l (/ l (* (pow k 2.0) (pow t_m 3.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (l * (l / (pow(k, 2.0) * pow(t_m, 3.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (l * (l / ((k ** 2.0d0) * (t_m ** 3.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (l * (l / (Math.pow(k, 2.0) * Math.pow(t_m, 3.0))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (l * (l / (math.pow(k, 2.0) * math.pow(t_m, 3.0))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(l * Float64(l / Float64((k ^ 2.0) * (t_m ^ 3.0)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (l * (l / ((k ^ 2.0) * (t_m ^ 3.0))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\ell \cdot \frac{\ell}{{k}^{2} \cdot {t\_m}^{3}}\right)
\end{array}
Derivation
  1. Initial program 58.3%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified55.9%

    \[\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*62.4%

      \[\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. *-un-lft-identity62.4%

      \[\leadsto \frac{\left(\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell\right) \cdot \ell}{\color{blue}{1 \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}} \]
    3. times-frac61.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    4. associate-*r*65.2%

      \[\leadsto \frac{\frac{2}{\color{blue}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
  5. Applied egg-rr65.2%

    \[\leadsto \color{blue}{\frac{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
  6. Step-by-step derivation
    1. /-rgt-identity65.2%

      \[\leadsto \color{blue}{\left(\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k} \cdot \ell\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    2. *-commutative65.2%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}\right)} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    3. associate-/r*65.2%

      \[\leadsto \left(\ell \cdot \color{blue}{\frac{\frac{2}{{t}^{3} \cdot \sin k}}{\tan k}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
  7. Simplified65.2%

    \[\leadsto \color{blue}{\left(\ell \cdot \frac{\frac{2}{{t}^{3} \cdot \sin k}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
  8. Taylor expanded in k around 0 60.5%

    \[\leadsto \left(\ell \cdot \frac{\frac{2}{\color{blue}{k \cdot {t}^{3}}}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
  9. Step-by-step derivation
    1. associate-*r/61.7%

      \[\leadsto \color{blue}{\frac{\left(\ell \cdot \frac{\frac{2}{k \cdot {t}^{3}}}{\tan k}\right) \cdot \ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    2. associate-/r*61.7%

      \[\leadsto \frac{\left(\ell \cdot \frac{\color{blue}{\frac{\frac{2}{k}}{{t}^{3}}}}{\tan k}\right) \cdot \ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
  10. Applied egg-rr61.7%

    \[\leadsto \color{blue}{\frac{\left(\ell \cdot \frac{\frac{\frac{2}{k}}{{t}^{3}}}{\tan k}\right) \cdot \ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
  11. Step-by-step derivation
    1. associate-*r/60.5%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{\frac{\frac{2}{k}}{{t}^{3}}}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    2. associate-*l*60.5%

      \[\leadsto \color{blue}{\ell \cdot \left(\frac{\frac{\frac{2}{k}}{{t}^{3}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right)} \]
    3. associate-/l/60.5%

      \[\leadsto \ell \cdot \left(\frac{\color{blue}{\frac{2}{{t}^{3} \cdot k}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right) \]
    4. *-commutative60.5%

      \[\leadsto \ell \cdot \left(\frac{\frac{2}{\color{blue}{k \cdot {t}^{3}}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right) \]
  12. Simplified60.5%

    \[\leadsto \color{blue}{\ell \cdot \left(\frac{\frac{2}{k \cdot {t}^{3}}}{\tan k} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\right)} \]
  13. Taylor expanded in k around 0 58.8%

    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
  14. Add Preprocessing

Reproduce

?
herbie shell --seed 2024085 
(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))))