Toniolo and Linder, Equation (10+)

Percentage Accurate: 55.5% → 87.5%
Time: 12.0s
Alternatives: 14
Speedup: 8.7×

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 14 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: 55.5% 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: 87.5% accurate, 0.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.3 \cdot 10^{-126}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(t\_m \cdot k, k, {t\_m}^{3} \cdot 2\right)}{l\_m} \cdot \frac{\tan k}{\frac{l\_m}{\sin k}}}\\ \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+92}:\\ \;\;\;\;\frac{2}{\left(t\_m \cdot \left(\mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, \frac{k}{l\_m}, \frac{2}{l\_m}\right) \cdot \left(t\_m \cdot t\_m\right)\right)\right) \cdot \left(\frac{\sin k}{l\_m} \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t\_m \cdot 3 - \log l\_m \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.3e-126)
    (/
     2.0
     (*
      (/ (fma (* t_m k) k (* (pow t_m 3.0) 2.0)) l_m)
      (/ (tan k) (/ l_m (sin k)))))
    (if (<= t_m 1.25e+92)
      (/
       2.0
       (*
        (* t_m (* (fma (/ k (* t_m t_m)) (/ k l_m) (/ 2.0 l_m)) (* t_m t_m)))
        (* (/ (sin k) l_m) (tan k))))
      (/
       2.0
       (*
        (* (* (exp (- (* (log t_m) 3.0) (* (log l_m) 2.0))) (sin k)) (tan k))
        (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))))))
l_m = fabs(l);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
	double tmp;
	if (t_m <= 4.3e-126) {
		tmp = 2.0 / ((fma((t_m * k), k, (pow(t_m, 3.0) * 2.0)) / l_m) * (tan(k) / (l_m / sin(k))));
	} else if (t_m <= 1.25e+92) {
		tmp = 2.0 / ((t_m * (fma((k / (t_m * t_m)), (k / l_m), (2.0 / l_m)) * (t_m * t_m))) * ((sin(k) / l_m) * tan(k)));
	} else {
		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * sin(k)) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0));
	}
	return t_s * tmp;
}
l_m = abs(l)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k)
	tmp = 0.0
	if (t_m <= 4.3e-126)
		tmp = Float64(2.0 / Float64(Float64(fma(Float64(t_m * k), k, Float64((t_m ^ 3.0) * 2.0)) / l_m) * Float64(tan(k) / Float64(l_m / sin(k)))));
	elseif (t_m <= 1.25e+92)
		tmp = Float64(2.0 / Float64(Float64(t_m * Float64(fma(Float64(k / Float64(t_m * t_m)), Float64(k / l_m), Float64(2.0 / l_m)) * Float64(t_m * t_m))) * Float64(Float64(sin(k) / l_m) * tan(k))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(exp(Float64(Float64(log(t_m) * 3.0) - Float64(log(l_m) * 2.0))) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0)));
	end
	return Float64(t_s * tmp)
end
l_m = N[Abs[l], $MachinePrecision]
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$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.3e-126], N[(2.0 / N[(N[(N[(N[(t$95$m * k), $MachinePrecision] * k + N[(N[Power[t$95$m, 3.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+92], N[(2.0 / N[(N[(t$95$m * N[(N[(N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision] + N[(2.0 / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Exp[N[(N[(N[Log[t$95$m], $MachinePrecision] * 3.0), $MachinePrecision] - N[(N[Log[l$95$m], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.3 \cdot 10^{-126}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(t\_m \cdot k, k, {t\_m}^{3} \cdot 2\right)}{l\_m} \cdot \frac{\tan k}{\frac{l\_m}{\sin k}}}\\

\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+92}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \left(\mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, \frac{k}{l\_m}, \frac{2}{l\_m}\right) \cdot \left(t\_m \cdot t\_m\right)\right)\right) \cdot \left(\frac{\sin k}{l\_m} \cdot \tan k\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(e^{\log t\_m \cdot 3 - \log l\_m \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\


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

    1. Initial program 51.0%

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

      \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
    4. Step-by-step derivation
      1. distribute-rgt-inN/A

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

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

        \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
      4. *-commutativeN/A

        \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
      5. associate-*r*N/A

        \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
      6. unpow2N/A

        \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
      7. unpow3N/A

        \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
      8. *-commutativeN/A

        \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
      9. associate-/l*N/A

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

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

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{\sin k}^{2}}{\ell}}{\ell \cdot \cos k} \cdot \left(t \cdot \mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)\right)}} \]
    6. Step-by-step derivation
      1. Applied rewrites78.7%

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
      2. Step-by-step derivation
        1. Applied rewrites84.1%

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

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

          if 4.30000000000000033e-126 < t < 1.25000000000000005e92

          1. Initial program 63.8%

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

            \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
          4. Step-by-step derivation
            1. distribute-rgt-inN/A

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

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

              \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
            4. *-commutativeN/A

              \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
            5. associate-*r*N/A

              \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
            6. unpow2N/A

              \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
            7. unpow3N/A

              \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
            8. *-commutativeN/A

              \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
            9. associate-/l*N/A

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

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

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

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
            2. Step-by-step derivation
              1. Applied rewrites88.5%

                \[\leadsto \frac{2}{\left(t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)}{\ell}\right) \cdot \left(\color{blue}{\frac{\sin k}{\ell}} \cdot \tan k\right)} \]
              2. Taylor expanded in t around inf

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

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

                if 1.25000000000000005e92 < 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. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  3. pow-to-expN/A

                    \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  5. pow2N/A

                    \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{{\ell}^{2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  6. pow-to-expN/A

                    \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{e^{\log \ell \cdot 2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  7. div-expN/A

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  8. lower-exp.f64N/A

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  9. lower--.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  10. lower-*.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3} - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  11. lower-log.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t} \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  12. lower-*.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  13. lower-log.f6436.0

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

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

              Alternative 2: 90.9% accurate, 0.8× speedup?

              \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 62:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(t\_m \cdot k, k, {t\_m}^{3} \cdot 2\right)}{l\_m} \cdot \frac{\tan k}{\frac{l\_m}{\sin k}}}\\ \mathbf{elif}\;t\_m \leq 2.6 \cdot 10^{+204}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{{t\_m}^{1.5}}{l\_m} \cdot \frac{{t\_m}^{1.5} \cdot \sin k}{l\_m}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_m \cdot \frac{\frac{t\_m}{l\_m} \cdot \left(\left(\left(k \cdot t\_m\right) \cdot k\right) \cdot 2\right)}{l\_m}}\\ \end{array} \end{array} \]
              l_m = (fabs.f64 l)
              t\_m = (fabs.f64 t)
              t\_s = (copysign.f64 #s(literal 1 binary64) t)
              (FPCore (t_s t_m l_m k)
               :precision binary64
               (*
                t_s
                (if (<= t_m 62.0)
                  (/
                   2.0
                   (*
                    (/ (fma (* t_m k) k (* (pow t_m 3.0) 2.0)) l_m)
                    (/ (tan k) (/ l_m (sin k)))))
                  (if (<= t_m 2.6e+204)
                    (/
                     2.0
                     (*
                      (* (* (/ (pow t_m 1.5) l_m) (/ (* (pow t_m 1.5) (sin k)) l_m)) (tan k))
                      (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
                    (/ 2.0 (* t_m (/ (* (/ t_m l_m) (* (* (* k t_m) k) 2.0)) l_m)))))))
              l_m = fabs(l);
              t\_m = fabs(t);
              t\_s = copysign(1.0, t);
              double code(double t_s, double t_m, double l_m, double k) {
              	double tmp;
              	if (t_m <= 62.0) {
              		tmp = 2.0 / ((fma((t_m * k), k, (pow(t_m, 3.0) * 2.0)) / l_m) * (tan(k) / (l_m / sin(k))));
              	} else if (t_m <= 2.6e+204) {
              		tmp = 2.0 / ((((pow(t_m, 1.5) / l_m) * ((pow(t_m, 1.5) * sin(k)) / l_m)) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0));
              	} else {
              		tmp = 2.0 / (t_m * (((t_m / l_m) * (((k * t_m) * k) * 2.0)) / l_m));
              	}
              	return t_s * tmp;
              }
              
              l_m = abs(l)
              t\_m = abs(t)
              t\_s = copysign(1.0, t)
              function code(t_s, t_m, l_m, k)
              	tmp = 0.0
              	if (t_m <= 62.0)
              		tmp = Float64(2.0 / Float64(Float64(fma(Float64(t_m * k), k, Float64((t_m ^ 3.0) * 2.0)) / l_m) * Float64(tan(k) / Float64(l_m / sin(k)))));
              	elseif (t_m <= 2.6e+204)
              		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((t_m ^ 1.5) / l_m) * Float64(Float64((t_m ^ 1.5) * sin(k)) / l_m)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0)));
              	else
              		tmp = Float64(2.0 / Float64(t_m * Float64(Float64(Float64(t_m / l_m) * Float64(Float64(Float64(k * t_m) * k) * 2.0)) / l_m)));
              	end
              	return Float64(t_s * tmp)
              end
              
              l_m = N[Abs[l], $MachinePrecision]
              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$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 62.0], N[(2.0 / N[(N[(N[(N[(t$95$m * k), $MachinePrecision] * k + N[(N[Power[t$95$m, 3.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.6e+204], N[(2.0 / N[(N[(N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[(N[(t$95$m / l$95$m), $MachinePrecision] * N[(N[(N[(k * t$95$m), $MachinePrecision] * k), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
              
              \begin{array}{l}
              l_m = \left|\ell\right|
              \\
              t\_m = \left|t\right|
              \\
              t\_s = \mathsf{copysign}\left(1, t\right)
              
              \\
              t\_s \cdot \begin{array}{l}
              \mathbf{if}\;t\_m \leq 62:\\
              \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(t\_m \cdot k, k, {t\_m}^{3} \cdot 2\right)}{l\_m} \cdot \frac{\tan k}{\frac{l\_m}{\sin k}}}\\
              
              \mathbf{elif}\;t\_m \leq 2.6 \cdot 10^{+204}:\\
              \;\;\;\;\frac{2}{\left(\left(\frac{{t\_m}^{1.5}}{l\_m} \cdot \frac{{t\_m}^{1.5} \cdot \sin k}{l\_m}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{2}{t\_m \cdot \frac{\frac{t\_m}{l\_m} \cdot \left(\left(\left(k \cdot t\_m\right) \cdot k\right) \cdot 2\right)}{l\_m}}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if t < 62

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

                  \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                4. Step-by-step derivation
                  1. distribute-rgt-inN/A

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

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

                    \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                  4. *-commutativeN/A

                    \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                  5. associate-*r*N/A

                    \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                  6. unpow2N/A

                    \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                  7. unpow3N/A

                    \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                  8. *-commutativeN/A

                    \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                  9. associate-/l*N/A

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

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

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

                    \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
                  2. Step-by-step derivation
                    1. Applied rewrites84.3%

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

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

                      if 62 < t < 2.6000000000000001e204

                      1. Initial program 70.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. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift-*.f64N/A

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

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

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

                          \[\leadsto \frac{2}{\left(\frac{\color{blue}{{t}^{3}} \cdot \sin k}{\ell \cdot \ell} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                        5. sqr-powN/A

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

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

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

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

                          \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{{t}^{\left(\frac{3}{2}\right)}}{\ell} \cdot \frac{{t}^{\left(\frac{3}{2}\right)} \cdot \sin k}{\ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                        10. lower-/.f64N/A

                          \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{\left(\frac{3}{2}\right)}}{\ell}} \cdot \frac{{t}^{\left(\frac{3}{2}\right)} \cdot \sin k}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                        11. lower-pow.f64N/A

                          \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)}}}{\ell} \cdot \frac{{t}^{\left(\frac{3}{2}\right)} \cdot \sin k}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                        12. metadata-evalN/A

                          \[\leadsto \frac{2}{\left(\left(\frac{{t}^{\color{blue}{\frac{3}{2}}}}{\ell} \cdot \frac{{t}^{\left(\frac{3}{2}\right)} \cdot \sin k}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                        13. lower-/.f64N/A

                          \[\leadsto \frac{2}{\left(\left(\frac{{t}^{\frac{3}{2}}}{\ell} \cdot \color{blue}{\frac{{t}^{\left(\frac{3}{2}\right)} \cdot \sin k}{\ell}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                        14. lower-*.f64N/A

                          \[\leadsto \frac{2}{\left(\left(\frac{{t}^{\frac{3}{2}}}{\ell} \cdot \frac{\color{blue}{{t}^{\left(\frac{3}{2}\right)} \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                        15. lower-pow.f64N/A

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

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

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

                      if 2.6000000000000001e204 < t

                      1. Initial program 75.0%

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

                        \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                        2. associate-/l*N/A

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

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

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

                          \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                        6. lower-*.f64N/A

                          \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                        7. lower-*.f64N/A

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

                          \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                        9. lower-*.f64N/A

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

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

                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                        12. lower-/.f64N/A

                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                        13. lower-/.f64N/A

                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                        14. lower-pow.f6480.8

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

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

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

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

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

                          Alternative 3: 87.5% accurate, 1.2× speedup?

                          \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.3 \cdot 10^{-126}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(t\_m \cdot k, k, {t\_m}^{3} \cdot 2\right)}{l\_m} \cdot \frac{\tan k}{\frac{l\_m}{\sin k}}}\\ \mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{+129}:\\ \;\;\;\;\frac{2}{\left(t\_m \cdot \left(\mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, \frac{k}{l\_m}, \frac{2}{l\_m}\right) \cdot \left(t\_m \cdot t\_m\right)\right)\right) \cdot \left(\frac{\sin k}{l\_m} \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\ \end{array} \end{array} \]
                          l_m = (fabs.f64 l)
                          t\_m = (fabs.f64 t)
                          t\_s = (copysign.f64 #s(literal 1 binary64) t)
                          (FPCore (t_s t_m l_m k)
                           :precision binary64
                           (*
                            t_s
                            (if (<= t_m 4.3e-126)
                              (/
                               2.0
                               (*
                                (/ (fma (* t_m k) k (* (pow t_m 3.0) 2.0)) l_m)
                                (/ (tan k) (/ l_m (sin k)))))
                              (if (<= t_m 5.1e+129)
                                (/
                                 2.0
                                 (*
                                  (* t_m (* (fma (/ k (* t_m t_m)) (/ k l_m) (/ 2.0 l_m)) (* t_m t_m)))
                                  (* (/ (sin k) l_m) (tan k))))
                                (/ 2.0 (/ (* (* 2.0 (pow (* k t_m) 2.0)) (/ t_m l_m)) l_m))))))
                          l_m = fabs(l);
                          t\_m = fabs(t);
                          t\_s = copysign(1.0, t);
                          double code(double t_s, double t_m, double l_m, double k) {
                          	double tmp;
                          	if (t_m <= 4.3e-126) {
                          		tmp = 2.0 / ((fma((t_m * k), k, (pow(t_m, 3.0) * 2.0)) / l_m) * (tan(k) / (l_m / sin(k))));
                          	} else if (t_m <= 5.1e+129) {
                          		tmp = 2.0 / ((t_m * (fma((k / (t_m * t_m)), (k / l_m), (2.0 / l_m)) * (t_m * t_m))) * ((sin(k) / l_m) * tan(k)));
                          	} else {
                          		tmp = 2.0 / (((2.0 * pow((k * t_m), 2.0)) * (t_m / l_m)) / l_m);
                          	}
                          	return t_s * tmp;
                          }
                          
                          l_m = abs(l)
                          t\_m = abs(t)
                          t\_s = copysign(1.0, t)
                          function code(t_s, t_m, l_m, k)
                          	tmp = 0.0
                          	if (t_m <= 4.3e-126)
                          		tmp = Float64(2.0 / Float64(Float64(fma(Float64(t_m * k), k, Float64((t_m ^ 3.0) * 2.0)) / l_m) * Float64(tan(k) / Float64(l_m / sin(k)))));
                          	elseif (t_m <= 5.1e+129)
                          		tmp = Float64(2.0 / Float64(Float64(t_m * Float64(fma(Float64(k / Float64(t_m * t_m)), Float64(k / l_m), Float64(2.0 / l_m)) * Float64(t_m * t_m))) * Float64(Float64(sin(k) / l_m) * tan(k))));
                          	else
                          		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (Float64(k * t_m) ^ 2.0)) * Float64(t_m / l_m)) / l_m));
                          	end
                          	return Float64(t_s * tmp)
                          end
                          
                          l_m = N[Abs[l], $MachinePrecision]
                          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$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.3e-126], N[(2.0 / N[(N[(N[(N[(t$95$m * k), $MachinePrecision] * k + N[(N[Power[t$95$m, 3.0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.1e+129], N[(2.0 / N[(N[(t$95$m * N[(N[(N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision] + N[(2.0 / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                          
                          \begin{array}{l}
                          l_m = \left|\ell\right|
                          \\
                          t\_m = \left|t\right|
                          \\
                          t\_s = \mathsf{copysign}\left(1, t\right)
                          
                          \\
                          t\_s \cdot \begin{array}{l}
                          \mathbf{if}\;t\_m \leq 4.3 \cdot 10^{-126}:\\
                          \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(t\_m \cdot k, k, {t\_m}^{3} \cdot 2\right)}{l\_m} \cdot \frac{\tan k}{\frac{l\_m}{\sin k}}}\\
                          
                          \mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{+129}:\\
                          \;\;\;\;\frac{2}{\left(t\_m \cdot \left(\mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, \frac{k}{l\_m}, \frac{2}{l\_m}\right) \cdot \left(t\_m \cdot t\_m\right)\right)\right) \cdot \left(\frac{\sin k}{l\_m} \cdot \tan k\right)}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if t < 4.30000000000000033e-126

                            1. Initial program 51.0%

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

                              \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                            4. Step-by-step derivation
                              1. distribute-rgt-inN/A

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

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

                                \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                              4. *-commutativeN/A

                                \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                              5. associate-*r*N/A

                                \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                              6. unpow2N/A

                                \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                              7. unpow3N/A

                                \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                              8. *-commutativeN/A

                                \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                              9. associate-/l*N/A

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

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

                              \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{\sin k}^{2}}{\ell}}{\ell \cdot \cos k} \cdot \left(t \cdot \mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)\right)}} \]
                            6. Step-by-step derivation
                              1. Applied rewrites78.7%

                                \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
                              2. Step-by-step derivation
                                1. Applied rewrites84.1%

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

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

                                  if 4.30000000000000033e-126 < t < 5.09999999999999996e129

                                  1. Initial program 67.2%

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

                                    \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                  4. Step-by-step derivation
                                    1. distribute-rgt-inN/A

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

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

                                      \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                    4. *-commutativeN/A

                                      \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                    5. associate-*r*N/A

                                      \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                    6. unpow2N/A

                                      \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                    7. unpow3N/A

                                      \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                    8. *-commutativeN/A

                                      \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                    9. associate-/l*N/A

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

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

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

                                      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites89.0%

                                        \[\leadsto \frac{2}{\left(t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)}{\ell}\right) \cdot \left(\color{blue}{\frac{\sin k}{\ell}} \cdot \tan k\right)} \]
                                      2. Taylor expanded in t around inf

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

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

                                        if 5.09999999999999996e129 < t

                                        1. Initial program 66.8%

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

                                          \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                        4. Step-by-step derivation
                                          1. *-commutativeN/A

                                            \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                          2. associate-/l*N/A

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

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

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

                                            \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                          6. lower-*.f64N/A

                                            \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                          7. lower-*.f64N/A

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

                                            \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                          9. lower-*.f64N/A

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

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

                                            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                          12. lower-/.f64N/A

                                            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                          13. lower-/.f64N/A

                                            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                          14. lower-pow.f6470.2

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

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

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

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

                                          Alternative 4: 87.5% accurate, 1.5× speedup?

                                          \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{\sin k}{l\_m} \cdot \tan k\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.3 \cdot 10^{-126}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\left(t\_m \cdot t\_m\right) \cdot 2, t\_m, \left(k \cdot t\_m\right) \cdot k\right)}{l\_m} \cdot t\_2}\\ \mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{+129}:\\ \;\;\;\;\frac{2}{\left(t\_m \cdot \left(\mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, \frac{k}{l\_m}, \frac{2}{l\_m}\right) \cdot \left(t\_m \cdot t\_m\right)\right)\right) \cdot t\_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\ \end{array} \end{array} \end{array} \]
                                          l_m = (fabs.f64 l)
                                          t\_m = (fabs.f64 t)
                                          t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                          (FPCore (t_s t_m l_m k)
                                           :precision binary64
                                           (let* ((t_2 (* (/ (sin k) l_m) (tan k))))
                                             (*
                                              t_s
                                              (if (<= t_m 4.3e-126)
                                                (/ 2.0 (* (/ (fma (* (* t_m t_m) 2.0) t_m (* (* k t_m) k)) l_m) t_2))
                                                (if (<= t_m 5.1e+129)
                                                  (/
                                                   2.0
                                                   (*
                                                    (* t_m (* (fma (/ k (* t_m t_m)) (/ k l_m) (/ 2.0 l_m)) (* t_m t_m)))
                                                    t_2))
                                                  (/ 2.0 (/ (* (* 2.0 (pow (* k t_m) 2.0)) (/ t_m l_m)) l_m)))))))
                                          l_m = fabs(l);
                                          t\_m = fabs(t);
                                          t\_s = copysign(1.0, t);
                                          double code(double t_s, double t_m, double l_m, double k) {
                                          	double t_2 = (sin(k) / l_m) * tan(k);
                                          	double tmp;
                                          	if (t_m <= 4.3e-126) {
                                          		tmp = 2.0 / ((fma(((t_m * t_m) * 2.0), t_m, ((k * t_m) * k)) / l_m) * t_2);
                                          	} else if (t_m <= 5.1e+129) {
                                          		tmp = 2.0 / ((t_m * (fma((k / (t_m * t_m)), (k / l_m), (2.0 / l_m)) * (t_m * t_m))) * t_2);
                                          	} else {
                                          		tmp = 2.0 / (((2.0 * pow((k * t_m), 2.0)) * (t_m / l_m)) / l_m);
                                          	}
                                          	return t_s * tmp;
                                          }
                                          
                                          l_m = abs(l)
                                          t\_m = abs(t)
                                          t\_s = copysign(1.0, t)
                                          function code(t_s, t_m, l_m, k)
                                          	t_2 = Float64(Float64(sin(k) / l_m) * tan(k))
                                          	tmp = 0.0
                                          	if (t_m <= 4.3e-126)
                                          		tmp = Float64(2.0 / Float64(Float64(fma(Float64(Float64(t_m * t_m) * 2.0), t_m, Float64(Float64(k * t_m) * k)) / l_m) * t_2));
                                          	elseif (t_m <= 5.1e+129)
                                          		tmp = Float64(2.0 / Float64(Float64(t_m * Float64(fma(Float64(k / Float64(t_m * t_m)), Float64(k / l_m), Float64(2.0 / l_m)) * Float64(t_m * t_m))) * t_2));
                                          	else
                                          		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (Float64(k * t_m) ^ 2.0)) * Float64(t_m / l_m)) / l_m));
                                          	end
                                          	return Float64(t_s * tmp)
                                          end
                                          
                                          l_m = N[Abs[l], $MachinePrecision]
                                          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$95$m_, k_] := Block[{t$95$2 = N[(N[(N[Sin[k], $MachinePrecision] / l$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.3e-126], N[(2.0 / N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * t$95$m + N[(N[(k * t$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.1e+129], N[(2.0 / N[(N[(t$95$m * N[(N[(N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision] + N[(2.0 / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          l_m = \left|\ell\right|
                                          \\
                                          t\_m = \left|t\right|
                                          \\
                                          t\_s = \mathsf{copysign}\left(1, t\right)
                                          
                                          \\
                                          \begin{array}{l}
                                          t_2 := \frac{\sin k}{l\_m} \cdot \tan k\\
                                          t\_s \cdot \begin{array}{l}
                                          \mathbf{if}\;t\_m \leq 4.3 \cdot 10^{-126}:\\
                                          \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\left(t\_m \cdot t\_m\right) \cdot 2, t\_m, \left(k \cdot t\_m\right) \cdot k\right)}{l\_m} \cdot t\_2}\\
                                          
                                          \mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{+129}:\\
                                          \;\;\;\;\frac{2}{\left(t\_m \cdot \left(\mathsf{fma}\left(\frac{k}{t\_m \cdot t\_m}, \frac{k}{l\_m}, \frac{2}{l\_m}\right) \cdot \left(t\_m \cdot t\_m\right)\right)\right) \cdot t\_2}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if t < 4.30000000000000033e-126

                                            1. Initial program 51.0%

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

                                              \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                            4. Step-by-step derivation
                                              1. distribute-rgt-inN/A

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

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

                                                \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                              4. *-commutativeN/A

                                                \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                              5. associate-*r*N/A

                                                \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                              6. unpow2N/A

                                                \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                              7. unpow3N/A

                                                \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                              8. *-commutativeN/A

                                                \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                              9. associate-/l*N/A

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

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

                                              \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{\sin k}^{2}}{\ell}}{\ell \cdot \cos k} \cdot \left(t \cdot \mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)\right)}} \]
                                            6. Step-by-step derivation
                                              1. Applied rewrites78.7%

                                                \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
                                              2. Step-by-step derivation
                                                1. Applied rewrites84.1%

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

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

                                                  if 4.30000000000000033e-126 < t < 5.09999999999999996e129

                                                  1. Initial program 67.2%

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

                                                    \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                  4. Step-by-step derivation
                                                    1. distribute-rgt-inN/A

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

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

                                                      \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                    4. *-commutativeN/A

                                                      \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                    5. associate-*r*N/A

                                                      \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                    6. unpow2N/A

                                                      \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                    7. unpow3N/A

                                                      \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                    8. *-commutativeN/A

                                                      \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                    9. associate-/l*N/A

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

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

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

                                                      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
                                                    2. Step-by-step derivation
                                                      1. Applied rewrites89.0%

                                                        \[\leadsto \frac{2}{\left(t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)}{\ell}\right) \cdot \left(\color{blue}{\frac{\sin k}{\ell}} \cdot \tan k\right)} \]
                                                      2. Taylor expanded in t around inf

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

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

                                                        if 5.09999999999999996e129 < t

                                                        1. Initial program 66.8%

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

                                                          \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                        4. Step-by-step derivation
                                                          1. *-commutativeN/A

                                                            \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                          2. associate-/l*N/A

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

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

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

                                                            \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                          6. lower-*.f64N/A

                                                            \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                          7. lower-*.f64N/A

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

                                                            \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                          9. lower-*.f64N/A

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

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

                                                            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                          12. lower-/.f64N/A

                                                            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                          13. lower-/.f64N/A

                                                            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                          14. lower-pow.f6470.2

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

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

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

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

                                                          Alternative 5: 87.5% accurate, 1.7× speedup?

                                                          \[\begin{array}{l} l_m = \left|\ell\right| \\ 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.16 \cdot 10^{+92}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\left(t\_m \cdot t\_m\right) \cdot 2, t\_m, \left(k \cdot t\_m\right) \cdot k\right)}{l\_m} \cdot \left(\frac{\sin k}{l\_m} \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\ \end{array} \end{array} \]
                                                          l_m = (fabs.f64 l)
                                                          t\_m = (fabs.f64 t)
                                                          t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                          (FPCore (t_s t_m l_m k)
                                                           :precision binary64
                                                           (*
                                                            t_s
                                                            (if (<= t_m 1.16e+92)
                                                              (/
                                                               2.0
                                                               (*
                                                                (/ (fma (* (* t_m t_m) 2.0) t_m (* (* k t_m) k)) l_m)
                                                                (* (/ (sin k) l_m) (tan k))))
                                                              (/ 2.0 (/ (* (* 2.0 (pow (* k t_m) 2.0)) (/ t_m l_m)) l_m)))))
                                                          l_m = fabs(l);
                                                          t\_m = fabs(t);
                                                          t\_s = copysign(1.0, t);
                                                          double code(double t_s, double t_m, double l_m, double k) {
                                                          	double tmp;
                                                          	if (t_m <= 1.16e+92) {
                                                          		tmp = 2.0 / ((fma(((t_m * t_m) * 2.0), t_m, ((k * t_m) * k)) / l_m) * ((sin(k) / l_m) * tan(k)));
                                                          	} else {
                                                          		tmp = 2.0 / (((2.0 * pow((k * t_m), 2.0)) * (t_m / l_m)) / l_m);
                                                          	}
                                                          	return t_s * tmp;
                                                          }
                                                          
                                                          l_m = abs(l)
                                                          t\_m = abs(t)
                                                          t\_s = copysign(1.0, t)
                                                          function code(t_s, t_m, l_m, k)
                                                          	tmp = 0.0
                                                          	if (t_m <= 1.16e+92)
                                                          		tmp = Float64(2.0 / Float64(Float64(fma(Float64(Float64(t_m * t_m) * 2.0), t_m, Float64(Float64(k * t_m) * k)) / l_m) * Float64(Float64(sin(k) / l_m) * tan(k))));
                                                          	else
                                                          		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (Float64(k * t_m) ^ 2.0)) * Float64(t_m / l_m)) / l_m));
                                                          	end
                                                          	return Float64(t_s * tmp)
                                                          end
                                                          
                                                          l_m = N[Abs[l], $MachinePrecision]
                                                          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$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.16e+92], N[(2.0 / N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * t$95$m + N[(N[(k * t$95$m), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                          
                                                          \begin{array}{l}
                                                          l_m = \left|\ell\right|
                                                          \\
                                                          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.16 \cdot 10^{+92}:\\
                                                          \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\left(t\_m \cdot t\_m\right) \cdot 2, t\_m, \left(k \cdot t\_m\right) \cdot k\right)}{l\_m} \cdot \left(\frac{\sin k}{l\_m} \cdot \tan k\right)}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if t < 1.16000000000000006e92

                                                            1. Initial program 53.9%

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

                                                              \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                            4. Step-by-step derivation
                                                              1. distribute-rgt-inN/A

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

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

                                                                \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                              4. *-commutativeN/A

                                                                \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                              5. associate-*r*N/A

                                                                \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                              6. unpow2N/A

                                                                \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                              7. unpow3N/A

                                                                \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                              8. *-commutativeN/A

                                                                \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                              9. associate-/l*N/A

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

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

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

                                                                \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites85.1%

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

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

                                                                  if 1.16000000000000006e92 < 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. Add Preprocessing
                                                                  3. Taylor expanded in k around 0

                                                                    \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                                  4. Step-by-step derivation
                                                                    1. *-commutativeN/A

                                                                      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                                    2. associate-/l*N/A

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

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

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

                                                                      \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                    6. lower-*.f64N/A

                                                                      \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                    7. lower-*.f64N/A

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

                                                                      \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                                    9. lower-*.f64N/A

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

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

                                                                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                    12. lower-/.f64N/A

                                                                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                    13. lower-/.f64N/A

                                                                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                                    14. lower-pow.f6468.8

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

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

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

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

                                                                    Alternative 6: 85.2% accurate, 1.7× speedup?

                                                                    \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5.1 \cdot 10^{+129}:\\ \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{\mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)}{l\_m}\right) \cdot \left(\frac{\sin k}{l\_m} \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\ \end{array} \end{array} \]
                                                                    l_m = (fabs.f64 l)
                                                                    t\_m = (fabs.f64 t)
                                                                    t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                    (FPCore (t_s t_m l_m k)
                                                                     :precision binary64
                                                                     (*
                                                                      t_s
                                                                      (if (<= t_m 5.1e+129)
                                                                        (/
                                                                         2.0
                                                                         (*
                                                                          (* t_m (/ (fma (* t_m t_m) 2.0 (* k k)) l_m))
                                                                          (* (/ (sin k) l_m) (tan k))))
                                                                        (/ 2.0 (/ (* (* 2.0 (pow (* k t_m) 2.0)) (/ t_m l_m)) l_m)))))
                                                                    l_m = fabs(l);
                                                                    t\_m = fabs(t);
                                                                    t\_s = copysign(1.0, t);
                                                                    double code(double t_s, double t_m, double l_m, double k) {
                                                                    	double tmp;
                                                                    	if (t_m <= 5.1e+129) {
                                                                    		tmp = 2.0 / ((t_m * (fma((t_m * t_m), 2.0, (k * k)) / l_m)) * ((sin(k) / l_m) * tan(k)));
                                                                    	} else {
                                                                    		tmp = 2.0 / (((2.0 * pow((k * t_m), 2.0)) * (t_m / l_m)) / l_m);
                                                                    	}
                                                                    	return t_s * tmp;
                                                                    }
                                                                    
                                                                    l_m = abs(l)
                                                                    t\_m = abs(t)
                                                                    t\_s = copysign(1.0, t)
                                                                    function code(t_s, t_m, l_m, k)
                                                                    	tmp = 0.0
                                                                    	if (t_m <= 5.1e+129)
                                                                    		tmp = Float64(2.0 / Float64(Float64(t_m * Float64(fma(Float64(t_m * t_m), 2.0, Float64(k * k)) / l_m)) * Float64(Float64(sin(k) / l_m) * tan(k))));
                                                                    	else
                                                                    		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (Float64(k * t_m) ^ 2.0)) * Float64(t_m / l_m)) / l_m));
                                                                    	end
                                                                    	return Float64(t_s * tmp)
                                                                    end
                                                                    
                                                                    l_m = N[Abs[l], $MachinePrecision]
                                                                    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$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.1e+129], N[(2.0 / N[(N[(t$95$m * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0 + N[(k * k), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                    
                                                                    \begin{array}{l}
                                                                    l_m = \left|\ell\right|
                                                                    \\
                                                                    t\_m = \left|t\right|
                                                                    \\
                                                                    t\_s = \mathsf{copysign}\left(1, t\right)
                                                                    
                                                                    \\
                                                                    t\_s \cdot \begin{array}{l}
                                                                    \mathbf{if}\;t\_m \leq 5.1 \cdot 10^{+129}:\\
                                                                    \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{\mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)}{l\_m}\right) \cdot \left(\frac{\sin k}{l\_m} \cdot \tan k\right)}\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 2 regimes
                                                                    2. if t < 5.09999999999999996e129

                                                                      1. Initial program 55.3%

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

                                                                        \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                                      4. Step-by-step derivation
                                                                        1. distribute-rgt-inN/A

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

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

                                                                          \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                        4. *-commutativeN/A

                                                                          \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                        5. associate-*r*N/A

                                                                          \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                        6. unpow2N/A

                                                                          \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                        7. unpow3N/A

                                                                          \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                        8. *-commutativeN/A

                                                                          \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                        9. associate-/l*N/A

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

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

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

                                                                          \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
                                                                        2. Step-by-step derivation
                                                                          1. Applied rewrites85.9%

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

                                                                          if 5.09999999999999996e129 < t

                                                                          1. Initial program 66.8%

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

                                                                            \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                                          4. Step-by-step derivation
                                                                            1. *-commutativeN/A

                                                                              \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                                            2. associate-/l*N/A

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

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

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

                                                                              \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                            6. lower-*.f64N/A

                                                                              \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                            7. lower-*.f64N/A

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

                                                                              \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                                            9. lower-*.f64N/A

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

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

                                                                              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                            12. lower-/.f64N/A

                                                                              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                            13. lower-/.f64N/A

                                                                              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                                            14. lower-pow.f6470.2

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

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

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

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

                                                                            Alternative 7: 81.8% accurate, 1.8× speedup?

                                                                            \[\begin{array}{l} l_m = \left|\ell\right| \\ 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.2 \cdot 10^{-71}:\\ \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{k \cdot k}{l\_m}\right) \cdot \left(\frac{\sin k}{l\_m} \cdot \tan k\right)}\\ \mathbf{elif}\;t\_m \leq 6 \cdot 10^{+71}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \left(t\_m \cdot \mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\ \end{array} \end{array} \]
                                                                            l_m = (fabs.f64 l)
                                                                            t\_m = (fabs.f64 t)
                                                                            t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                            (FPCore (t_s t_m l_m k)
                                                                             :precision binary64
                                                                             (*
                                                                              t_s
                                                                              (if (<= t_m 1.2e-71)
                                                                                (/ 2.0 (* (* t_m (/ (* k k) l_m)) (* (/ (sin k) l_m) (tan k))))
                                                                                (if (<= t_m 6e+71)
                                                                                  (/ 2.0 (* (* (/ k l_m) (/ k l_m)) (* t_m (fma (* t_m t_m) 2.0 (* k k)))))
                                                                                  (/ 2.0 (/ (* (* 2.0 (pow (* k t_m) 2.0)) (/ t_m l_m)) l_m))))))
                                                                            l_m = fabs(l);
                                                                            t\_m = fabs(t);
                                                                            t\_s = copysign(1.0, t);
                                                                            double code(double t_s, double t_m, double l_m, double k) {
                                                                            	double tmp;
                                                                            	if (t_m <= 1.2e-71) {
                                                                            		tmp = 2.0 / ((t_m * ((k * k) / l_m)) * ((sin(k) / l_m) * tan(k)));
                                                                            	} else if (t_m <= 6e+71) {
                                                                            		tmp = 2.0 / (((k / l_m) * (k / l_m)) * (t_m * fma((t_m * t_m), 2.0, (k * k))));
                                                                            	} else {
                                                                            		tmp = 2.0 / (((2.0 * pow((k * t_m), 2.0)) * (t_m / l_m)) / l_m);
                                                                            	}
                                                                            	return t_s * tmp;
                                                                            }
                                                                            
                                                                            l_m = abs(l)
                                                                            t\_m = abs(t)
                                                                            t\_s = copysign(1.0, t)
                                                                            function code(t_s, t_m, l_m, k)
                                                                            	tmp = 0.0
                                                                            	if (t_m <= 1.2e-71)
                                                                            		tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(k * k) / l_m)) * Float64(Float64(sin(k) / l_m) * tan(k))));
                                                                            	elseif (t_m <= 6e+71)
                                                                            		tmp = Float64(2.0 / Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * Float64(t_m * fma(Float64(t_m * t_m), 2.0, Float64(k * k)))));
                                                                            	else
                                                                            		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (Float64(k * t_m) ^ 2.0)) * Float64(t_m / l_m)) / l_m));
                                                                            	end
                                                                            	return Float64(t_s * tmp)
                                                                            end
                                                                            
                                                                            l_m = N[Abs[l], $MachinePrecision]
                                                                            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$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.2e-71], N[(2.0 / N[(N[(t$95$m * N[(N[(k * k), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6e+71], N[(2.0 / N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                                                                            
                                                                            \begin{array}{l}
                                                                            l_m = \left|\ell\right|
                                                                            \\
                                                                            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.2 \cdot 10^{-71}:\\
                                                                            \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{k \cdot k}{l\_m}\right) \cdot \left(\frac{\sin k}{l\_m} \cdot \tan k\right)}\\
                                                                            
                                                                            \mathbf{elif}\;t\_m \leq 6 \cdot 10^{+71}:\\
                                                                            \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \left(t\_m \cdot \mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)\right)}\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 3 regimes
                                                                            2. if t < 1.2e-71

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

                                                                                \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                                              4. Step-by-step derivation
                                                                                1. distribute-rgt-inN/A

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

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

                                                                                  \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                4. *-commutativeN/A

                                                                                  \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                5. associate-*r*N/A

                                                                                  \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                6. unpow2N/A

                                                                                  \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                7. unpow3N/A

                                                                                  \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                8. *-commutativeN/A

                                                                                  \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                9. associate-/l*N/A

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

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

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

                                                                                  \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
                                                                                2. Step-by-step derivation
                                                                                  1. Applied rewrites85.5%

                                                                                    \[\leadsto \frac{2}{\left(t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)}{\ell}\right) \cdot \left(\color{blue}{\frac{\sin k}{\ell}} \cdot \tan k\right)} \]
                                                                                  2. Taylor expanded in t around 0

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

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

                                                                                    if 1.2e-71 < t < 6.00000000000000025e71

                                                                                    1. Initial program 76.7%

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

                                                                                      \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. distribute-rgt-inN/A

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

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

                                                                                        \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                      4. *-commutativeN/A

                                                                                        \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                      5. associate-*r*N/A

                                                                                        \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                      6. unpow2N/A

                                                                                        \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                      7. unpow3N/A

                                                                                        \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                      8. *-commutativeN/A

                                                                                        \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                      9. associate-/l*N/A

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

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

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

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

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

                                                                                      if 6.00000000000000025e71 < t

                                                                                      1. Initial program 70.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. Add Preprocessing
                                                                                      3. Taylor expanded in k around 0

                                                                                        \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                                                      4. Step-by-step derivation
                                                                                        1. *-commutativeN/A

                                                                                          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                                                        2. associate-/l*N/A

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

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

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

                                                                                          \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                        6. lower-*.f64N/A

                                                                                          \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                        7. lower-*.f64N/A

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

                                                                                          \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                                                        9. lower-*.f64N/A

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

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

                                                                                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                        12. lower-/.f64N/A

                                                                                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                        13. lower-/.f64N/A

                                                                                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                                                        14. lower-pow.f6467.5

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

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

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

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

                                                                                        Alternative 8: 75.7% accurate, 2.5× speedup?

                                                                                        \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 8.1 \cdot 10^{-10}:\\ \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{\mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)}{l\_m}\right) \cdot \left(\left(\mathsf{fma}\left(0.16666666666666666, \frac{k \cdot k}{l\_m}, {l\_m}^{-1}\right) \cdot k\right) \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\ \end{array} \end{array} \]
                                                                                        l_m = (fabs.f64 l)
                                                                                        t\_m = (fabs.f64 t)
                                                                                        t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                        (FPCore (t_s t_m l_m k)
                                                                                         :precision binary64
                                                                                         (*
                                                                                          t_s
                                                                                          (if (<= t_m 8.1e-10)
                                                                                            (/
                                                                                             2.0
                                                                                             (*
                                                                                              (* t_m (/ (fma (* t_m t_m) 2.0 (* k k)) l_m))
                                                                                              (* (* (fma 0.16666666666666666 (/ (* k k) l_m) (pow l_m -1.0)) k) k)))
                                                                                            (/ 2.0 (/ (* (* 2.0 (pow (* k t_m) 2.0)) (/ t_m l_m)) l_m)))))
                                                                                        l_m = fabs(l);
                                                                                        t\_m = fabs(t);
                                                                                        t\_s = copysign(1.0, t);
                                                                                        double code(double t_s, double t_m, double l_m, double k) {
                                                                                        	double tmp;
                                                                                        	if (t_m <= 8.1e-10) {
                                                                                        		tmp = 2.0 / ((t_m * (fma((t_m * t_m), 2.0, (k * k)) / l_m)) * ((fma(0.16666666666666666, ((k * k) / l_m), pow(l_m, -1.0)) * k) * k));
                                                                                        	} else {
                                                                                        		tmp = 2.0 / (((2.0 * pow((k * t_m), 2.0)) * (t_m / l_m)) / l_m);
                                                                                        	}
                                                                                        	return t_s * tmp;
                                                                                        }
                                                                                        
                                                                                        l_m = abs(l)
                                                                                        t\_m = abs(t)
                                                                                        t\_s = copysign(1.0, t)
                                                                                        function code(t_s, t_m, l_m, k)
                                                                                        	tmp = 0.0
                                                                                        	if (t_m <= 8.1e-10)
                                                                                        		tmp = Float64(2.0 / Float64(Float64(t_m * Float64(fma(Float64(t_m * t_m), 2.0, Float64(k * k)) / l_m)) * Float64(Float64(fma(0.16666666666666666, Float64(Float64(k * k) / l_m), (l_m ^ -1.0)) * k) * k)));
                                                                                        	else
                                                                                        		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (Float64(k * t_m) ^ 2.0)) * Float64(t_m / l_m)) / l_m));
                                                                                        	end
                                                                                        	return Float64(t_s * tmp)
                                                                                        end
                                                                                        
                                                                                        l_m = N[Abs[l], $MachinePrecision]
                                                                                        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$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8.1e-10], N[(2.0 / N[(N[(t$95$m * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0 + N[(k * k), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(0.16666666666666666 * N[(N[(k * k), $MachinePrecision] / l$95$m), $MachinePrecision] + N[Power[l$95$m, -1.0], $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                        
                                                                                        \begin{array}{l}
                                                                                        l_m = \left|\ell\right|
                                                                                        \\
                                                                                        t\_m = \left|t\right|
                                                                                        \\
                                                                                        t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                        
                                                                                        \\
                                                                                        t\_s \cdot \begin{array}{l}
                                                                                        \mathbf{if}\;t\_m \leq 8.1 \cdot 10^{-10}:\\
                                                                                        \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{\mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)}{l\_m}\right) \cdot \left(\left(\mathsf{fma}\left(0.16666666666666666, \frac{k \cdot k}{l\_m}, {l\_m}^{-1}\right) \cdot k\right) \cdot k\right)}\\
                                                                                        
                                                                                        \mathbf{else}:\\
                                                                                        \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\_m\right)}^{2}\right) \cdot \frac{t\_m}{l\_m}}{l\_m}}\\
                                                                                        
                                                                                        
                                                                                        \end{array}
                                                                                        \end{array}
                                                                                        
                                                                                        Derivation
                                                                                        1. Split input into 2 regimes
                                                                                        2. if t < 8.09999999999999995e-10

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

                                                                                            \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. distribute-rgt-inN/A

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

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

                                                                                              \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                            4. *-commutativeN/A

                                                                                              \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                            5. associate-*r*N/A

                                                                                              \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                            6. unpow2N/A

                                                                                              \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                            7. unpow3N/A

                                                                                              \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                            8. *-commutativeN/A

                                                                                              \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                            9. associate-/l*N/A

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

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

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

                                                                                              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
                                                                                            2. Step-by-step derivation
                                                                                              1. Applied rewrites85.3%

                                                                                                \[\leadsto \frac{2}{\left(t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)}{\ell}\right) \cdot \left(\color{blue}{\frac{\sin k}{\ell}} \cdot \tan k\right)} \]
                                                                                              2. Taylor expanded in k around 0

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

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

                                                                                                if 8.09999999999999995e-10 < t

                                                                                                1. Initial program 71.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. Add Preprocessing
                                                                                                3. Taylor expanded in k around 0

                                                                                                  \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. *-commutativeN/A

                                                                                                    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                                                                  2. associate-/l*N/A

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

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

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

                                                                                                    \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                  6. lower-*.f64N/A

                                                                                                    \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                  7. lower-*.f64N/A

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

                                                                                                    \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                                                                  9. lower-*.f64N/A

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

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

                                                                                                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                  12. lower-/.f64N/A

                                                                                                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                  13. lower-/.f64N/A

                                                                                                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                                                                  14. lower-pow.f6467.9

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

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

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

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

                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 8.1 \cdot 10^{-10}:\\ \;\;\;\;\frac{2}{\left(t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)}{\ell}\right) \cdot \left(\left(\mathsf{fma}\left(0.16666666666666666, \frac{k \cdot k}{\ell}, {\ell}^{-1}\right) \cdot k\right) \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {\left(k \cdot t\right)}^{2}\right) \cdot \frac{t}{\ell}}{\ell}}\\ \end{array} \]
                                                                                                  5. Add Preprocessing

                                                                                                  Alternative 9: 73.6% accurate, 2.5× speedup?

                                                                                                  \[\begin{array}{l} l_m = \left|\ell\right| \\ 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.5 \cdot 10^{-10}:\\ \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{\mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)}{l\_m}\right) \cdot \left(\left(\mathsf{fma}\left(0.16666666666666666, \frac{k \cdot k}{l\_m}, {l\_m}^{-1}\right) \cdot k\right) \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_m \cdot \frac{\frac{t\_m}{l\_m} \cdot \left(\left(\left(k \cdot t\_m\right) \cdot k\right) \cdot 2\right)}{l\_m}}\\ \end{array} \end{array} \]
                                                                                                  l_m = (fabs.f64 l)
                                                                                                  t\_m = (fabs.f64 t)
                                                                                                  t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                  (FPCore (t_s t_m l_m k)
                                                                                                   :precision binary64
                                                                                                   (*
                                                                                                    t_s
                                                                                                    (if (<= t_m 7.5e-10)
                                                                                                      (/
                                                                                                       2.0
                                                                                                       (*
                                                                                                        (* t_m (/ (fma (* t_m t_m) 2.0 (* k k)) l_m))
                                                                                                        (* (* (fma 0.16666666666666666 (/ (* k k) l_m) (pow l_m -1.0)) k) k)))
                                                                                                      (/ 2.0 (* t_m (/ (* (/ t_m l_m) (* (* (* k t_m) k) 2.0)) l_m))))))
                                                                                                  l_m = fabs(l);
                                                                                                  t\_m = fabs(t);
                                                                                                  t\_s = copysign(1.0, t);
                                                                                                  double code(double t_s, double t_m, double l_m, double k) {
                                                                                                  	double tmp;
                                                                                                  	if (t_m <= 7.5e-10) {
                                                                                                  		tmp = 2.0 / ((t_m * (fma((t_m * t_m), 2.0, (k * k)) / l_m)) * ((fma(0.16666666666666666, ((k * k) / l_m), pow(l_m, -1.0)) * k) * k));
                                                                                                  	} else {
                                                                                                  		tmp = 2.0 / (t_m * (((t_m / l_m) * (((k * t_m) * k) * 2.0)) / l_m));
                                                                                                  	}
                                                                                                  	return t_s * tmp;
                                                                                                  }
                                                                                                  
                                                                                                  l_m = abs(l)
                                                                                                  t\_m = abs(t)
                                                                                                  t\_s = copysign(1.0, t)
                                                                                                  function code(t_s, t_m, l_m, k)
                                                                                                  	tmp = 0.0
                                                                                                  	if (t_m <= 7.5e-10)
                                                                                                  		tmp = Float64(2.0 / Float64(Float64(t_m * Float64(fma(Float64(t_m * t_m), 2.0, Float64(k * k)) / l_m)) * Float64(Float64(fma(0.16666666666666666, Float64(Float64(k * k) / l_m), (l_m ^ -1.0)) * k) * k)));
                                                                                                  	else
                                                                                                  		tmp = Float64(2.0 / Float64(t_m * Float64(Float64(Float64(t_m / l_m) * Float64(Float64(Float64(k * t_m) * k) * 2.0)) / l_m)));
                                                                                                  	end
                                                                                                  	return Float64(t_s * tmp)
                                                                                                  end
                                                                                                  
                                                                                                  l_m = N[Abs[l], $MachinePrecision]
                                                                                                  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$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e-10], N[(2.0 / N[(N[(t$95$m * N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0 + N[(k * k), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(0.16666666666666666 * N[(N[(k * k), $MachinePrecision] / l$95$m), $MachinePrecision] + N[Power[l$95$m, -1.0], $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[(N[(t$95$m / l$95$m), $MachinePrecision] * N[(N[(N[(k * t$95$m), $MachinePrecision] * k), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  l_m = \left|\ell\right|
                                                                                                  \\
                                                                                                  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.5 \cdot 10^{-10}:\\
                                                                                                  \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{\mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)}{l\_m}\right) \cdot \left(\left(\mathsf{fma}\left(0.16666666666666666, \frac{k \cdot k}{l\_m}, {l\_m}^{-1}\right) \cdot k\right) \cdot k\right)}\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;\frac{2}{t\_m \cdot \frac{\frac{t\_m}{l\_m} \cdot \left(\left(\left(k \cdot t\_m\right) \cdot k\right) \cdot 2\right)}{l\_m}}\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 2 regimes
                                                                                                  2. if t < 7.49999999999999995e-10

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

                                                                                                      \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. distribute-rgt-inN/A

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

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

                                                                                                        \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                      4. *-commutativeN/A

                                                                                                        \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                      5. associate-*r*N/A

                                                                                                        \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                      6. unpow2N/A

                                                                                                        \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                      7. unpow3N/A

                                                                                                        \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                      8. *-commutativeN/A

                                                                                                        \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                      9. associate-/l*N/A

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

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

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

                                                                                                        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot t}{\ell} \cdot \color{blue}{\left(\frac{\sin k}{\ell} \cdot \tan k\right)}} \]
                                                                                                      2. Step-by-step derivation
                                                                                                        1. Applied rewrites85.3%

                                                                                                          \[\leadsto \frac{2}{\left(t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)}{\ell}\right) \cdot \left(\color{blue}{\frac{\sin k}{\ell}} \cdot \tan k\right)} \]
                                                                                                        2. Taylor expanded in k around 0

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

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

                                                                                                          if 7.49999999999999995e-10 < t

                                                                                                          1. Initial program 71.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. Add Preprocessing
                                                                                                          3. Taylor expanded in k around 0

                                                                                                            \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. *-commutativeN/A

                                                                                                              \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                                                                            2. associate-/l*N/A

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

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

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

                                                                                                              \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                            6. lower-*.f64N/A

                                                                                                              \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                            7. lower-*.f64N/A

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

                                                                                                              \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                                                                            9. lower-*.f64N/A

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

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

                                                                                                              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                            12. lower-/.f64N/A

                                                                                                              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                            13. lower-/.f64N/A

                                                                                                              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                                                                            14. lower-pow.f6467.9

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

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

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

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

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

                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 7.5 \cdot 10^{-10}:\\ \;\;\;\;\frac{2}{\left(t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)}{\ell}\right) \cdot \left(\left(\mathsf{fma}\left(0.16666666666666666, \frac{k \cdot k}{\ell}, {\ell}^{-1}\right) \cdot k\right) \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot \frac{\frac{t}{\ell} \cdot \left(\left(\left(k \cdot t\right) \cdot k\right) \cdot 2\right)}{\ell}}\\ \end{array} \]
                                                                                                              5. Add Preprocessing

                                                                                                              Alternative 10: 73.0% accurate, 6.1× speedup?

                                                                                                              \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;l\_m \cdot l\_m \leq 2 \cdot 10^{-122}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \left(t\_m \cdot \mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_m \cdot \frac{\frac{t\_m}{l\_m} \cdot \left(\left(\left(k \cdot t\_m\right) \cdot k\right) \cdot 2\right)}{l\_m}}\\ \end{array} \end{array} \]
                                                                                                              l_m = (fabs.f64 l)
                                                                                                              t\_m = (fabs.f64 t)
                                                                                                              t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                              (FPCore (t_s t_m l_m k)
                                                                                                               :precision binary64
                                                                                                               (*
                                                                                                                t_s
                                                                                                                (if (<= (* l_m l_m) 2e-122)
                                                                                                                  (/ 2.0 (* (* (/ k l_m) (/ k l_m)) (* t_m (fma (* t_m t_m) 2.0 (* k k)))))
                                                                                                                  (/ 2.0 (* t_m (/ (* (/ t_m l_m) (* (* (* k t_m) k) 2.0)) l_m))))))
                                                                                                              l_m = fabs(l);
                                                                                                              t\_m = fabs(t);
                                                                                                              t\_s = copysign(1.0, t);
                                                                                                              double code(double t_s, double t_m, double l_m, double k) {
                                                                                                              	double tmp;
                                                                                                              	if ((l_m * l_m) <= 2e-122) {
                                                                                                              		tmp = 2.0 / (((k / l_m) * (k / l_m)) * (t_m * fma((t_m * t_m), 2.0, (k * k))));
                                                                                                              	} else {
                                                                                                              		tmp = 2.0 / (t_m * (((t_m / l_m) * (((k * t_m) * k) * 2.0)) / l_m));
                                                                                                              	}
                                                                                                              	return t_s * tmp;
                                                                                                              }
                                                                                                              
                                                                                                              l_m = abs(l)
                                                                                                              t\_m = abs(t)
                                                                                                              t\_s = copysign(1.0, t)
                                                                                                              function code(t_s, t_m, l_m, k)
                                                                                                              	tmp = 0.0
                                                                                                              	if (Float64(l_m * l_m) <= 2e-122)
                                                                                                              		tmp = Float64(2.0 / Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * Float64(t_m * fma(Float64(t_m * t_m), 2.0, Float64(k * k)))));
                                                                                                              	else
                                                                                                              		tmp = Float64(2.0 / Float64(t_m * Float64(Float64(Float64(t_m / l_m) * Float64(Float64(Float64(k * t_m) * k) * 2.0)) / l_m)));
                                                                                                              	end
                                                                                                              	return Float64(t_s * tmp)
                                                                                                              end
                                                                                                              
                                                                                                              l_m = N[Abs[l], $MachinePrecision]
                                                                                                              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$95$m_, k_] := N[(t$95$s * If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 2e-122], N[(2.0 / N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[(N[(t$95$m / l$95$m), $MachinePrecision] * N[(N[(N[(k * t$95$m), $MachinePrecision] * k), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                              
                                                                                                              \begin{array}{l}
                                                                                                              l_m = \left|\ell\right|
                                                                                                              \\
                                                                                                              t\_m = \left|t\right|
                                                                                                              \\
                                                                                                              t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                              
                                                                                                              \\
                                                                                                              t\_s \cdot \begin{array}{l}
                                                                                                              \mathbf{if}\;l\_m \cdot l\_m \leq 2 \cdot 10^{-122}:\\
                                                                                                              \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \left(t\_m \cdot \mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)\right)}\\
                                                                                                              
                                                                                                              \mathbf{else}:\\
                                                                                                              \;\;\;\;\frac{2}{t\_m \cdot \frac{\frac{t\_m}{l\_m} \cdot \left(\left(\left(k \cdot t\_m\right) \cdot k\right) \cdot 2\right)}{l\_m}}\\
                                                                                                              
                                                                                                              
                                                                                                              \end{array}
                                                                                                              \end{array}
                                                                                                              
                                                                                                              Derivation
                                                                                                              1. Split input into 2 regimes
                                                                                                              2. if (*.f64 l l) < 2.00000000000000012e-122

                                                                                                                1. Initial program 61.2%

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

                                                                                                                  \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. distribute-rgt-inN/A

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

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

                                                                                                                    \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                  4. *-commutativeN/A

                                                                                                                    \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                  5. associate-*r*N/A

                                                                                                                    \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                  6. unpow2N/A

                                                                                                                    \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                  7. unpow3N/A

                                                                                                                    \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                  8. *-commutativeN/A

                                                                                                                    \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                  9. associate-/l*N/A

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

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

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

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

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

                                                                                                                  if 2.00000000000000012e-122 < (*.f64 l l)

                                                                                                                  1. Initial program 53.4%

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

                                                                                                                    \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                  4. Step-by-step derivation
                                                                                                                    1. *-commutativeN/A

                                                                                                                      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                                                                                    2. associate-/l*N/A

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

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

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

                                                                                                                      \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                    6. lower-*.f64N/A

                                                                                                                      \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                    7. lower-*.f64N/A

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

                                                                                                                      \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                                                                                    9. lower-*.f64N/A

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

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

                                                                                                                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                                    12. lower-/.f64N/A

                                                                                                                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                                    13. lower-/.f64N/A

                                                                                                                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                                                                                    14. lower-pow.f6454.1

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

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

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

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

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

                                                                                                                      Alternative 11: 70.9% accurate, 6.5× speedup?

                                                                                                                      \[\begin{array}{l} l_m = \left|\ell\right| \\ 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.75 \cdot 10^{-15}:\\ \;\;\;\;\frac{2}{\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(t\_m \cdot \mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_m \cdot \frac{\frac{t\_m}{l\_m} \cdot \left(\left(\left(k \cdot t\_m\right) \cdot k\right) \cdot 2\right)}{l\_m}}\\ \end{array} \end{array} \]
                                                                                                                      l_m = (fabs.f64 l)
                                                                                                                      t\_m = (fabs.f64 t)
                                                                                                                      t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                      (FPCore (t_s t_m l_m k)
                                                                                                                       :precision binary64
                                                                                                                       (*
                                                                                                                        t_s
                                                                                                                        (if (<= t_m 2.75e-15)
                                                                                                                          (/ 2.0 (* (/ (/ (* k k) l_m) l_m) (* t_m (fma (* t_m t_m) 2.0 (* k k)))))
                                                                                                                          (/ 2.0 (* t_m (/ (* (/ t_m l_m) (* (* (* k t_m) k) 2.0)) l_m))))))
                                                                                                                      l_m = fabs(l);
                                                                                                                      t\_m = fabs(t);
                                                                                                                      t\_s = copysign(1.0, t);
                                                                                                                      double code(double t_s, double t_m, double l_m, double k) {
                                                                                                                      	double tmp;
                                                                                                                      	if (t_m <= 2.75e-15) {
                                                                                                                      		tmp = 2.0 / ((((k * k) / l_m) / l_m) * (t_m * fma((t_m * t_m), 2.0, (k * k))));
                                                                                                                      	} else {
                                                                                                                      		tmp = 2.0 / (t_m * (((t_m / l_m) * (((k * t_m) * k) * 2.0)) / l_m));
                                                                                                                      	}
                                                                                                                      	return t_s * tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      l_m = abs(l)
                                                                                                                      t\_m = abs(t)
                                                                                                                      t\_s = copysign(1.0, t)
                                                                                                                      function code(t_s, t_m, l_m, k)
                                                                                                                      	tmp = 0.0
                                                                                                                      	if (t_m <= 2.75e-15)
                                                                                                                      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) / l_m) / l_m) * Float64(t_m * fma(Float64(t_m * t_m), 2.0, Float64(k * k)))));
                                                                                                                      	else
                                                                                                                      		tmp = Float64(2.0 / Float64(t_m * Float64(Float64(Float64(t_m / l_m) * Float64(Float64(Float64(k * t_m) * k) * 2.0)) / l_m)));
                                                                                                                      	end
                                                                                                                      	return Float64(t_s * tmp)
                                                                                                                      end
                                                                                                                      
                                                                                                                      l_m = N[Abs[l], $MachinePrecision]
                                                                                                                      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$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.75e-15], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0 + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$m * N[(N[(N[(t$95$m / l$95$m), $MachinePrecision] * N[(N[(N[(k * t$95$m), $MachinePrecision] * k), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                                      
                                                                                                                      \begin{array}{l}
                                                                                                                      l_m = \left|\ell\right|
                                                                                                                      \\
                                                                                                                      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.75 \cdot 10^{-15}:\\
                                                                                                                      \;\;\;\;\frac{2}{\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(t\_m \cdot \mathsf{fma}\left(t\_m \cdot t\_m, 2, k \cdot k\right)\right)}\\
                                                                                                                      
                                                                                                                      \mathbf{else}:\\
                                                                                                                      \;\;\;\;\frac{2}{t\_m \cdot \frac{\frac{t\_m}{l\_m} \cdot \left(\left(\left(k \cdot t\_m\right) \cdot k\right) \cdot 2\right)}{l\_m}}\\
                                                                                                                      
                                                                                                                      
                                                                                                                      \end{array}
                                                                                                                      \end{array}
                                                                                                                      
                                                                                                                      Derivation
                                                                                                                      1. Split input into 2 regimes
                                                                                                                      2. if t < 2.7500000000000001e-15

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

                                                                                                                          \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                                                                                        4. Step-by-step derivation
                                                                                                                          1. distribute-rgt-inN/A

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

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

                                                                                                                            \[\leadsto \frac{2}{2 \cdot \color{blue}{\frac{\left({t}^{2} \cdot {\sin k}^{2}\right) \cdot t}{{\ell}^{2} \cdot \cos k}} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                          4. *-commutativeN/A

                                                                                                                            \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{\left({\sin k}^{2} \cdot {t}^{2}\right)} \cdot t}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                          5. associate-*r*N/A

                                                                                                                            \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{\sin k}^{2} \cdot \left({t}^{2} \cdot t\right)}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                          6. unpow2N/A

                                                                                                                            \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                          7. unpow3N/A

                                                                                                                            \[\leadsto \frac{2}{2 \cdot \frac{{\sin k}^{2} \cdot \color{blue}{{t}^{3}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                          8. *-commutativeN/A

                                                                                                                            \[\leadsto \frac{2}{2 \cdot \frac{\color{blue}{{t}^{3} \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot t} \]
                                                                                                                          9. associate-/l*N/A

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

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

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

                                                                                                                            \[\leadsto \frac{2}{\frac{\frac{0.5}{\ell} - \frac{0.5 \cdot \cos \left(k + k\right)}{\ell}}{\ell \cdot \cos k} \cdot \left(t \cdot \mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)\right)} \]
                                                                                                                          2. Taylor expanded in k around 0

                                                                                                                            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \left(\color{blue}{t} \cdot \mathsf{fma}\left(t \cdot t, 2, k \cdot k\right)\right)} \]
                                                                                                                          3. Step-by-step derivation
                                                                                                                            1. Applied rewrites61.8%

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

                                                                                                                            if 2.7500000000000001e-15 < t

                                                                                                                            1. Initial program 71.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. Add Preprocessing
                                                                                                                            3. Taylor expanded in k around 0

                                                                                                                              \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                            4. Step-by-step derivation
                                                                                                                              1. *-commutativeN/A

                                                                                                                                \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                                                                                              2. associate-/l*N/A

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

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

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

                                                                                                                                \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                              6. lower-*.f64N/A

                                                                                                                                \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                              7. lower-*.f64N/A

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

                                                                                                                                \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                                                                                              9. lower-*.f64N/A

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

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

                                                                                                                                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                                              12. lower-/.f64N/A

                                                                                                                                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                                              13. lower-/.f64N/A

                                                                                                                                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                                                                                              14. lower-pow.f6467.9

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

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

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

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

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

                                                                                                                                Alternative 12: 68.0% accurate, 7.8× speedup?

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

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

                                                                                                                                  \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                                4. Step-by-step derivation
                                                                                                                                  1. *-commutativeN/A

                                                                                                                                    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                                                                                                  2. associate-/l*N/A

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

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

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

                                                                                                                                    \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                                  6. lower-*.f64N/A

                                                                                                                                    \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                                  7. lower-*.f64N/A

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

                                                                                                                                    \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                                                                                                  9. lower-*.f64N/A

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

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

                                                                                                                                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                                                  12. lower-/.f64N/A

                                                                                                                                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                                                  13. lower-/.f64N/A

                                                                                                                                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                                                                                                  14. lower-pow.f6455.9

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

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

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

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

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

                                                                                                                                      Alternative 13: 63.1% accurate, 8.7× speedup?

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

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

                                                                                                                                        \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                                      4. Step-by-step derivation
                                                                                                                                        1. *-commutativeN/A

                                                                                                                                          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                                                                                                        2. associate-/l*N/A

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

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

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

                                                                                                                                          \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                                        6. lower-*.f64N/A

                                                                                                                                          \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                                        7. lower-*.f64N/A

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

                                                                                                                                          \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                                                                                                        9. lower-*.f64N/A

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

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

                                                                                                                                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                                                        12. lower-/.f64N/A

                                                                                                                                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                                                        13. lower-/.f64N/A

                                                                                                                                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                                                                                                        14. lower-pow.f6455.9

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

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

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

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

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

                                                                                                                                            Alternative 14: 60.1% accurate, 8.7× speedup?

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

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

                                                                                                                                              \[\leadsto \frac{2}{\color{blue}{2 \cdot \frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                                            4. Step-by-step derivation
                                                                                                                                              1. *-commutativeN/A

                                                                                                                                                \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot {t}^{3}}{{\ell}^{2}} \cdot 2}} \]
                                                                                                                                              2. associate-/l*N/A

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

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

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

                                                                                                                                                \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                                              6. lower-*.f64N/A

                                                                                                                                                \[\leadsto \frac{2}{\color{blue}{\left({k}^{2} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}}} \]
                                                                                                                                              7. lower-*.f64N/A

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

                                                                                                                                                \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot k\right)} \cdot 2\right) \cdot \frac{{t}^{3}}{{\ell}^{2}}} \]
                                                                                                                                              9. lower-*.f64N/A

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

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

                                                                                                                                                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                                                              12. lower-/.f64N/A

                                                                                                                                                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}}} \]
                                                                                                                                              13. lower-/.f64N/A

                                                                                                                                                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot 2\right) \cdot \frac{\color{blue}{\frac{{t}^{3}}{\ell}}}{\ell}} \]
                                                                                                                                              14. lower-pow.f6455.9

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

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

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

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

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

                                                                                                                                                  Reproduce

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