Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.1% → 89.5%
Time: 24.1s
Alternatives: 27
Speedup: 1.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 89.5% accurate, 0.5× speedup?

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

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

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

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


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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr53.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-identity53.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. *-commutative53.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. metadata-eval53.5%

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

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

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

        \[\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}} \]
      7. distribute-neg-frac53.5%

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

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

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

      \[\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}}} \]
    8. Step-by-step derivation
      1. pow153.5%

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

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

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

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

    if 2.60000000000000001e-95 < t < 4.80000000000000009e92

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-\color{blue}{\frac{\frac{-2}{\tan k}}{{t}^{3} \cdot \sin k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      5. distribute-neg-frac94.6%

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

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

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

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

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

    if 4.80000000000000009e92 < t

    1. Initial program 70.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. Simplified70.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-cbrt70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.5% accurate, 0.5× speedup?

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

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

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

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


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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr53.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-identity53.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. *-commutative53.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. metadata-eval53.5%

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

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

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

        \[\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}} \]
      7. distribute-neg-frac53.5%

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

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

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

      \[\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}}} \]
    8. Step-by-step derivation
      1. pow153.5%

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

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

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

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

    if 5.20000000000000001e-95 < t < 6.00000000000000026e92

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-\color{blue}{\frac{\frac{-2}{\tan k}}{{t}^{3} \cdot \sin k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      5. distribute-neg-frac94.6%

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

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

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

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

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

    if 6.00000000000000026e92 < t

    1. Initial program 70.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. Simplified70.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-cbrt70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr53.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-identity53.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. *-commutative53.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. metadata-eval53.5%

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

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

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

        \[\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}} \]
      7. distribute-neg-frac53.5%

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

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

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

      \[\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}}} \]
    8. Step-by-step derivation
      1. pow153.5%

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

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

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

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

    if 1.2000000000000001e-96 < t < 6.00000000000000026e92

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-\color{blue}{\frac{\frac{-2}{\tan k}}{{t}^{3} \cdot \sin k}}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right) \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \]
      5. distribute-neg-frac94.6%

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

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

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

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

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

    if 6.00000000000000026e92 < t

    1. Initial program 70.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. Simplified70.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-cbrt70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.2 \cdot 10^{-96}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+92}:\\ \;\;\;\;\frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \left(\frac{\frac{2}{\tan k}}{\sin k \cdot {t}^{3}} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t \cdot \sqrt[3]{\sin k}\right)\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 4: 85.9% 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.7 \cdot 10^{-40}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t\_m \cdot \sqrt[3]{\sin k}\right)\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.7e-40)
    (* l (* 2.0 (/ (* l (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
    (/
     2.0
     (*
      (pow (* (pow (cbrt l) -2.0) (* t_m (cbrt (sin k)))) 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.7e-40) {
		tmp = l * (2.0 * ((l * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
	} else {
		tmp = 2.0 / (pow((pow(cbrt(l), -2.0) * (t_m * cbrt(sin(k)))), 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.7e-40) {
		tmp = l * (2.0 * ((l * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
	} else {
		tmp = 2.0 / (Math.pow((Math.pow(Math.cbrt(l), -2.0) * (t_m * Math.cbrt(Math.sin(k)))), 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.7e-40)
		tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))))));
	else
		tmp = Float64(2.0 / Float64((Float64((cbrt(l) ^ -2.0) * Float64(t_m * cbrt(sin(k)))) ^ 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.7e-40], N[(l * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(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.7 \cdot 10^{-40}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \left(t\_m \cdot \sqrt[3]{\sin k}\right)\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 2 regimes
  2. if t < 1.69999999999999992e-40

    1. Initial program 49.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr54.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-identity54.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. *-commutative54.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. metadata-eval54.7%

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

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

        \[\leadsto \left(\ell \cdot \left(-\color{blue}{\frac{\frac{-2}{\tan k}}{{t}^{3} \cdot \sin k}}\right)\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. distribute-neg-frac54.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}} \]
      7. distribute-neg-frac54.7%

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

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

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

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

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

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

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

    if 1.69999999999999992e-40 < t

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

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-cube-cbrt74.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. pow374.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. *-commutative74.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-prod75.0%

        \[\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-div74.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-cube80.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-prod90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 49.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr54.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-identity54.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. *-commutative54.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. metadata-eval54.7%

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

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

        \[\leadsto \left(\ell \cdot \left(-\color{blue}{\frac{\frac{-2}{\tan k}}{{t}^{3} \cdot \sin k}}\right)\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. distribute-neg-frac54.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}} \]
      7. distribute-neg-frac54.7%

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

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

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

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

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

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

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

    if 7.2e-40 < t

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

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-cube-cbrt74.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. pow374.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. *-commutative74.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-prod75.0%

        \[\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-div74.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-cube80.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-prod90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 84.6% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 49.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr54.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-identity54.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. *-commutative54.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. metadata-eval54.7%

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

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

        \[\leadsto \left(\ell \cdot \left(-\color{blue}{\frac{\frac{-2}{\tan k}}{{t}^{3} \cdot \sin k}}\right)\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. distribute-neg-frac54.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}} \]
      7. distribute-neg-frac54.7%

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

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

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

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

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

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

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

    if 2.04999999999999981e-40 < t < 5.49999999999999981e102

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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}} \]
      7. distribute-neg-frac91.1%

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

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

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

      \[\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}}} \]
    8. Step-by-step derivation
      1. associate-*r/91.1%

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

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

      \[\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}}} \]

    if 5.49999999999999981e102 < t

    1. Initial program 70.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. Simplified70.1%

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t\_m \leq 4.9 \cdot 10^{+151}:\\
\;\;\;\;\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}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1e-105 < t < 4.8999999999999999e151

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

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

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac84.8%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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-rr84.8%

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

    if 4.8999999999999999e151 < t

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

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

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

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

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

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

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

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

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

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

      \[\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. Taylor expanded in k around 0 84.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.1 \cdot 10^{-105}:\\ \;\;\;\;\frac{2}{t \cdot \log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\right)}\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+151}:\\ \;\;\;\;\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}^{2}}{\ell} \cdot \frac{t}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 78.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t\_m \leq 4.5 \cdot 10^{+151}:\\
\;\;\;\;\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}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\

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


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

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

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

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

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

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

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

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

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

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

    if 2.9e-98 < t < 4.4999999999999999e151

    1. Initial program 79.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. Simplified78.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. unpow379.0%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac86.5%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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-rr86.5%

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

    if 4.4999999999999999e151 < t

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

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

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

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

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

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

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

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

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

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

      \[\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. Taylor expanded in k around 0 84.3%

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

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

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

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

Alternative 9: 78.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+151}:\\
\;\;\;\;\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}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\

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


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

    1. Initial program 48.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. Simplified48.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-cbrt48.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. pow348.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. *-commutative48.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-prod48.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-div49.4%

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

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

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

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

      \[\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. Taylor expanded in k around inf 64.3%

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

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

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

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

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

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

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

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

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

    if 9.20000000000000002e-98 < t < 4.00000000000000007e151

    1. Initial program 79.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. Simplified78.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. unpow379.0%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac86.5%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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-rr86.5%

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

    if 4.00000000000000007e151 < t

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

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

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

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

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

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

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

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

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

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

      \[\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. Taylor expanded in k around 0 84.3%

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

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

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

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

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

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

\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+151}:\\
\;\;\;\;\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}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\

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


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

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999939e-99 < t < 4.00000000000000007e151

    1. Initial program 79.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. Simplified78.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. unpow379.0%

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac86.5%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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-rr86.5%

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

    if 4.00000000000000007e151 < t

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

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

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

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

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

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

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

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

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

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

      \[\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. Taylor expanded in k around 0 84.3%

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

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

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

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

Alternative 11: 82.4% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t\_m \leq 3.1 \cdot 10^{+151}:\\
\;\;\;\;\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}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\

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


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

    1. Initial program 49.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr54.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-identity54.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. *-commutative54.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. metadata-eval54.7%

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

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

        \[\leadsto \left(\ell \cdot \left(-\color{blue}{\frac{\frac{-2}{\tan k}}{{t}^{3} \cdot \sin k}}\right)\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. distribute-neg-frac54.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}} \]
      7. distribute-neg-frac54.7%

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

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

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

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

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

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

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

    if 1.60000000000000001e-40 < t < 3.1000000000000002e151

    1. Initial program 81.5%

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

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

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac88.5%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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-rr88.5%

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

    if 3.1000000000000002e151 < t

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

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

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

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

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

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

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

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

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

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

      \[\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. Taylor expanded in k around 0 84.3%

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

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

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

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

Alternative 12: 80.6% 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 2.25 \cdot 10^{-40}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\tan k \cdot \left(\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 2.25e-40)
    (* l (* 2.0 (/ (* l (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
    (/
     2.0
     (*
      (tan k)
      (*
       (+ 2.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 <= 2.25e-40) {
		tmp = l * (2.0 * ((l * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
	} else {
		tmp = 2.0 / (tan(k) * ((2.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 <= 2.25d-40) then
        tmp = l * (2.0d0 * ((l * cos(k)) / ((k ** 2.0d0) * (t_m * (sin(k) ** 2.0d0)))))
    else
        tmp = 2.0d0 / (tan(k) * ((2.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 <= 2.25e-40) {
		tmp = l * (2.0 * ((l * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
	} else {
		tmp = 2.0 / (Math.tan(k) * ((2.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 <= 2.25e-40:
		tmp = l * (2.0 * ((l * math.cos(k)) / (math.pow(k, 2.0) * (t_m * math.pow(math.sin(k), 2.0)))))
	else:
		tmp = 2.0 / (math.tan(k) * ((2.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 <= 2.25e-40)
		tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))))));
	else
		tmp = Float64(2.0 / Float64(tan(k) * Float64(Float64(2.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 <= 2.25e-40)
		tmp = l * (2.0 * ((l * cos(k)) / ((k ^ 2.0) * (t_m * (sin(k) ^ 2.0)))));
	else
		tmp = 2.0 / (tan(k) * ((2.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, 2.25e-40], N[(l * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $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]]), $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.25 \cdot 10^{-40}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\

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


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

    1. Initial program 49.8%

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr54.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-identity54.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. *-commutative54.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. metadata-eval54.7%

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

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

        \[\leadsto \left(\ell \cdot \left(-\color{blue}{\frac{\frac{-2}{\tan k}}{{t}^{3} \cdot \sin k}}\right)\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. distribute-neg-frac54.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}} \]
      7. distribute-neg-frac54.7%

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

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

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

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

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

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

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

    if 2.25e-40 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.66 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{t\_m \cdot \log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\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}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.66000000000000009e-105 < t

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

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

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac80.0%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.66 \cdot 10^{-105}:\\ \;\;\;\;\frac{2}{t \cdot \log \left({\left(e^{{k}^{4}}\right)}^{\left({\ell}^{-2}\right)}\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}^{2}}{\ell} \cdot \frac{t}{\ell}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 39.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;k \leq 1.85 \cdot 10^{+192}:\\
\;\;\;\;\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}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\

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


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

    1. Initial program 62.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. Simplified62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.00000000000000081e-37 < k < 1.85e192

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}}}{\ell} \cdot \frac{t}{\ell}\right) \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-rr64.3%

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

    if 1.85e192 < k

    1. Initial program 48.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified48.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. expm1-log1p-u36.5%

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

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

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

        \[\leadsto \frac{2}{\frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{t}^{3}}{\ell}\right)\right)}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    8. Simplified36.5%

      \[\leadsto \frac{2}{\frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{t}^{3}}{\ell}\right)\right)}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    9. Taylor expanded in t around inf 24.5%

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

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{\left(-\log \ell\right)} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. mul-1-neg24.5%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-1 \cdot \log \ell} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. +-commutative24.5%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-3 \cdot \log \left(\frac{1}{t}\right) + -1 \cdot \log \ell}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. log-rec24.5%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \color{blue}{\left(-\log t\right)} + -1 \cdot \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      5. mul-1-neg24.5%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\right) + \color{blue}{\left(-\log \ell\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    11. Simplified24.5%

      \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-3 \cdot \left(-\log t\right) + \left(-\log \ell\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification26.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 9 \cdot 10^{-37}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\ \mathbf{elif}\;k \leq 1.85 \cdot 10^{+192}:\\ \;\;\;\;\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}^{2}}{\ell} \cdot \frac{t}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\right) - \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 39.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 62.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. Simplified62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15000000000000004e-39 < k < 1.69999999999999998e192

    1. Initial program 44.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified54.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. Step-by-step derivation
      1. cube-mult54.5%

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

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

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

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

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

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

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

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

    if 1.69999999999999998e192 < k

    1. Initial program 48.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified48.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. expm1-log1p-u36.5%

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

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

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

        \[\leadsto \frac{2}{\frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{t}^{3}}{\ell}\right)\right)}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    8. Simplified36.5%

      \[\leadsto \frac{2}{\frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{t}^{3}}{\ell}\right)\right)}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    9. Taylor expanded in t around inf 24.5%

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

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{\left(-\log \ell\right)} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. mul-1-neg24.5%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-1 \cdot \log \ell} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. +-commutative24.5%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-3 \cdot \log \left(\frac{1}{t}\right) + -1 \cdot \log \ell}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. log-rec24.5%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \color{blue}{\left(-\log t\right)} + -1 \cdot \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      5. mul-1-neg24.5%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\right) + \color{blue}{\left(-\log \ell\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    11. Simplified24.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.15 \cdot 10^{-39}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\ \mathbf{elif}\;k \leq 1.7 \cdot 10^{+192}:\\ \;\;\;\;\frac{2}{\left(t \cdot \frac{\frac{{t}^{2}}{\ell}}{\ell}\right) \cdot \left(\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\right) - \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 37.4% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 62.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. Simplified62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e-33 < k < 1.25000000000000003e143

    1. Initial program 40.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. Simplified40.1%

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr54.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-identity54.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. *-commutative54.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. metadata-eval54.5%

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

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

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

        \[\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}} \]
      7. distribute-neg-frac54.5%

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

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

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

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

    if 1.25000000000000003e143 < k

    1. Initial program 50.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. Simplified50.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 50.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. expm1-log1p-u32.2%

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

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

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

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

      \[\leadsto \frac{2}{\frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{t}^{3}}{\ell}\right)\right)}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    9. Taylor expanded in t around inf 25.3%

      \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{\log \left(\frac{1}{\ell}\right) + -3 \cdot \log \left(\frac{1}{t}\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    10. Step-by-step derivation
      1. log-rec25.3%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{\left(-\log \ell\right)} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. mul-1-neg25.3%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-1 \cdot \log \ell} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. +-commutative25.3%

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

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \color{blue}{\left(-\log t\right)} + -1 \cdot \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      5. mul-1-neg25.3%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\right) + \color{blue}{\left(-\log \ell\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    11. Simplified25.3%

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

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

Alternative 17: 37.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 62.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. Simplified62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999985e-34 < k < 1.10000000000000007e143

    1. Initial program 40.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.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

    if 1.10000000000000007e143 < k

    1. Initial program 50.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. Simplified50.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 50.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. expm1-log1p-u32.2%

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

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

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

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

      \[\leadsto \frac{2}{\frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{t}^{3}}{\ell}\right)\right)}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    9. Taylor expanded in t around inf 25.3%

      \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{\log \left(\frac{1}{\ell}\right) + -3 \cdot \log \left(\frac{1}{t}\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    10. Step-by-step derivation
      1. log-rec25.3%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{\left(-\log \ell\right)} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. mul-1-neg25.3%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-1 \cdot \log \ell} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. +-commutative25.3%

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

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \color{blue}{\left(-\log t\right)} + -1 \cdot \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      5. mul-1-neg25.3%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\right) + \color{blue}{\left(-\log \ell\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    11. Simplified25.3%

      \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-3 \cdot \left(-\log t\right) + \left(-\log \ell\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification22.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 9.5 \cdot 10^{-34}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\ \mathbf{elif}\;k \leq 1.1 \cdot 10^{+143}:\\ \;\;\;\;\frac{2}{\left(\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \frac{\frac{{t}^{3}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\right) - \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

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

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

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

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


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

    1. Initial program 62.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. Simplified62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-40 < k < 8.49999999999999955e142

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

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

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

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

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

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

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

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

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

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

    if 8.49999999999999955e142 < k

    1. Initial program 50.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. Simplified50.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 50.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. expm1-log1p-u32.2%

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

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

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

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

      \[\leadsto \frac{2}{\frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{t}^{3}}{\ell}\right)\right)}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    9. Taylor expanded in t around inf 25.3%

      \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{\log \left(\frac{1}{\ell}\right) + -3 \cdot \log \left(\frac{1}{t}\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    10. Step-by-step derivation
      1. log-rec25.3%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{\left(-\log \ell\right)} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. mul-1-neg25.3%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-1 \cdot \log \ell} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. +-commutative25.3%

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

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \color{blue}{\left(-\log t\right)} + -1 \cdot \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      5. mul-1-neg25.3%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\right) + \color{blue}{\left(-\log \ell\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    11. Simplified25.3%

      \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-3 \cdot \left(-\log t\right) + \left(-\log \ell\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification22.8%

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

Alternative 19: 36.9% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.86000000000000005e-91 < k < 5.9000000000000003e161

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr57.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-identity57.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. *-commutative57.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. metadata-eval57.6%

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

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

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

        \[\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}} \]
      7. distribute-neg-frac57.6%

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

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

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

      \[\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}}} \]
    8. Taylor expanded in k around 0 60.7%

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

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

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

    if 5.9000000000000003e161 < k

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{{t}^{3}}{\ell}\right)\right)}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    9. Taylor expanded in t around inf 27.1%

      \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{\log \left(\frac{1}{\ell}\right) + -3 \cdot \log \left(\frac{1}{t}\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    10. Step-by-step derivation
      1. log-rec27.1%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{\left(-\log \ell\right)} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. mul-1-neg27.1%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(\color{blue}{-1 \cdot \log \ell} + -3 \cdot \log \left(\frac{1}{t}\right)\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. +-commutative27.1%

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

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \color{blue}{\left(-\log t\right)} + -1 \cdot \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      5. mul-1-neg27.1%

        \[\leadsto \frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\right) + \color{blue}{\left(-\log \ell\right)}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    11. Simplified27.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.86 \cdot 10^{-91}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\ \mathbf{elif}\;k \leq 5.9 \cdot 10^{+161}:\\ \;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{expm1}\left(-3 \cdot \left(-\log t\right) - \log \ell\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 40.3% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.999999999999999e-94 < k < 6.20000000000000013e161

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr57.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-identity57.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. *-commutative57.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. metadata-eval57.6%

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

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

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

        \[\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}} \]
      7. distribute-neg-frac57.6%

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

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

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

      \[\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}}} \]
    8. Taylor expanded in k around 0 60.7%

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

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

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

    if 6.20000000000000013e161 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
    14. Taylor expanded in t around 0 66.7%

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

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    16. Simplified66.7%

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification31.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 10^{-93}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2}}\\ \mathbf{elif}\;k \leq 6.2 \cdot 10^{+161}:\\ \;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 61.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 5.9 \cdot 10^{+161}:\\ \;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 5.9e+161)
    (* (* l (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0)))) (* l 0.5))
    (* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t_m)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 5.9e+161) {
		tmp = (l * ((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0)))) * (l * 0.5);
	} else {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 5.9d+161) then
        tmp = (l * ((2.0d0 / tan(k)) / (sin(k) * (t_m ** 3.0d0)))) * (l * 0.5d0)
    else
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m)
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 5.9e+161) {
		tmp = (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l * 0.5);
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 5.9e+161:
		tmp = (l * ((2.0 / math.tan(k)) / (math.sin(k) * math.pow(t_m, 3.0)))) * (l * 0.5)
	else:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m)
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 5.9e+161)
		tmp = Float64(Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l * 0.5));
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 5.9e+161)
		tmp = (l * ((2.0 / tan(k)) / (sin(k) * (t_m ^ 3.0)))) * (l * 0.5);
	else
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m);
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 5.9e+161], N[(N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * 0.5), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 5.9 \cdot 10^{+161}:\\
\;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 5.9000000000000003e161

    1. Initial program 58.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. Simplified58.2%

      \[\leadsto \color{blue}{\frac{\frac{\frac{2}{\tan k}}{{t}^{3} \cdot \sin k} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*64.8%

        \[\leadsto \frac{\color{blue}{\left(\frac{\frac{2}{\tan k}}{{t}^{3} \cdot \sin k} \cdot \ell\right) \cdot \ell}}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      2. *-un-lft-identity64.8%

        \[\leadsto \frac{\left(\frac{\frac{2}{\tan k}}{{t}^{3} \cdot \sin k} \cdot \ell\right) \cdot \ell}{\color{blue}{1 \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}} \]
      3. times-frac64.8%

        \[\leadsto \color{blue}{\frac{\frac{\frac{2}{\tan k}}{{t}^{3} \cdot \sin k} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}} \]
      4. associate-/l/64.8%

        \[\leadsto \frac{\color{blue}{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}} \cdot \ell}{1} \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    5. Applied egg-rr64.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-identity64.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. *-commutative64.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. metadata-eval64.8%

        \[\leadsto \left(\ell \cdot \frac{\color{blue}{--2}}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      4. distribute-neg-frac64.8%

        \[\leadsto \left(\ell \cdot \color{blue}{\left(-\frac{-2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      5. associate-/l/64.8%

        \[\leadsto \left(\ell \cdot \left(-\color{blue}{\frac{\frac{-2}{\tan k}}{{t}^{3} \cdot \sin k}}\right)\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      6. distribute-neg-frac64.8%

        \[\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}} \]
      7. distribute-neg-frac64.8%

        \[\leadsto \left(\ell \cdot \frac{\color{blue}{\frac{--2}{\tan k}}}{{t}^{3} \cdot \sin k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      8. metadata-eval64.8%

        \[\leadsto \left(\ell \cdot \frac{\frac{\color{blue}{2}}{\tan k}}{{t}^{3} \cdot \sin k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
      9. *-commutative64.8%

        \[\leadsto \left(\ell \cdot \frac{\frac{2}{\tan k}}{\color{blue}{\sin k \cdot {t}^{3}}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}} \]
    7. Simplified64.8%

      \[\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}}} \]
    8. Taylor expanded in k around 0 63.0%

      \[\leadsto \left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t}^{3}}\right) \cdot \color{blue}{\left(0.5 \cdot \ell\right)} \]
    9. Step-by-step derivation
      1. *-commutative63.0%

        \[\leadsto \left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t}^{3}}\right) \cdot \color{blue}{\left(\ell \cdot 0.5\right)} \]
    10. Simplified63.0%

      \[\leadsto \left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t}^{3}}\right) \cdot \color{blue}{\left(\ell \cdot 0.5\right)} \]

    if 5.9000000000000003e161 < k

    1. Initial program 49.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. Simplified49.0%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-*r*66.7%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
      2. times-frac66.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    6. Simplified66.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    7. Taylor expanded in k around 0 66.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*66.3%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified66.3%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow166.3%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. pow266.3%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)}^{1}} \]
      3. div-inv66.3%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{\ell \cdot \ell}\right)}\right)}^{1}} \]
      4. pow266.3%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \frac{1}{\color{blue}{{\ell}^{2}}}\right)\right)}^{1}} \]
      5. pow-flip66.3%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      6. metadata-eval66.3%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr66.3%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow166.3%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*66.7%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative66.7%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
      4. associate-*l*66.7%

        \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
    13. Simplified66.7%

      \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
    14. Taylor expanded in t around 0 66.7%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    15. Step-by-step derivation
      1. associate-/r*66.7%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    16. Simplified66.7%

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 5.9 \cdot 10^{+161}:\\ \;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t}^{3}}\right) \cdot \left(\ell \cdot 0.5\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 59.5% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-33}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.4e-33)
    (* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t_m))
    (/ 2.0 (* (* 2.0 k) (* (sin k) (/ (pow t_m 3.0) (* l l))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 1.4e-33) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m);
	} else {
		tmp = 2.0 / ((2.0 * k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 1.4d-33) then
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m)
    else
        tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 1.4e-33) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m);
	} else {
		tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 1.4e-33:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m)
	else:
		tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 1.4e-33)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 1.4e-33)
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m);
	else
		tmp = 2.0 / ((2.0 * k) * (sin(k) * ((t_m ^ 3.0) / (l * l))));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.4e-33], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.4 \cdot 10^{-33}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.4e-33

    1. Initial program 50.1%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified50.1%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 64.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-*r*64.5%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
      2. times-frac65.5%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    6. Simplified65.5%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    7. Taylor expanded in k around 0 52.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*53.3%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified53.3%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow153.3%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. pow253.3%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)}^{1}} \]
      3. div-inv52.7%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{\ell \cdot \ell}\right)}\right)}^{1}} \]
      4. pow252.7%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \frac{1}{\color{blue}{{\ell}^{2}}}\right)\right)}^{1}} \]
      5. pow-flip52.7%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      6. metadata-eval52.7%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr52.7%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow152.7%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*51.9%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative51.9%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
      4. associate-*l*52.0%

        \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
    13. Simplified52.0%

      \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
    14. Taylor expanded in t around 0 52.4%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    15. Step-by-step derivation
      1. associate-/r*52.5%

        \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
    16. Simplified52.5%

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]

    if 1.4e-33 < t

    1. Initial program 75.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. Simplified75.4%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in k around 0 67.3%

      \[\leadsto \frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(2 \cdot k\right)}} \]
    5. Step-by-step derivation
      1. *-commutative67.3%

        \[\leadsto \frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(k \cdot 2\right)}} \]
    6. Simplified67.3%

      \[\leadsto \frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(k \cdot 2\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.4 \cdot 10^{-33}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 56.3% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 3.05 \cdot 10^{-9}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 3.05e-9)
    (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (/ (pow t_m 3.0) l) l)))
    (/ 2.0 (* t_m (* (pow k 4.0) (pow l -2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 3.05e-9) {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 3.0) / l) / l));
	} else {
		tmp = 2.0 / (t_m * (pow(k, 4.0) * pow(l, -2.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 3.05d-9) then
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 3.0d0) / l) / l))
    else
        tmp = 2.0d0 / (t_m * ((k ** 4.0d0) * (l ** (-2.0d0))))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 3.05e-9) {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 3.0) / l) / l));
	} else {
		tmp = 2.0 / (t_m * (Math.pow(k, 4.0) * Math.pow(l, -2.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 3.05e-9:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 3.0) / l) / l))
	else:
		tmp = 2.0 / (t_m * (math.pow(k, 4.0) * math.pow(l, -2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 3.05e-9)
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 3.0) / l) / l)));
	else
		tmp = Float64(2.0 / Float64(t_m * Float64((k ^ 4.0) * (l ^ -2.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 3.05e-9)
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 3.0) / l) / l));
	else
		tmp = 2.0 / (t_m * ((k ^ 4.0) * (l ^ -2.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.05e-9], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[Power[k, 4.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.05 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 3.05e-9

    1. Initial program 63.1%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified60.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 57.6%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]

    if 3.05e-9 < k

    1. Initial program 40.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. Simplified40.6%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.3%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-*r*66.3%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
      2. times-frac66.4%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    6. Simplified66.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    7. Taylor expanded in k around 0 53.9%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*53.8%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified53.8%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow153.8%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. pow253.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)}^{1}} \]
      3. div-inv53.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{\ell \cdot \ell}\right)}\right)}^{1}} \]
      4. pow253.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \frac{1}{\color{blue}{{\ell}^{2}}}\right)\right)}^{1}} \]
      5. pow-flip53.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      6. metadata-eval53.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr53.8%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow153.8%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*53.9%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative53.9%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
      4. associate-*l*54.0%

        \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
    13. Simplified54.0%

      \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.05 \cdot 10^{-9}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t}^{3}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 56.6% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 3.4 \cdot 10^{-9}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 3.4e-9)
    (/ 2.0 (* (/ (pow t_m 3.0) l) (/ (* 2.0 (pow k 2.0)) l)))
    (/ 2.0 (* t_m (* (pow k 4.0) (pow l -2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 3.4e-9) {
		tmp = 2.0 / ((pow(t_m, 3.0) / l) * ((2.0 * pow(k, 2.0)) / l));
	} else {
		tmp = 2.0 / (t_m * (pow(k, 4.0) * pow(l, -2.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 3.4d-9) then
        tmp = 2.0d0 / (((t_m ** 3.0d0) / l) * ((2.0d0 * (k ** 2.0d0)) / l))
    else
        tmp = 2.0d0 / (t_m * ((k ** 4.0d0) * (l ** (-2.0d0))))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 3.4e-9) {
		tmp = 2.0 / ((Math.pow(t_m, 3.0) / l) * ((2.0 * Math.pow(k, 2.0)) / l));
	} else {
		tmp = 2.0 / (t_m * (Math.pow(k, 4.0) * Math.pow(l, -2.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 3.4e-9:
		tmp = 2.0 / ((math.pow(t_m, 3.0) / l) * ((2.0 * math.pow(k, 2.0)) / l))
	else:
		tmp = 2.0 / (t_m * (math.pow(k, 4.0) * math.pow(l, -2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 3.4e-9)
		tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(Float64(2.0 * (k ^ 2.0)) / l)));
	else
		tmp = Float64(2.0 / Float64(t_m * Float64((k ^ 4.0) * (l ^ -2.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 3.4e-9)
		tmp = 2.0 / (((t_m ^ 3.0) / l) * ((2.0 * (k ^ 2.0)) / l));
	else
		tmp = 2.0 / (t_m * ((k ^ 4.0) * (l ^ -2.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.4e-9], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[Power[k, 4.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.4 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 3.3999999999999998e-9

    1. Initial program 63.1%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified60.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 57.6%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. associate-*l/58.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    6. Applied egg-rr58.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    7. Step-by-step derivation
      1. associate-/l*58.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    8. Simplified58.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]

    if 3.3999999999999998e-9 < k

    1. Initial program 40.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. Simplified40.6%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.3%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-*r*66.3%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
      2. times-frac66.4%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    6. Simplified66.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    7. Taylor expanded in k around 0 53.9%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*53.8%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified53.8%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow153.8%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. pow253.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)}^{1}} \]
      3. div-inv53.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{\ell \cdot \ell}\right)}\right)}^{1}} \]
      4. pow253.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \frac{1}{\color{blue}{{\ell}^{2}}}\right)\right)}^{1}} \]
      5. pow-flip53.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      6. metadata-eval53.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr53.8%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow153.8%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*53.9%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative53.9%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
      4. associate-*l*54.0%

        \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
    13. Simplified54.0%

      \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.4 \cdot 10^{-9}:\\ \;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 56.8% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 7.2 \cdot 10^{-9}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{3}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 7.2e-9)
    (/ 2.0 (/ (* (* 2.0 (pow k 2.0)) (/ (pow t_m 3.0) l)) l))
    (/ 2.0 (* t_m (* (pow k 4.0) (pow l -2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 7.2e-9) {
		tmp = 2.0 / (((2.0 * pow(k, 2.0)) * (pow(t_m, 3.0) / l)) / l);
	} else {
		tmp = 2.0 / (t_m * (pow(k, 4.0) * pow(l, -2.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 7.2d-9) then
        tmp = 2.0d0 / (((2.0d0 * (k ** 2.0d0)) * ((t_m ** 3.0d0) / l)) / l)
    else
        tmp = 2.0d0 / (t_m * ((k ** 4.0d0) * (l ** (-2.0d0))))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 7.2e-9) {
		tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) * (Math.pow(t_m, 3.0) / l)) / l);
	} else {
		tmp = 2.0 / (t_m * (Math.pow(k, 4.0) * Math.pow(l, -2.0)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 7.2e-9:
		tmp = 2.0 / (((2.0 * math.pow(k, 2.0)) * (math.pow(t_m, 3.0) / l)) / l)
	else:
		tmp = 2.0 / (t_m * (math.pow(k, 4.0) * math.pow(l, -2.0)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 7.2e-9)
		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) * Float64((t_m ^ 3.0) / l)) / l));
	else
		tmp = Float64(2.0 / Float64(t_m * Float64((k ^ 4.0) * (l ^ -2.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 7.2e-9)
		tmp = 2.0 / (((2.0 * (k ^ 2.0)) * ((t_m ^ 3.0) / l)) / l);
	else
		tmp = 2.0 / (t_m * ((k ^ 4.0) * (l ^ -2.0)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 7.2e-9], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[Power[k, 4.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 7.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{2}{\frac{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{3}}{\ell}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 7.2e-9

    1. Initial program 63.1%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Simplified60.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 57.6%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. associate-*l/58.6%

        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]
    6. Applied egg-rr58.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}} \]

    if 7.2e-9 < k

    1. Initial program 40.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. Simplified40.6%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 66.3%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. associate-*r*66.3%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
      2. times-frac66.4%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    6. Simplified66.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
    7. Taylor expanded in k around 0 53.9%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. associate-/l*53.8%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    9. Simplified53.8%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    10. Step-by-step derivation
      1. pow153.8%

        \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
      2. pow253.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)}^{1}} \]
      3. div-inv53.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{\ell \cdot \ell}\right)}\right)}^{1}} \]
      4. pow253.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \frac{1}{\color{blue}{{\ell}^{2}}}\right)\right)}^{1}} \]
      5. pow-flip53.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
      6. metadata-eval53.8%

        \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
    11. Applied egg-rr53.8%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
    12. Step-by-step derivation
      1. unpow153.8%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
      2. associate-*r*53.9%

        \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
      3. *-commutative53.9%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
      4. associate-*l*54.0%

        \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
    13. Simplified54.0%

      \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.2 \cdot 10^{-9}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t}^{3}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 51.6% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\right) \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m))
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((l ^ 2.0) / (k ^ 4.0)) / t_m)))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m));
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[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\right)
\end{array}
Derivation
  1. Initial program 56.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.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 61.0%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  5. Step-by-step derivation
    1. associate-*r*61.0%

      \[\leadsto \frac{2}{\frac{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
    2. times-frac62.5%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
  6. Simplified62.5%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
  7. Taylor expanded in k around 0 51.0%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  8. Step-by-step derivation
    1. associate-/l*52.3%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  9. Simplified52.3%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  10. Step-by-step derivation
    1. pow152.3%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
    2. pow252.3%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)}^{1}} \]
    3. div-inv51.9%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{\ell \cdot \ell}\right)}\right)}^{1}} \]
    4. pow251.9%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \frac{1}{\color{blue}{{\ell}^{2}}}\right)\right)}^{1}} \]
    5. pow-flip51.9%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
    6. metadata-eval51.9%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
  11. Applied egg-rr51.9%

    \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
  12. Step-by-step derivation
    1. unpow151.9%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
    2. associate-*r*50.6%

      \[\leadsto \frac{2}{\color{blue}{\left({k}^{4} \cdot t\right) \cdot {\ell}^{-2}}} \]
    3. *-commutative50.6%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot {k}^{4}\right)} \cdot {\ell}^{-2}} \]
    4. associate-*l*50.6%

      \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
  13. Simplified50.6%

    \[\leadsto \frac{2}{\color{blue}{t \cdot \left({k}^{4} \cdot {\ell}^{-2}\right)}} \]
  14. Taylor expanded in t around 0 51.0%

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  15. Step-by-step derivation
    1. associate-/r*51.0%

      \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  16. Simplified51.0%

    \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  17. Final simplification51.0%

    \[\leadsto 2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t} \]
  18. Add Preprocessing

Alternative 27: 52.2% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (pow k 4.0) (/ t_m (pow l 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (pow(k, 4.0) * (t_m / pow(l, 2.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / ((k ** 4.0d0) * (t_m / (l ** 2.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (Math.pow(k, 4.0) * (t_m / Math.pow(l, 2.0))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / (math.pow(k, 4.0) * (t_m / math.pow(l, 2.0))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / (l ^ 2.0)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / ((k ^ 4.0) * (t_m / (l ^ 2.0))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}
\end{array}
Derivation
  1. Initial program 56.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.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 61.0%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  5. Step-by-step derivation
    1. associate-*r*61.0%

      \[\leadsto \frac{2}{\frac{\color{blue}{\left({k}^{2} \cdot t\right) \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
    2. times-frac62.5%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
  6. Simplified62.5%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}} \]
  7. Taylor expanded in k around 0 51.0%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  8. Step-by-step derivation
    1. associate-/l*52.3%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  9. Simplified52.3%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  10. Final simplification52.3%

    \[\leadsto \frac{2}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}} \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2024131 
(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))))