Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.7% → 92.3%
Time: 18.2s
Alternatives: 26
Speedup: 12.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 26 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 54.7% accurate, 1.0× speedup?

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

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

Alternative 1: 92.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_2 := \tan k \cdot \frac{k}{\ell}\\
t_3 := \frac{\sin k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.85 \cdot 10^{-109}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), t\_2 \cdot \left(t\_m \cdot k\right)\right) \cdot t\_3}\\

\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
\;\;\;\;\frac{\frac{2}{t\_3}}{t\_m \cdot \mathsf{fma}\left(k, t\_2, 2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \frac{\tan k}{\ell}\right)\right)}\\

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


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

    1. Initial program 49.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
      8. lower-/.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
      9. lower-sin.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
      10. lower-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
      11. lower-cos.f64N/A

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

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

        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
    7. Applied rewrites89.0%

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

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

      if 1.8499999999999999e-109 < t < 1.25000000000000001e154

      1. Initial program 70.2%

        \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
        4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
      6. Step-by-step derivation
        1. lower-*.f64N/A

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
        8. lower-/.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
        9. lower-sin.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
        10. lower-*.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
        11. lower-cos.f64N/A

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

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

          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
      7. Applied rewrites96.6%

        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \frac{2 \cdot \left(t \cdot \left(t \cdot \sin k\right)\right)}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
      8. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \frac{2 \cdot \left(t \cdot \left(t \cdot \sin k\right)\right)}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \frac{2 \cdot \left(t \cdot \left(t \cdot \sin k\right)\right)}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}}} \]
        3. *-commutativeN/A

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

          \[\leadsto \color{blue}{\frac{\frac{2}{\frac{\sin k}{\ell}}}{t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \frac{2 \cdot \left(t \cdot \left(t \cdot \sin k\right)\right)}{\ell \cdot \cos k}\right)}} \]
      9. Applied rewrites96.8%

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

      if 1.25000000000000001e154 < t

      1. Initial program 59.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 k around 0

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

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

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

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

          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
        6. cube-multN/A

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

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

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

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

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

          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
        12. lower-*.f6456.0

          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
      5. Applied rewrites56.0%

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.85 \cdot 10^{-109}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t \cdot \left(\left(t \cdot t\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{\frac{2}{\frac{\sin k}{\ell}}}{t \cdot \mathsf{fma}\left(k, \tan k \cdot \frac{k}{\ell}, 2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\tan k}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t \cdot \left(t \cdot k\right)\right)}}{t}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 2: 91.4% accurate, 0.9× speedup?

          \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3 \cdot 10^{+110}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t\_m \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \frac{\sin k \cdot {t\_m}^{1.5}}{\ell}\right)\right) \cdot \mathsf{fma}\left(k \cdot \frac{k}{t\_m}, \frac{1}{t\_m}, 2\right)}\\ \end{array} \end{array} \]
          t\_m = (fabs.f64 t)
          t\_s = (copysign.f64 #s(literal 1 binary64) t)
          (FPCore (t_s t_m l k)
           :precision binary64
           (*
            t_s
            (if (<= t_m 3e+110)
              (/
               2.0
               (*
                (fma
                 (/ 2.0 l)
                 (* t_m (* (* t_m t_m) (tan k)))
                 (* (* (tan k) (/ k l)) (* t_m k)))
                (/ (sin k) l)))
              (/
               2.0
               (*
                (* (tan k) (* (/ (pow t_m 1.5) l) (/ (* (sin k) (pow t_m 1.5)) l)))
                (fma (* k (/ k t_m)) (/ 1.0 t_m) 2.0))))))
          t\_m = fabs(t);
          t\_s = copysign(1.0, t);
          double code(double t_s, double t_m, double l, double k) {
          	double tmp;
          	if (t_m <= 3e+110) {
          		tmp = 2.0 / (fma((2.0 / l), (t_m * ((t_m * t_m) * tan(k))), ((tan(k) * (k / l)) * (t_m * k))) * (sin(k) / l));
          	} else {
          		tmp = 2.0 / ((tan(k) * ((pow(t_m, 1.5) / l) * ((sin(k) * pow(t_m, 1.5)) / l))) * fma((k * (k / t_m)), (1.0 / t_m), 2.0));
          	}
          	return t_s * tmp;
          }
          
          t\_m = abs(t)
          t\_s = copysign(1.0, t)
          function code(t_s, t_m, l, k)
          	tmp = 0.0
          	if (t_m <= 3e+110)
          		tmp = Float64(2.0 / Float64(fma(Float64(2.0 / l), Float64(t_m * Float64(Float64(t_m * t_m) * tan(k))), Float64(Float64(tan(k) * Float64(k / l)) * Float64(t_m * k))) * Float64(sin(k) / l)));
          	else
          		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((t_m ^ 1.5) / l) * Float64(Float64(sin(k) * (t_m ^ 1.5)) / l))) * fma(Float64(k * Float64(k / t_m)), Float64(1.0 / t_m), 2.0)));
          	end
          	return Float64(t_s * tmp)
          end
          
          t\_m = N[Abs[t], $MachinePrecision]
          t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3e+110], N[(2.0 / N[(N[(N[(2.0 / l), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
          
          \begin{array}{l}
          t\_m = \left|t\right|
          \\
          t\_s = \mathsf{copysign}\left(1, t\right)
          
          \\
          t\_s \cdot \begin{array}{l}
          \mathbf{if}\;t\_m \leq 3 \cdot 10^{+110}:\\
          \;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t\_m \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \frac{\sin k \cdot {t\_m}^{1.5}}{\ell}\right)\right) \cdot \mathsf{fma}\left(k \cdot \frac{k}{t\_m}, \frac{1}{t\_m}, 2\right)}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < 3.00000000000000007e110

            1. Initial program 55.8%

              \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
              4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
              8. lower-/.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
              9. lower-sin.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
              10. lower-*.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
              11. lower-cos.f64N/A

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

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

                \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
            7. Applied rewrites91.1%

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

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

              if 3.00000000000000007e110 < t

              1. Initial program 54.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. 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-eval85.0

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

                \[\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)} \]
              5. Step-by-step derivation
                1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{2}{\left(\left(\frac{{t}^{\frac{3}{2}}}{\ell} \cdot \frac{{t}^{\frac{3}{2}} \cdot \sin k}{\ell}\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\color{blue}{\frac{k}{t} \cdot k}, \frac{1}{t}, 2\right)} \]
                13. lower-/.f6485.0

                  \[\leadsto \frac{2}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \frac{{t}^{1.5} \cdot \sin k}{\ell}\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\frac{k}{t} \cdot k, \color{blue}{\frac{1}{t}}, 2\right)} \]
              6. Applied rewrites85.0%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3 \cdot 10^{+110}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t \cdot \left(\left(t \cdot t\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \frac{\sin k \cdot {t}^{1.5}}{\ell}\right)\right) \cdot \mathsf{fma}\left(k \cdot \frac{k}{t}, \frac{1}{t}, 2\right)}\\ \end{array} \]
            11. Add Preprocessing

            Alternative 3: 91.7% accurate, 0.9× speedup?

            \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3 \cdot 10^{+110}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t\_m \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \frac{\sin k \cdot {t\_m}^{1.5}}{\ell}\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\ \end{array} \end{array} \]
            t\_m = (fabs.f64 t)
            t\_s = (copysign.f64 #s(literal 1 binary64) t)
            (FPCore (t_s t_m l k)
             :precision binary64
             (*
              t_s
              (if (<= t_m 3e+110)
                (/
                 2.0
                 (*
                  (fma
                   (/ 2.0 l)
                   (* t_m (* (* t_m t_m) (tan k)))
                   (* (* (tan k) (/ k l)) (* t_m k)))
                  (/ (sin k) l)))
                (/
                 2.0
                 (*
                  (* (tan k) (* (/ (pow t_m 1.5) l) (/ (* (sin k) (pow t_m 1.5)) l)))
                  (fma (/ k t_m) (/ k t_m) 2.0))))))
            t\_m = fabs(t);
            t\_s = copysign(1.0, t);
            double code(double t_s, double t_m, double l, double k) {
            	double tmp;
            	if (t_m <= 3e+110) {
            		tmp = 2.0 / (fma((2.0 / l), (t_m * ((t_m * t_m) * tan(k))), ((tan(k) * (k / l)) * (t_m * k))) * (sin(k) / l));
            	} else {
            		tmp = 2.0 / ((tan(k) * ((pow(t_m, 1.5) / l) * ((sin(k) * pow(t_m, 1.5)) / l))) * fma((k / t_m), (k / t_m), 2.0));
            	}
            	return t_s * tmp;
            }
            
            t\_m = abs(t)
            t\_s = copysign(1.0, t)
            function code(t_s, t_m, l, k)
            	tmp = 0.0
            	if (t_m <= 3e+110)
            		tmp = Float64(2.0 / Float64(fma(Float64(2.0 / l), Float64(t_m * Float64(Float64(t_m * t_m) * tan(k))), Float64(Float64(tan(k) * Float64(k / l)) * Float64(t_m * k))) * Float64(sin(k) / l)));
            	else
            		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64((t_m ^ 1.5) / l) * Float64(Float64(sin(k) * (t_m ^ 1.5)) / l))) * fma(Float64(k / t_m), Float64(k / t_m), 2.0)));
            	end
            	return Float64(t_s * tmp)
            end
            
            t\_m = N[Abs[t], $MachinePrecision]
            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3e+110], N[(2.0 / N[(N[(N[(2.0 / l), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \begin{array}{l}
            t\_m = \left|t\right|
            \\
            t\_s = \mathsf{copysign}\left(1, t\right)
            
            \\
            t\_s \cdot \begin{array}{l}
            \mathbf{if}\;t\_m \leq 3 \cdot 10^{+110}:\\
            \;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t\_m \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \frac{\sin k \cdot {t\_m}^{1.5}}{\ell}\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if t < 3.00000000000000007e110

              1. Initial program 55.8%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
              6. Step-by-step derivation
                1. lower-*.f64N/A

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

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

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

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

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

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

                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                8. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                9. lower-sin.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                10. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                11. lower-cos.f64N/A

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

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

                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
              7. Applied rewrites91.1%

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

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

                if 3.00000000000000007e110 < t

                1. Initial program 54.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. 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-eval85.0

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

                  \[\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)} \]
                5. Step-by-step derivation
                  1. lift-+.f64N/A

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \frac{{t}^{1.5} \cdot \sin k}{\ell}\right) \cdot \tan k\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}} \]
                6. Applied rewrites85.0%

                  \[\leadsto \frac{2}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \frac{{t}^{1.5} \cdot \sin k}{\ell}\right) \cdot \tan k\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}} \]
              9. Recombined 2 regimes into one program.
              10. Final simplification89.6%

                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3 \cdot 10^{+110}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t \cdot \left(\left(t \cdot t\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \frac{\sin k \cdot {t}^{1.5}}{\ell}\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}\\ \end{array} \]
              11. Add Preprocessing

              Alternative 4: 89.4% accurate, 1.2× speedup?

              \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 10^{-188}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \frac{k \cdot \left(k \cdot \left(t\_m \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\ \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\ell \cdot \frac{\frac{2}{t\_m \cdot \mathsf{fma}\left(k, \tan k \cdot \frac{k}{\ell}, 2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \frac{\tan k}{\ell}\right)\right)}}{\sin k}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\ \end{array} \end{array} \]
              t\_m = (fabs.f64 t)
              t\_s = (copysign.f64 #s(literal 1 binary64) t)
              (FPCore (t_s t_m l k)
               :precision binary64
               (*
                t_s
                (if (<= t_m 1e-188)
                  (/ 2.0 (* (/ (sin k) l) (/ (* k (* k (* t_m (sin k)))) (* l (cos k)))))
                  (if (<= t_m 1.25e+154)
                    (*
                     l
                     (/
                      (/
                       2.0
                       (*
                        t_m
                        (fma k (* (tan k) (/ k l)) (* 2.0 (* (* t_m t_m) (/ (tan k) l))))))
                      (sin k)))
                    (* l (/ (/ l (* k (* t_m (* t_m k)))) t_m))))))
              t\_m = fabs(t);
              t\_s = copysign(1.0, t);
              double code(double t_s, double t_m, double l, double k) {
              	double tmp;
              	if (t_m <= 1e-188) {
              		tmp = 2.0 / ((sin(k) / l) * ((k * (k * (t_m * sin(k)))) / (l * cos(k))));
              	} else if (t_m <= 1.25e+154) {
              		tmp = l * ((2.0 / (t_m * fma(k, (tan(k) * (k / l)), (2.0 * ((t_m * t_m) * (tan(k) / l)))))) / sin(k));
              	} else {
              		tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
              	}
              	return t_s * tmp;
              }
              
              t\_m = abs(t)
              t\_s = copysign(1.0, t)
              function code(t_s, t_m, l, k)
              	tmp = 0.0
              	if (t_m <= 1e-188)
              		tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(Float64(k * Float64(k * Float64(t_m * sin(k)))) / Float64(l * cos(k)))));
              	elseif (t_m <= 1.25e+154)
              		tmp = Float64(l * Float64(Float64(2.0 / Float64(t_m * fma(k, Float64(tan(k) * Float64(k / l)), Float64(2.0 * Float64(Float64(t_m * t_m) * Float64(tan(k) / l)))))) / sin(k)));
              	else
              		tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m));
              	end
              	return Float64(t_s * tmp)
              end
              
              t\_m = N[Abs[t], $MachinePrecision]
              t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1e-188], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * N[(k * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(l * N[(N[(2.0 / N[(t$95$m * N[(k * N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
              
              \begin{array}{l}
              t\_m = \left|t\right|
              \\
              t\_s = \mathsf{copysign}\left(1, t\right)
              
              \\
              t\_s \cdot \begin{array}{l}
              \mathbf{if}\;t\_m \leq 10^{-188}:\\
              \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \frac{k \cdot \left(k \cdot \left(t\_m \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\
              
              \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
              \;\;\;\;\ell \cdot \frac{\frac{2}{t\_m \cdot \mathsf{fma}\left(k, \tan k \cdot \frac{k}{\ell}, 2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \frac{\tan k}{\ell}\right)\right)}}{\sin k}\\
              
              \mathbf{else}:\\
              \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if t < 9.9999999999999995e-189

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

                    \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                  4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\frac{k \cdot \left(k \cdot \left(t \cdot \sin k\right)\right)}{\color{blue}{\ell \cdot \cos k}} \cdot \frac{\sin k}{\ell}} \]
                  9. lower-cos.f6473.0

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

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

                if 9.9999999999999995e-189 < t < 1.25000000000000001e154

                1. Initial program 59.6%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                  4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                6. Step-by-step derivation
                  1. lower-*.f64N/A

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                  8. lower-/.f64N/A

                    \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                  9. lower-sin.f64N/A

                    \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                  10. lower-*.f64N/A

                    \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                  11. lower-cos.f64N/A

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

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

                    \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                7. Applied rewrites95.0%

                  \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \frac{2 \cdot \left(t \cdot \left(t \cdot \sin k\right)\right)}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                8. Applied rewrites94.2%

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

                if 1.25000000000000001e154 < t

                1. Initial program 59.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 k around 0

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

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

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

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

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                  6. cube-multN/A

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

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

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

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

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

                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  12. lower-*.f6456.0

                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                5. Applied rewrites56.0%

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

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

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

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

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

                    Alternative 5: 90.9% accurate, 1.2× speedup?

                    \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2 \cdot 10^{+121}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t\_m \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\ \end{array} \end{array} \]
                    t\_m = (fabs.f64 t)
                    t\_s = (copysign.f64 #s(literal 1 binary64) t)
                    (FPCore (t_s t_m l k)
                     :precision binary64
                     (*
                      t_s
                      (if (<= t_m 2e+121)
                        (/
                         2.0
                         (*
                          (fma
                           (/ 2.0 l)
                           (* t_m (* (* t_m t_m) (tan k)))
                           (* (* (tan k) (/ k l)) (* t_m k)))
                          (/ (sin k) l)))
                        (* l (/ (/ l (* k (* t_m (* t_m k)))) t_m)))))
                    t\_m = fabs(t);
                    t\_s = copysign(1.0, t);
                    double code(double t_s, double t_m, double l, double k) {
                    	double tmp;
                    	if (t_m <= 2e+121) {
                    		tmp = 2.0 / (fma((2.0 / l), (t_m * ((t_m * t_m) * tan(k))), ((tan(k) * (k / l)) * (t_m * k))) * (sin(k) / l));
                    	} else {
                    		tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
                    	}
                    	return t_s * tmp;
                    }
                    
                    t\_m = abs(t)
                    t\_s = copysign(1.0, t)
                    function code(t_s, t_m, l, k)
                    	tmp = 0.0
                    	if (t_m <= 2e+121)
                    		tmp = Float64(2.0 / Float64(fma(Float64(2.0 / l), Float64(t_m * Float64(Float64(t_m * t_m) * tan(k))), Float64(Float64(tan(k) * Float64(k / l)) * Float64(t_m * k))) * Float64(sin(k) / l)));
                    	else
                    		tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m));
                    	end
                    	return Float64(t_s * tmp)
                    end
                    
                    t\_m = N[Abs[t], $MachinePrecision]
                    t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2e+121], N[(2.0 / N[(N[(N[(2.0 / l), $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                    
                    \begin{array}{l}
                    t\_m = \left|t\right|
                    \\
                    t\_s = \mathsf{copysign}\left(1, t\right)
                    
                    \\
                    t\_s \cdot \begin{array}{l}
                    \mathbf{if}\;t\_m \leq 2 \cdot 10^{+121}:\\
                    \;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{2}{\ell}, t\_m \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \tan k\right), \left(\tan k \cdot \frac{k}{\ell}\right) \cdot \left(t\_m \cdot k\right)\right) \cdot \frac{\sin k}{\ell}}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if t < 2.00000000000000007e121

                      1. Initial program 55.5%

                        \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                        4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                      6. Step-by-step derivation
                        1. lower-*.f64N/A

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

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

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

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

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

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

                          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                        8. lower-/.f64N/A

                          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                        9. lower-sin.f64N/A

                          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                        10. lower-*.f64N/A

                          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                        11. lower-cos.f64N/A

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

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

                          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                      7. Applied rewrites90.9%

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

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

                        if 2.00000000000000007e121 < t

                        1. Initial program 55.9%

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

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

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

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

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

                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                          5. lower-*.f64N/A

                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                          6. cube-multN/A

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

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

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

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

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

                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                          12. lower-*.f6452.7

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

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

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

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

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

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

                            Alternative 6: 89.4% accurate, 1.2× speedup?

                            \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.5 \cdot 10^{-188}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \frac{k \cdot \left(k \cdot \left(t\_m \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\ \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\ell \cdot \frac{2}{\sin k \cdot \left(t\_m \cdot \mathsf{fma}\left(k, \tan k \cdot \frac{k}{\ell}, 2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \frac{\tan k}{\ell}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\ \end{array} \end{array} \]
                            t\_m = (fabs.f64 t)
                            t\_s = (copysign.f64 #s(literal 1 binary64) t)
                            (FPCore (t_s t_m l k)
                             :precision binary64
                             (*
                              t_s
                              (if (<= t_m 3.5e-188)
                                (/ 2.0 (* (/ (sin k) l) (/ (* k (* k (* t_m (sin k)))) (* l (cos k)))))
                                (if (<= t_m 1.25e+154)
                                  (*
                                   l
                                   (/
                                    2.0
                                    (*
                                     (sin k)
                                     (*
                                      t_m
                                      (fma k (* (tan k) (/ k l)) (* 2.0 (* (* t_m t_m) (/ (tan k) l))))))))
                                  (* l (/ (/ l (* k (* t_m (* t_m k)))) t_m))))))
                            t\_m = fabs(t);
                            t\_s = copysign(1.0, t);
                            double code(double t_s, double t_m, double l, double k) {
                            	double tmp;
                            	if (t_m <= 3.5e-188) {
                            		tmp = 2.0 / ((sin(k) / l) * ((k * (k * (t_m * sin(k)))) / (l * cos(k))));
                            	} else if (t_m <= 1.25e+154) {
                            		tmp = l * (2.0 / (sin(k) * (t_m * fma(k, (tan(k) * (k / l)), (2.0 * ((t_m * t_m) * (tan(k) / l)))))));
                            	} else {
                            		tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
                            	}
                            	return t_s * tmp;
                            }
                            
                            t\_m = abs(t)
                            t\_s = copysign(1.0, t)
                            function code(t_s, t_m, l, k)
                            	tmp = 0.0
                            	if (t_m <= 3.5e-188)
                            		tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(Float64(k * Float64(k * Float64(t_m * sin(k)))) / Float64(l * cos(k)))));
                            	elseif (t_m <= 1.25e+154)
                            		tmp = Float64(l * Float64(2.0 / Float64(sin(k) * Float64(t_m * fma(k, Float64(tan(k) * Float64(k / l)), Float64(2.0 * Float64(Float64(t_m * t_m) * Float64(tan(k) / l))))))));
                            	else
                            		tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m));
                            	end
                            	return Float64(t_s * tmp)
                            end
                            
                            t\_m = N[Abs[t], $MachinePrecision]
                            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                            code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.5e-188], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * N[(k * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(l * N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(t$95$m * N[(k * N[(N[Tan[k], $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                            
                            \begin{array}{l}
                            t\_m = \left|t\right|
                            \\
                            t\_s = \mathsf{copysign}\left(1, t\right)
                            
                            \\
                            t\_s \cdot \begin{array}{l}
                            \mathbf{if}\;t\_m \leq 3.5 \cdot 10^{-188}:\\
                            \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \frac{k \cdot \left(k \cdot \left(t\_m \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\
                            
                            \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
                            \;\;\;\;\ell \cdot \frac{2}{\sin k \cdot \left(t\_m \cdot \mathsf{fma}\left(k, \tan k \cdot \frac{k}{\ell}, 2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \frac{\tan k}{\ell}\right)\right)\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if t < 3.5e-188

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

                                  \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{2}{\frac{k \cdot \left(k \cdot \left(t \cdot \sin k\right)\right)}{\color{blue}{\ell \cdot \cos k}} \cdot \frac{\sin k}{\ell}} \]
                                9. lower-cos.f6473.0

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

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

                              if 3.5e-188 < t < 1.25000000000000001e154

                              1. Initial program 59.6%

                                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                              2. Add Preprocessing
                              3. Step-by-step derivation
                                1. lift-*.f64N/A

                                  \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                              6. Step-by-step derivation
                                1. lower-*.f64N/A

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

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

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

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

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

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

                                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                8. lower-/.f64N/A

                                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                9. lower-sin.f64N/A

                                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                10. lower-*.f64N/A

                                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                11. lower-cos.f64N/A

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

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

                                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                              7. Applied rewrites95.0%

                                \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \frac{2 \cdot \left(t \cdot \left(t \cdot \sin k\right)\right)}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                              8. Applied rewrites94.1%

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

                              if 1.25000000000000001e154 < t

                              1. Initial program 59.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 k around 0

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

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

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

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

                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                5. lower-*.f64N/A

                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                6. cube-multN/A

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

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

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

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

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

                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                12. lower-*.f6456.0

                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                              5. Applied rewrites56.0%

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

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

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

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

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3.5 \cdot 10^{-188}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \frac{k \cdot \left(k \cdot \left(t \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\ell \cdot \frac{2}{\sin k \cdot \left(t \cdot \mathsf{fma}\left(k, \tan k \cdot \frac{k}{\ell}, 2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\tan k}{\ell}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t \cdot \left(t \cdot k\right)\right)}}{t}\\ \end{array} \]
                                  5. Add Preprocessing

                                  Alternative 7: 88.2% accurate, 1.3× speedup?

                                  \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{\sin k}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 8.2 \cdot 10^{-98}:\\ \;\;\;\;\frac{2}{t\_2 \cdot \frac{k \cdot \left(k \cdot \left(t\_m \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\ \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{2}{t\_2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \frac{t\_m}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\ \end{array} \end{array} \end{array} \]
                                  t\_m = (fabs.f64 t)
                                  t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                  (FPCore (t_s t_m l k)
                                   :precision binary64
                                   (let* ((t_2 (/ (sin k) l)))
                                     (*
                                      t_s
                                      (if (<= t_m 8.2e-98)
                                        (/ 2.0 (* t_2 (/ (* k (* k (* t_m (sin k)))) (* l (cos k)))))
                                        (if (<= t_m 1.25e+154)
                                          (/
                                           2.0
                                           (*
                                            t_2
                                            (*
                                             (* t_m t_m)
                                             (* (* (tan k) (fma k (/ k (* t_m t_m)) 2.0)) (/ t_m l)))))
                                          (* l (/ (/ l (* k (* t_m (* t_m k)))) t_m)))))))
                                  t\_m = fabs(t);
                                  t\_s = copysign(1.0, t);
                                  double code(double t_s, double t_m, double l, double k) {
                                  	double t_2 = sin(k) / l;
                                  	double tmp;
                                  	if (t_m <= 8.2e-98) {
                                  		tmp = 2.0 / (t_2 * ((k * (k * (t_m * sin(k)))) / (l * cos(k))));
                                  	} else if (t_m <= 1.25e+154) {
                                  		tmp = 2.0 / (t_2 * ((t_m * t_m) * ((tan(k) * fma(k, (k / (t_m * t_m)), 2.0)) * (t_m / l))));
                                  	} else {
                                  		tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
                                  	}
                                  	return t_s * tmp;
                                  }
                                  
                                  t\_m = abs(t)
                                  t\_s = copysign(1.0, t)
                                  function code(t_s, t_m, l, k)
                                  	t_2 = Float64(sin(k) / l)
                                  	tmp = 0.0
                                  	if (t_m <= 8.2e-98)
                                  		tmp = Float64(2.0 / Float64(t_2 * Float64(Float64(k * Float64(k * Float64(t_m * sin(k)))) / Float64(l * cos(k)))));
                                  	elseif (t_m <= 1.25e+154)
                                  		tmp = Float64(2.0 / Float64(t_2 * Float64(Float64(t_m * t_m) * Float64(Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)) * Float64(t_m / l)))));
                                  	else
                                  		tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m));
                                  	end
                                  	return Float64(t_s * tmp)
                                  end
                                  
                                  t\_m = N[Abs[t], $MachinePrecision]
                                  t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                  code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8.2e-98], N[(2.0 / N[(t$95$2 * N[(N[(k * N[(k * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(2.0 / N[(t$95$2 * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                                  
                                  \begin{array}{l}
                                  t\_m = \left|t\right|
                                  \\
                                  t\_s = \mathsf{copysign}\left(1, t\right)
                                  
                                  \\
                                  \begin{array}{l}
                                  t_2 := \frac{\sin k}{\ell}\\
                                  t\_s \cdot \begin{array}{l}
                                  \mathbf{if}\;t\_m \leq 8.2 \cdot 10^{-98}:\\
                                  \;\;\;\;\frac{2}{t\_2 \cdot \frac{k \cdot \left(k \cdot \left(t\_m \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\
                                  
                                  \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
                                  \;\;\;\;\frac{2}{t\_2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \frac{t\_m}{\ell}\right)\right)}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if t < 8.1999999999999996e-98

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

                                        \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{2}{\frac{k \cdot \left(k \cdot \left(t \cdot \sin k\right)\right)}{\color{blue}{\ell \cdot \cos k}} \cdot \frac{\sin k}{\ell}} \]
                                      9. lower-cos.f6475.7

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

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

                                    if 8.1999999999999996e-98 < t < 1.25000000000000001e154

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

                                        \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                      4. *-commutativeN/A

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{2}{\color{blue}{\left(\left(\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)\right) \cdot \left(\left(t \cdot t\right) \cdot \frac{t}{\ell}\right)\right) \cdot \frac{\sin k}{\ell}}} \]
                                    5. Step-by-step derivation
                                      1. lift-*.f64N/A

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

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

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

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

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

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

                                    if 1.25000000000000001e154 < t

                                    1. Initial program 59.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 k around 0

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

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

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

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

                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                      5. lower-*.f64N/A

                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                      6. cube-multN/A

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

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

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

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

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

                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                      12. lower-*.f6456.0

                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                    5. Applied rewrites56.0%

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

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

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

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

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 8.2 \cdot 10^{-98}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \frac{k \cdot \left(k \cdot \left(t \cdot \sin k\right)\right)}{\ell \cdot \cos k}}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(t \cdot t\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t \cdot t}, 2\right)\right) \cdot \frac{t}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t \cdot \left(t \cdot k\right)\right)}}{t}\\ \end{array} \]
                                        5. Add Preprocessing

                                        Alternative 8: 85.4% accurate, 1.3× speedup?

                                        \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{\sin k}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.6 \cdot 10^{-99}:\\ \;\;\;\;\frac{2}{t\_2 \cdot \left(t\_m \cdot \left(\left(k \cdot k\right) \cdot \frac{\sin k}{\ell \cdot \cos k}\right)\right)}\\ \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{2}{t\_2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \frac{t\_m}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\ \end{array} \end{array} \end{array} \]
                                        t\_m = (fabs.f64 t)
                                        t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                        (FPCore (t_s t_m l k)
                                         :precision binary64
                                         (let* ((t_2 (/ (sin k) l)))
                                           (*
                                            t_s
                                            (if (<= t_m 2.6e-99)
                                              (/ 2.0 (* t_2 (* t_m (* (* k k) (/ (sin k) (* l (cos k)))))))
                                              (if (<= t_m 1.25e+154)
                                                (/
                                                 2.0
                                                 (*
                                                  t_2
                                                  (*
                                                   (* t_m t_m)
                                                   (* (* (tan k) (fma k (/ k (* t_m t_m)) 2.0)) (/ t_m l)))))
                                                (* l (/ (/ l (* k (* t_m (* t_m k)))) t_m)))))))
                                        t\_m = fabs(t);
                                        t\_s = copysign(1.0, t);
                                        double code(double t_s, double t_m, double l, double k) {
                                        	double t_2 = sin(k) / l;
                                        	double tmp;
                                        	if (t_m <= 2.6e-99) {
                                        		tmp = 2.0 / (t_2 * (t_m * ((k * k) * (sin(k) / (l * cos(k))))));
                                        	} else if (t_m <= 1.25e+154) {
                                        		tmp = 2.0 / (t_2 * ((t_m * t_m) * ((tan(k) * fma(k, (k / (t_m * t_m)), 2.0)) * (t_m / l))));
                                        	} else {
                                        		tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
                                        	}
                                        	return t_s * tmp;
                                        }
                                        
                                        t\_m = abs(t)
                                        t\_s = copysign(1.0, t)
                                        function code(t_s, t_m, l, k)
                                        	t_2 = Float64(sin(k) / l)
                                        	tmp = 0.0
                                        	if (t_m <= 2.6e-99)
                                        		tmp = Float64(2.0 / Float64(t_2 * Float64(t_m * Float64(Float64(k * k) * Float64(sin(k) / Float64(l * cos(k)))))));
                                        	elseif (t_m <= 1.25e+154)
                                        		tmp = Float64(2.0 / Float64(t_2 * Float64(Float64(t_m * t_m) * Float64(Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)) * Float64(t_m / l)))));
                                        	else
                                        		tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m));
                                        	end
                                        	return Float64(t_s * tmp)
                                        end
                                        
                                        t\_m = N[Abs[t], $MachinePrecision]
                                        t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                        code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.6e-99], N[(2.0 / N[(t$95$2 * N[(t$95$m * N[(N[(k * k), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(2.0 / N[(t$95$2 * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                                        
                                        \begin{array}{l}
                                        t\_m = \left|t\right|
                                        \\
                                        t\_s = \mathsf{copysign}\left(1, t\right)
                                        
                                        \\
                                        \begin{array}{l}
                                        t_2 := \frac{\sin k}{\ell}\\
                                        t\_s \cdot \begin{array}{l}
                                        \mathbf{if}\;t\_m \leq 2.6 \cdot 10^{-99}:\\
                                        \;\;\;\;\frac{2}{t\_2 \cdot \left(t\_m \cdot \left(\left(k \cdot k\right) \cdot \frac{\sin k}{\ell \cdot \cos k}\right)\right)}\\
                                        
                                        \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
                                        \;\;\;\;\frac{2}{t\_2 \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \frac{t\_m}{\ell}\right)\right)}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if t < 2.60000000000000005e-99

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

                                              \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                            4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                                          6. Step-by-step derivation
                                            1. lower-*.f64N/A

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

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

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

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

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

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

                                              \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                            8. lower-/.f64N/A

                                              \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                            9. lower-sin.f64N/A

                                              \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                            10. lower-*.f64N/A

                                              \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                            11. lower-cos.f64N/A

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

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

                                              \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                          7. Applied rewrites89.3%

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

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

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

                                            if 2.60000000000000005e-99 < t < 1.25000000000000001e154

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

                                                \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                              4. *-commutativeN/A

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{2}{\color{blue}{\left(\left(\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)\right) \cdot \left(\left(t \cdot t\right) \cdot \frac{t}{\ell}\right)\right) \cdot \frac{\sin k}{\ell}}} \]
                                            5. Step-by-step derivation
                                              1. lift-*.f64N/A

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

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

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

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

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

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

                                            if 1.25000000000000001e154 < t

                                            1. Initial program 59.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 k around 0

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

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

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

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

                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                              5. lower-*.f64N/A

                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                              6. cube-multN/A

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

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

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

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

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

                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                              12. lower-*.f6456.0

                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                            5. Applied rewrites56.0%

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

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

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

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

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.6 \cdot 10^{-99}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t \cdot \left(\left(k \cdot k\right) \cdot \frac{\sin k}{\ell \cdot \cos k}\right)\right)}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(t \cdot t\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t \cdot t}, 2\right)\right) \cdot \frac{t}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t \cdot \left(t \cdot k\right)\right)}}{t}\\ \end{array} \]
                                                5. Add Preprocessing

                                                Alternative 9: 84.3% accurate, 1.3× speedup?

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

                                                  1. Initial program 48.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 \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                  4. Step-by-step derivation
                                                    1. lower-/.f64N/A

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

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

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

                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                    5. lower-*.f64N/A

                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                    6. cube-multN/A

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

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

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

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

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

                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                    12. lower-*.f6447.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if 2.5499999999999999e-99 < t < 1.25000000000000001e154

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

                                                        \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                                      4. *-commutativeN/A

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

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

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

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

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

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

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

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

                                                      \[\leadsto \frac{2}{\color{blue}{\left(\left(\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)\right) \cdot \left(\left(t \cdot t\right) \cdot \frac{t}{\ell}\right)\right) \cdot \frac{\sin k}{\ell}}} \]
                                                    5. Step-by-step derivation
                                                      1. lift-*.f64N/A

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

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

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

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

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

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

                                                    if 1.25000000000000001e154 < t

                                                    1. Initial program 59.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 k around 0

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

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

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

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

                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                      5. lower-*.f64N/A

                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                      6. cube-multN/A

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

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

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

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

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

                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                      12. lower-*.f6456.0

                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                    5. Applied rewrites56.0%

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

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

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

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

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.55 \cdot 10^{-99}:\\ \;\;\;\;\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(t \cdot t\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t \cdot t}, 2\right)\right) \cdot \frac{t}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t \cdot \left(t \cdot k\right)\right)}}{t}\\ \end{array} \]
                                                        5. Add Preprocessing

                                                        Alternative 10: 83.9% accurate, 1.6× speedup?

                                                        \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.8 \cdot 10^{-100}:\\ \;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot k\right)\right)}\\ \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \frac{t\_m}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\ \end{array} \end{array} \]
                                                        t\_m = (fabs.f64 t)
                                                        t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                        (FPCore (t_s t_m l k)
                                                         :precision binary64
                                                         (*
                                                          t_s
                                                          (if (<= t_m 4.8e-100)
                                                            (/
                                                             (* (cos k) (* 2.0 (* l l)))
                                                             (* k (* (- 0.5 (* 0.5 (cos (+ k k)))) (* t_m k))))
                                                            (if (<= t_m 1.25e+154)
                                                              (/
                                                               2.0
                                                               (*
                                                                (/ (sin k) l)
                                                                (*
                                                                 (* t_m t_m)
                                                                 (* (* (tan k) (fma k (/ k (* t_m t_m)) 2.0)) (/ t_m l)))))
                                                              (* l (/ (/ l (* k (* t_m (* t_m k)))) t_m))))))
                                                        t\_m = fabs(t);
                                                        t\_s = copysign(1.0, t);
                                                        double code(double t_s, double t_m, double l, double k) {
                                                        	double tmp;
                                                        	if (t_m <= 4.8e-100) {
                                                        		tmp = (cos(k) * (2.0 * (l * l))) / (k * ((0.5 - (0.5 * cos((k + k)))) * (t_m * k)));
                                                        	} else if (t_m <= 1.25e+154) {
                                                        		tmp = 2.0 / ((sin(k) / l) * ((t_m * t_m) * ((tan(k) * fma(k, (k / (t_m * t_m)), 2.0)) * (t_m / l))));
                                                        	} else {
                                                        		tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
                                                        	}
                                                        	return t_s * tmp;
                                                        }
                                                        
                                                        t\_m = abs(t)
                                                        t\_s = copysign(1.0, t)
                                                        function code(t_s, t_m, l, k)
                                                        	tmp = 0.0
                                                        	if (t_m <= 4.8e-100)
                                                        		tmp = Float64(Float64(cos(k) * Float64(2.0 * Float64(l * l))) / Float64(k * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * Float64(t_m * k))));
                                                        	elseif (t_m <= 1.25e+154)
                                                        		tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(Float64(t_m * t_m) * Float64(Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)) * Float64(t_m / l)))));
                                                        	else
                                                        		tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m));
                                                        	end
                                                        	return Float64(t_s * tmp)
                                                        end
                                                        
                                                        t\_m = N[Abs[t], $MachinePrecision]
                                                        t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                        code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.8e-100], N[(N[(N[Cos[k], $MachinePrecision] * N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+154], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                                                        
                                                        \begin{array}{l}
                                                        t\_m = \left|t\right|
                                                        \\
                                                        t\_s = \mathsf{copysign}\left(1, t\right)
                                                        
                                                        \\
                                                        t\_s \cdot \begin{array}{l}
                                                        \mathbf{if}\;t\_m \leq 4.8 \cdot 10^{-100}:\\
                                                        \;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot k\right)\right)}\\
                                                        
                                                        \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+154}:\\
                                                        \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(t\_m \cdot t\_m\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \frac{t\_m}{\ell}\right)\right)}\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if t < 4.8000000000000005e-100

                                                          1. Initial program 48.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 \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
                                                          4. Step-by-step derivation
                                                            1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{\left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot k\right)\right) \cdot \color{blue}{k}} \]

                                                            if 4.8000000000000005e-100 < t < 1.25000000000000001e154

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

                                                                \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                                              4. *-commutativeN/A

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

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

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

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

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

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

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

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

                                                              \[\leadsto \frac{2}{\color{blue}{\left(\left(\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)\right) \cdot \left(\left(t \cdot t\right) \cdot \frac{t}{\ell}\right)\right) \cdot \frac{\sin k}{\ell}}} \]
                                                            5. Step-by-step derivation
                                                              1. lift-*.f64N/A

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

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

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

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

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

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

                                                            if 1.25000000000000001e154 < t

                                                            1. Initial program 59.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 k around 0

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

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

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

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

                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                              5. lower-*.f64N/A

                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                              6. cube-multN/A

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

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

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

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

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

                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                              12. lower-*.f6456.0

                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                            5. Applied rewrites56.0%

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

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

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

                                                                    \[\leadsto \frac{\frac{\ell}{k \cdot \left(t \cdot \left(k \cdot t\right)\right)}}{t} \cdot \ell \]
                                                                3. Recombined 3 regimes into one program.
                                                                4. Final simplification75.1%

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.8 \cdot 10^{-100}:\\ \;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot k\right)\right)}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+154}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(\left(t \cdot t\right) \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t \cdot t}, 2\right)\right) \cdot \frac{t}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t \cdot \left(t \cdot k\right)\right)}}{t}\\ \end{array} \]
                                                                5. Add Preprocessing

                                                                Alternative 11: 75.1% accurate, 1.6× speedup?

                                                                \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := 0.5 - 0.5 \cdot \cos \left(k + k\right)\\ t_3 := \frac{t\_m \cdot t\_m}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.031:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_3, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_3\right)\right)\right)}\\ \mathbf{elif}\;k \leq 3.1 \cdot 10^{+153}:\\ \;\;\;\;\left(2 \cdot \ell\right) \cdot \left(\ell \cdot \frac{\cos k}{t\_2 \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \cos k\right)}{t\_2}}{t\_m \cdot k}}{k}\\ \end{array} \end{array} \end{array} \]
                                                                t\_m = (fabs.f64 t)
                                                                t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                (FPCore (t_s t_m l k)
                                                                 :precision binary64
                                                                 (let* ((t_2 (- 0.5 (* 0.5 (cos (+ k k))))) (t_3 (/ (* t_m t_m) l)))
                                                                   (*
                                                                    t_s
                                                                    (if (<= k 2.8e-221)
                                                                      (* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
                                                                      (if (<= k 0.031)
                                                                        (/
                                                                         2.0
                                                                         (*
                                                                          (/ (sin k) l)
                                                                          (*
                                                                           t_m
                                                                           (*
                                                                            k
                                                                            (fma
                                                                             k
                                                                             (* k (fma t_3 0.6666666666666666 (/ 1.0 l)))
                                                                             (* 2.0 t_3))))))
                                                                        (if (<= k 3.1e+153)
                                                                          (* (* 2.0 l) (* l (/ (cos k) (* t_2 (* t_m (* k k))))))
                                                                          (/ (/ (/ (* (* l l) (* 2.0 (cos k))) t_2) (* t_m k)) k)))))))
                                                                t\_m = fabs(t);
                                                                t\_s = copysign(1.0, t);
                                                                double code(double t_s, double t_m, double l, double k) {
                                                                	double t_2 = 0.5 - (0.5 * cos((k + k)));
                                                                	double t_3 = (t_m * t_m) / l;
                                                                	double tmp;
                                                                	if (k <= 2.8e-221) {
                                                                		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                	} else if (k <= 0.031) {
                                                                		tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_3, 0.6666666666666666, (1.0 / l))), (2.0 * t_3)))));
                                                                	} else if (k <= 3.1e+153) {
                                                                		tmp = (2.0 * l) * (l * (cos(k) / (t_2 * (t_m * (k * k)))));
                                                                	} else {
                                                                		tmp = ((((l * l) * (2.0 * cos(k))) / t_2) / (t_m * k)) / k;
                                                                	}
                                                                	return t_s * tmp;
                                                                }
                                                                
                                                                t\_m = abs(t)
                                                                t\_s = copysign(1.0, t)
                                                                function code(t_s, t_m, l, k)
                                                                	t_2 = Float64(0.5 - Float64(0.5 * cos(Float64(k + k))))
                                                                	t_3 = Float64(Float64(t_m * t_m) / l)
                                                                	tmp = 0.0
                                                                	if (k <= 2.8e-221)
                                                                		tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k))));
                                                                	elseif (k <= 0.031)
                                                                		tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_3, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_3))))));
                                                                	elseif (k <= 3.1e+153)
                                                                		tmp = Float64(Float64(2.0 * l) * Float64(l * Float64(cos(k) / Float64(t_2 * Float64(t_m * Float64(k * k))))));
                                                                	else
                                                                		tmp = Float64(Float64(Float64(Float64(Float64(l * l) * Float64(2.0 * cos(k))) / t_2) / Float64(t_m * k)) / k);
                                                                	end
                                                                	return Float64(t_s * tmp)
                                                                end
                                                                
                                                                t\_m = N[Abs[t], $MachinePrecision]
                                                                t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-221], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.031], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$3 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.1e+153], N[(N[(2.0 * l), $MachinePrecision] * N[(l * N[(N[Cos[k], $MachinePrecision] / N[(t$95$2 * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]]]]), $MachinePrecision]]]
                                                                
                                                                \begin{array}{l}
                                                                t\_m = \left|t\right|
                                                                \\
                                                                t\_s = \mathsf{copysign}\left(1, t\right)
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                t_2 := 0.5 - 0.5 \cdot \cos \left(k + k\right)\\
                                                                t_3 := \frac{t\_m \cdot t\_m}{\ell}\\
                                                                t\_s \cdot \begin{array}{l}
                                                                \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\
                                                                \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
                                                                
                                                                \mathbf{elif}\;k \leq 0.031:\\
                                                                \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_3, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_3\right)\right)\right)}\\
                                                                
                                                                \mathbf{elif}\;k \leq 3.1 \cdot 10^{+153}:\\
                                                                \;\;\;\;\left(2 \cdot \ell\right) \cdot \left(\ell \cdot \frac{\cos k}{t\_2 \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\right)\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\frac{\frac{\frac{\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \cos k\right)}{t\_2}}{t\_m \cdot k}}{k}\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 4 regimes
                                                                2. if k < 2.80000000000000019e-221

                                                                  1. Initial program 58.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 \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                  4. Step-by-step derivation
                                                                    1. lower-/.f64N/A

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

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

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

                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                    5. lower-*.f64N/A

                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                    6. cube-multN/A

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

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

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

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

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

                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                    12. lower-*.f6454.6

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

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

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

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

                                                                          \[\leadsto \frac{\ell}{\left(t \cdot \left(k \cdot t\right)\right) \cdot \left(k \cdot t\right)} \cdot \ell \]

                                                                        if 2.80000000000000019e-221 < k < 0.031

                                                                        1. Initial program 63.1%

                                                                          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                        2. Add Preprocessing
                                                                        3. Step-by-step derivation
                                                                          1. lift-*.f64N/A

                                                                            \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                                                          4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                                                                        6. Step-by-step derivation
                                                                          1. lower-*.f64N/A

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

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

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

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

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

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

                                                                            \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                          8. lower-/.f64N/A

                                                                            \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                          9. lower-sin.f64N/A

                                                                            \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                          10. lower-*.f64N/A

                                                                            \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                          11. lower-cos.f64N/A

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

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

                                                                            \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                        7. Applied rewrites96.9%

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

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

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

                                                                          if 0.031 < k < 3.1e153

                                                                          1. Initial program 46.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 \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
                                                                          4. Step-by-step derivation
                                                                            1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{{\sin k}^{2} \cdot \left(t \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                                                                            17. lower-*.f6478.4

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

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

                                                                              \[\leadsto \left(\ell \cdot 2\right) \cdot \color{blue}{\left(\ell \cdot \frac{\cos k}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot \left(k \cdot k\right)\right)}\right)} \]

                                                                            if 3.1e153 < k

                                                                            1. Initial program 40.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 \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
                                                                            4. Step-by-step derivation
                                                                              1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{{\sin k}^{2} \cdot \left(t \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                                                                              17. lower-*.f6454.5

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

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

                                                                                \[\leadsto \frac{\frac{\frac{\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \cos k\right)}{0.5 - 0.5 \cdot \cos \left(k + k\right)}}{t \cdot k}}{\color{blue}{k}} \]
                                                                            7. Recombined 4 regimes into one program.
                                                                            8. Final simplification80.6%

                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot k\right)\right) \cdot \left(t \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.031:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(\frac{t \cdot t}{\ell}, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot \frac{t \cdot t}{\ell}\right)\right)\right)}\\ \mathbf{elif}\;k \leq 3.1 \cdot 10^{+153}:\\ \;\;\;\;\left(2 \cdot \ell\right) \cdot \left(\ell \cdot \frac{\cos k}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot \left(k \cdot k\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \cos k\right)}{0.5 - 0.5 \cdot \cos \left(k + k\right)}}{t \cdot k}}{k}\\ \end{array} \]
                                                                            9. Add Preprocessing

                                                                            Alternative 12: 73.6% accurate, 1.7× speedup?

                                                                            \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{t\_m \cdot t\_m}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.031:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot k\right)\right)}\\ \end{array} \end{array} \end{array} \]
                                                                            t\_m = (fabs.f64 t)
                                                                            t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                            (FPCore (t_s t_m l k)
                                                                             :precision binary64
                                                                             (let* ((t_2 (/ (* t_m t_m) l)))
                                                                               (*
                                                                                t_s
                                                                                (if (<= k 2.8e-221)
                                                                                  (* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
                                                                                  (if (<= k 0.031)
                                                                                    (/
                                                                                     2.0
                                                                                     (*
                                                                                      (/ (sin k) l)
                                                                                      (*
                                                                                       t_m
                                                                                       (*
                                                                                        k
                                                                                        (fma
                                                                                         k
                                                                                         (* k (fma t_2 0.6666666666666666 (/ 1.0 l)))
                                                                                         (* 2.0 t_2))))))
                                                                                    (/
                                                                                     (* (cos k) (* 2.0 (* l l)))
                                                                                     (* k (* (- 0.5 (* 0.5 (cos (+ k k)))) (* t_m k)))))))))
                                                                            t\_m = fabs(t);
                                                                            t\_s = copysign(1.0, t);
                                                                            double code(double t_s, double t_m, double l, double k) {
                                                                            	double t_2 = (t_m * t_m) / l;
                                                                            	double tmp;
                                                                            	if (k <= 2.8e-221) {
                                                                            		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                            	} else if (k <= 0.031) {
                                                                            		tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_2, 0.6666666666666666, (1.0 / l))), (2.0 * t_2)))));
                                                                            	} else {
                                                                            		tmp = (cos(k) * (2.0 * (l * l))) / (k * ((0.5 - (0.5 * cos((k + k)))) * (t_m * k)));
                                                                            	}
                                                                            	return t_s * tmp;
                                                                            }
                                                                            
                                                                            t\_m = abs(t)
                                                                            t\_s = copysign(1.0, t)
                                                                            function code(t_s, t_m, l, k)
                                                                            	t_2 = Float64(Float64(t_m * t_m) / l)
                                                                            	tmp = 0.0
                                                                            	if (k <= 2.8e-221)
                                                                            		tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k))));
                                                                            	elseif (k <= 0.031)
                                                                            		tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_2, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_2))))));
                                                                            	else
                                                                            		tmp = Float64(Float64(cos(k) * Float64(2.0 * Float64(l * l))) / Float64(k * Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * Float64(t_m * k))));
                                                                            	end
                                                                            	return Float64(t_s * tmp)
                                                                            end
                                                                            
                                                                            t\_m = N[Abs[t], $MachinePrecision]
                                                                            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                            code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-221], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.031], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$2 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] * N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                                                                            
                                                                            \begin{array}{l}
                                                                            t\_m = \left|t\right|
                                                                            \\
                                                                            t\_s = \mathsf{copysign}\left(1, t\right)
                                                                            
                                                                            \\
                                                                            \begin{array}{l}
                                                                            t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
                                                                            t\_s \cdot \begin{array}{l}
                                                                            \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\
                                                                            \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
                                                                            
                                                                            \mathbf{elif}\;k \leq 0.031:\\
                                                                            \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot k\right)\right)}\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 3 regimes
                                                                            2. if k < 2.80000000000000019e-221

                                                                              1. Initial program 58.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 \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                              4. Step-by-step derivation
                                                                                1. lower-/.f64N/A

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

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

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

                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                5. lower-*.f64N/A

                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                6. cube-multN/A

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

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

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

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

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

                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                12. lower-*.f6454.6

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

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

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

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

                                                                                      \[\leadsto \frac{\ell}{\left(t \cdot \left(k \cdot t\right)\right) \cdot \left(k \cdot t\right)} \cdot \ell \]

                                                                                    if 2.80000000000000019e-221 < k < 0.031

                                                                                    1. Initial program 63.1%

                                                                                      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                    2. Add Preprocessing
                                                                                    3. Step-by-step derivation
                                                                                      1. lift-*.f64N/A

                                                                                        \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                                                                      4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                                                                                    6. Step-by-step derivation
                                                                                      1. lower-*.f64N/A

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

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

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

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

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

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

                                                                                        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                      8. lower-/.f64N/A

                                                                                        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                      9. lower-sin.f64N/A

                                                                                        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                      10. lower-*.f64N/A

                                                                                        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                      11. lower-cos.f64N/A

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

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

                                                                                        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                    7. Applied rewrites96.9%

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

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

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

                                                                                      if 0.031 < k

                                                                                      1. Initial program 43.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 \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
                                                                                      4. Step-by-step derivation
                                                                                        1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                          \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{{\sin k}^{2} \cdot \left(t \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                                                                                        17. lower-*.f6466.4

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

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

                                                                                          \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{\left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot k\right)\right) \cdot \color{blue}{k}} \]
                                                                                      7. Recombined 3 regimes into one program.
                                                                                      8. Final simplification79.0%

                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot k\right)\right) \cdot \left(t \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.031:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(\frac{t \cdot t}{\ell}, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot \frac{t \cdot t}{\ell}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot k\right)\right)}\\ \end{array} \]
                                                                                      9. Add Preprocessing

                                                                                      Alternative 13: 73.6% accurate, 1.7× speedup?

                                                                                      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{t\_m \cdot t\_m}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.031:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(k \cdot \left(t\_m \cdot \left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right)\right)\right)}\\ \end{array} \end{array} \end{array} \]
                                                                                      t\_m = (fabs.f64 t)
                                                                                      t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                      (FPCore (t_s t_m l k)
                                                                                       :precision binary64
                                                                                       (let* ((t_2 (/ (* t_m t_m) l)))
                                                                                         (*
                                                                                          t_s
                                                                                          (if (<= k 2.8e-221)
                                                                                            (* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
                                                                                            (if (<= k 0.031)
                                                                                              (/
                                                                                               2.0
                                                                                               (*
                                                                                                (/ (sin k) l)
                                                                                                (*
                                                                                                 t_m
                                                                                                 (*
                                                                                                  k
                                                                                                  (fma
                                                                                                   k
                                                                                                   (* k (fma t_2 0.6666666666666666 (/ 1.0 l)))
                                                                                                   (* 2.0 t_2))))))
                                                                                              (/
                                                                                               (* (cos k) (* 2.0 (* l l)))
                                                                                               (* k (* k (* t_m (- 0.5 (* 0.5 (cos (+ k k)))))))))))))
                                                                                      t\_m = fabs(t);
                                                                                      t\_s = copysign(1.0, t);
                                                                                      double code(double t_s, double t_m, double l, double k) {
                                                                                      	double t_2 = (t_m * t_m) / l;
                                                                                      	double tmp;
                                                                                      	if (k <= 2.8e-221) {
                                                                                      		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                      	} else if (k <= 0.031) {
                                                                                      		tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_2, 0.6666666666666666, (1.0 / l))), (2.0 * t_2)))));
                                                                                      	} else {
                                                                                      		tmp = (cos(k) * (2.0 * (l * l))) / (k * (k * (t_m * (0.5 - (0.5 * cos((k + k)))))));
                                                                                      	}
                                                                                      	return t_s * tmp;
                                                                                      }
                                                                                      
                                                                                      t\_m = abs(t)
                                                                                      t\_s = copysign(1.0, t)
                                                                                      function code(t_s, t_m, l, k)
                                                                                      	t_2 = Float64(Float64(t_m * t_m) / l)
                                                                                      	tmp = 0.0
                                                                                      	if (k <= 2.8e-221)
                                                                                      		tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k))));
                                                                                      	elseif (k <= 0.031)
                                                                                      		tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_2, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_2))))));
                                                                                      	else
                                                                                      		tmp = Float64(Float64(cos(k) * Float64(2.0 * Float64(l * l))) / Float64(k * Float64(k * Float64(t_m * Float64(0.5 - Float64(0.5 * cos(Float64(k + k))))))));
                                                                                      	end
                                                                                      	return Float64(t_s * tmp)
                                                                                      end
                                                                                      
                                                                                      t\_m = N[Abs[t], $MachinePrecision]
                                                                                      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                      code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-221], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.031], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$2 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] * N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * N[(t$95$m * N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      t\_m = \left|t\right|
                                                                                      \\
                                                                                      t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                      
                                                                                      \\
                                                                                      \begin{array}{l}
                                                                                      t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
                                                                                      t\_s \cdot \begin{array}{l}
                                                                                      \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\
                                                                                      \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
                                                                                      
                                                                                      \mathbf{elif}\;k \leq 0.031:\\
                                                                                      \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(k \cdot \left(t\_m \cdot \left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right)\right)\right)}\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 3 regimes
                                                                                      2. if k < 2.80000000000000019e-221

                                                                                        1. Initial program 58.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 \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. lower-/.f64N/A

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

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

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

                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                          5. lower-*.f64N/A

                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                          6. cube-multN/A

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

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

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

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

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

                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                          12. lower-*.f6454.6

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

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

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

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

                                                                                                \[\leadsto \frac{\ell}{\left(t \cdot \left(k \cdot t\right)\right) \cdot \left(k \cdot t\right)} \cdot \ell \]

                                                                                              if 2.80000000000000019e-221 < k < 0.031

                                                                                              1. Initial program 63.1%

                                                                                                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                              2. Add Preprocessing
                                                                                              3. Step-by-step derivation
                                                                                                1. lift-*.f64N/A

                                                                                                  \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                                                                                4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                                                                                \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                                                                                              6. Step-by-step derivation
                                                                                                1. lower-*.f64N/A

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

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

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

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

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

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

                                                                                                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                8. lower-/.f64N/A

                                                                                                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                9. lower-sin.f64N/A

                                                                                                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                10. lower-*.f64N/A

                                                                                                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                11. lower-cos.f64N/A

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

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

                                                                                                  \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                              7. Applied rewrites96.9%

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

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

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

                                                                                                if 0.031 < k

                                                                                                1. Initial program 43.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 \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                    \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{{\sin k}^{2} \cdot \left(t \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                                                                                                  17. lower-*.f6466.4

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

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

                                                                                                    \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{\left(\left(t \cdot \left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right)\right) \cdot k\right) \cdot \color{blue}{k}} \]
                                                                                                7. Recombined 3 regimes into one program.
                                                                                                8. Final simplification79.0%

                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot k\right)\right) \cdot \left(t \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.031:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(\frac{t \cdot t}{\ell}, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot \frac{t \cdot t}{\ell}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k \cdot \left(2 \cdot \left(\ell \cdot \ell\right)\right)}{k \cdot \left(k \cdot \left(t \cdot \left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right)\right)\right)}\\ \end{array} \]
                                                                                                9. Add Preprocessing

                                                                                                Alternative 14: 73.3% accurate, 1.7× speedup?

                                                                                                \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{t\_m \cdot t\_m}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.031:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \ell\right) \cdot \left(\ell \cdot \frac{\cos k}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\right)\\ \end{array} \end{array} \end{array} \]
                                                                                                t\_m = (fabs.f64 t)
                                                                                                t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                (FPCore (t_s t_m l k)
                                                                                                 :precision binary64
                                                                                                 (let* ((t_2 (/ (* t_m t_m) l)))
                                                                                                   (*
                                                                                                    t_s
                                                                                                    (if (<= k 2.8e-221)
                                                                                                      (* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
                                                                                                      (if (<= k 0.031)
                                                                                                        (/
                                                                                                         2.0
                                                                                                         (*
                                                                                                          (/ (sin k) l)
                                                                                                          (*
                                                                                                           t_m
                                                                                                           (*
                                                                                                            k
                                                                                                            (fma
                                                                                                             k
                                                                                                             (* k (fma t_2 0.6666666666666666 (/ 1.0 l)))
                                                                                                             (* 2.0 t_2))))))
                                                                                                        (*
                                                                                                         (* 2.0 l)
                                                                                                         (*
                                                                                                          l
                                                                                                          (/ (cos k) (* (- 0.5 (* 0.5 (cos (+ k k)))) (* t_m (* k k)))))))))))
                                                                                                t\_m = fabs(t);
                                                                                                t\_s = copysign(1.0, t);
                                                                                                double code(double t_s, double t_m, double l, double k) {
                                                                                                	double t_2 = (t_m * t_m) / l;
                                                                                                	double tmp;
                                                                                                	if (k <= 2.8e-221) {
                                                                                                		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                	} else if (k <= 0.031) {
                                                                                                		tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_2, 0.6666666666666666, (1.0 / l))), (2.0 * t_2)))));
                                                                                                	} else {
                                                                                                		tmp = (2.0 * l) * (l * (cos(k) / ((0.5 - (0.5 * cos((k + k)))) * (t_m * (k * k)))));
                                                                                                	}
                                                                                                	return t_s * tmp;
                                                                                                }
                                                                                                
                                                                                                t\_m = abs(t)
                                                                                                t\_s = copysign(1.0, t)
                                                                                                function code(t_s, t_m, l, k)
                                                                                                	t_2 = Float64(Float64(t_m * t_m) / l)
                                                                                                	tmp = 0.0
                                                                                                	if (k <= 2.8e-221)
                                                                                                		tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k))));
                                                                                                	elseif (k <= 0.031)
                                                                                                		tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_2, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_2))))));
                                                                                                	else
                                                                                                		tmp = Float64(Float64(2.0 * l) * Float64(l * Float64(cos(k) / Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * Float64(t_m * Float64(k * k))))));
                                                                                                	end
                                                                                                	return Float64(t_s * tmp)
                                                                                                end
                                                                                                
                                                                                                t\_m = N[Abs[t], $MachinePrecision]
                                                                                                t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-221], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.031], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$2 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * l), $MachinePrecision] * N[(l * N[(N[Cos[k], $MachinePrecision] / N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                                                                                                
                                                                                                \begin{array}{l}
                                                                                                t\_m = \left|t\right|
                                                                                                \\
                                                                                                t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                
                                                                                                \\
                                                                                                \begin{array}{l}
                                                                                                t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
                                                                                                t\_s \cdot \begin{array}{l}
                                                                                                \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\
                                                                                                \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
                                                                                                
                                                                                                \mathbf{elif}\;k \leq 0.031:\\
                                                                                                \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\
                                                                                                
                                                                                                \mathbf{else}:\\
                                                                                                \;\;\;\;\left(2 \cdot \ell\right) \cdot \left(\ell \cdot \frac{\cos k}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\right)\\
                                                                                                
                                                                                                
                                                                                                \end{array}
                                                                                                \end{array}
                                                                                                \end{array}
                                                                                                
                                                                                                Derivation
                                                                                                1. Split input into 3 regimes
                                                                                                2. if k < 2.80000000000000019e-221

                                                                                                  1. Initial program 58.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 \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. lower-/.f64N/A

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

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

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

                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                    5. lower-*.f64N/A

                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                    6. cube-multN/A

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

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

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

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

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

                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                    12. lower-*.f6454.6

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

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

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

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

                                                                                                          \[\leadsto \frac{\ell}{\left(t \cdot \left(k \cdot t\right)\right) \cdot \left(k \cdot t\right)} \cdot \ell \]

                                                                                                        if 2.80000000000000019e-221 < k < 0.031

                                                                                                        1. Initial program 63.1%

                                                                                                          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                        2. Add Preprocessing
                                                                                                        3. Step-by-step derivation
                                                                                                          1. lift-*.f64N/A

                                                                                                            \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                                                                                          4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                                                                                          \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                                                                                                        6. Step-by-step derivation
                                                                                                          1. lower-*.f64N/A

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

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

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

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

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

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

                                                                                                            \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                          8. lower-/.f64N/A

                                                                                                            \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                          9. lower-sin.f64N/A

                                                                                                            \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                          10. lower-*.f64N/A

                                                                                                            \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                          11. lower-cos.f64N/A

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

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

                                                                                                            \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                        7. Applied rewrites96.9%

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

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

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

                                                                                                          if 0.031 < k

                                                                                                          1. Initial program 43.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 \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                              \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{{\sin k}^{2} \cdot \left(t \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                                                                                                            17. lower-*.f6466.4

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

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

                                                                                                              \[\leadsto \left(\ell \cdot 2\right) \cdot \color{blue}{\left(\ell \cdot \frac{\cos k}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot \left(k \cdot k\right)\right)}\right)} \]
                                                                                                          7. Recombined 3 regimes into one program.
                                                                                                          8. Final simplification76.5%

                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot k\right)\right) \cdot \left(t \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.031:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(\frac{t \cdot t}{\ell}, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot \frac{t \cdot t}{\ell}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \ell\right) \cdot \left(\ell \cdot \frac{\cos k}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot \left(k \cdot k\right)\right)}\right)\\ \end{array} \]
                                                                                                          9. Add Preprocessing

                                                                                                          Alternative 15: 71.9% accurate, 1.7× speedup?

                                                                                                          \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{t\_m \cdot t\_m}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.031:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\cos k \cdot \frac{2 \cdot \left(\ell \cdot \ell\right)}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\ \end{array} \end{array} \end{array} \]
                                                                                                          t\_m = (fabs.f64 t)
                                                                                                          t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                          (FPCore (t_s t_m l k)
                                                                                                           :precision binary64
                                                                                                           (let* ((t_2 (/ (* t_m t_m) l)))
                                                                                                             (*
                                                                                                              t_s
                                                                                                              (if (<= k 2.8e-221)
                                                                                                                (* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
                                                                                                                (if (<= k 0.031)
                                                                                                                  (/
                                                                                                                   2.0
                                                                                                                   (*
                                                                                                                    (/ (sin k) l)
                                                                                                                    (*
                                                                                                                     t_m
                                                                                                                     (*
                                                                                                                      k
                                                                                                                      (fma
                                                                                                                       k
                                                                                                                       (* k (fma t_2 0.6666666666666666 (/ 1.0 l)))
                                                                                                                       (* 2.0 t_2))))))
                                                                                                                  (*
                                                                                                                   (cos k)
                                                                                                                   (/
                                                                                                                    (* 2.0 (* l l))
                                                                                                                    (* (- 0.5 (* 0.5 (cos (+ k k)))) (* t_m (* k k))))))))))
                                                                                                          t\_m = fabs(t);
                                                                                                          t\_s = copysign(1.0, t);
                                                                                                          double code(double t_s, double t_m, double l, double k) {
                                                                                                          	double t_2 = (t_m * t_m) / l;
                                                                                                          	double tmp;
                                                                                                          	if (k <= 2.8e-221) {
                                                                                                          		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                          	} else if (k <= 0.031) {
                                                                                                          		tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_2, 0.6666666666666666, (1.0 / l))), (2.0 * t_2)))));
                                                                                                          	} else {
                                                                                                          		tmp = cos(k) * ((2.0 * (l * l)) / ((0.5 - (0.5 * cos((k + k)))) * (t_m * (k * k))));
                                                                                                          	}
                                                                                                          	return t_s * tmp;
                                                                                                          }
                                                                                                          
                                                                                                          t\_m = abs(t)
                                                                                                          t\_s = copysign(1.0, t)
                                                                                                          function code(t_s, t_m, l, k)
                                                                                                          	t_2 = Float64(Float64(t_m * t_m) / l)
                                                                                                          	tmp = 0.0
                                                                                                          	if (k <= 2.8e-221)
                                                                                                          		tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k))));
                                                                                                          	elseif (k <= 0.031)
                                                                                                          		tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_2, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_2))))));
                                                                                                          	else
                                                                                                          		tmp = Float64(cos(k) * Float64(Float64(2.0 * Float64(l * l)) / Float64(Float64(0.5 - Float64(0.5 * cos(Float64(k + k)))) * Float64(t_m * Float64(k * k)))));
                                                                                                          	end
                                                                                                          	return Float64(t_s * tmp)
                                                                                                          end
                                                                                                          
                                                                                                          t\_m = N[Abs[t], $MachinePrecision]
                                                                                                          t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                          code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.8e-221], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.031], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$2 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[k], $MachinePrecision] * N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(N[(0.5 - N[(0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                                                                                                          
                                                                                                          \begin{array}{l}
                                                                                                          t\_m = \left|t\right|
                                                                                                          \\
                                                                                                          t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                          
                                                                                                          \\
                                                                                                          \begin{array}{l}
                                                                                                          t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
                                                                                                          t\_s \cdot \begin{array}{l}
                                                                                                          \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\
                                                                                                          \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
                                                                                                          
                                                                                                          \mathbf{elif}\;k \leq 0.031:\\
                                                                                                          \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\
                                                                                                          
                                                                                                          \mathbf{else}:\\
                                                                                                          \;\;\;\;\cos k \cdot \frac{2 \cdot \left(\ell \cdot \ell\right)}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
                                                                                                          
                                                                                                          
                                                                                                          \end{array}
                                                                                                          \end{array}
                                                                                                          \end{array}
                                                                                                          
                                                                                                          Derivation
                                                                                                          1. Split input into 3 regimes
                                                                                                          2. if k < 2.80000000000000019e-221

                                                                                                            1. Initial program 58.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 \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. lower-/.f64N/A

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

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

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

                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                              5. lower-*.f64N/A

                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                              6. cube-multN/A

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

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

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

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

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

                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                              12. lower-*.f6454.6

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

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

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

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

                                                                                                                    \[\leadsto \frac{\ell}{\left(t \cdot \left(k \cdot t\right)\right) \cdot \left(k \cdot t\right)} \cdot \ell \]

                                                                                                                  if 2.80000000000000019e-221 < k < 0.031

                                                                                                                  1. Initial program 63.1%

                                                                                                                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                  2. Add Preprocessing
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. lift-*.f64N/A

                                                                                                                      \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                                                                                                    4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                                                                                                    \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                                                                                                                  6. Step-by-step derivation
                                                                                                                    1. lower-*.f64N/A

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

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

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

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

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

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

                                                                                                                      \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                                    8. lower-/.f64N/A

                                                                                                                      \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                                    9. lower-sin.f64N/A

                                                                                                                      \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                                    10. lower-*.f64N/A

                                                                                                                      \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                                    11. lower-cos.f64N/A

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

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

                                                                                                                      \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                                  7. Applied rewrites96.9%

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

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

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

                                                                                                                    if 0.031 < k

                                                                                                                    1. Initial program 43.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 \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
                                                                                                                    4. Step-by-step derivation
                                                                                                                      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                        \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{{\sin k}^{2} \cdot \left(t \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                                                                                                                      17. lower-*.f6466.4

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

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

                                                                                                                        \[\leadsto \cos k \cdot \color{blue}{\frac{2 \cdot \left(\ell \cdot \ell\right)}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot \left(k \cdot k\right)\right)}} \]
                                                                                                                    7. Recombined 3 regimes into one program.
                                                                                                                    8. Final simplification76.0%

                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-221}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot k\right)\right) \cdot \left(t \cdot k\right)}\\ \mathbf{elif}\;k \leq 0.031:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(\frac{t \cdot t}{\ell}, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot \frac{t \cdot t}{\ell}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\cos k \cdot \frac{2 \cdot \left(\ell \cdot \ell\right)}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot \left(k \cdot k\right)\right)}\\ \end{array} \]
                                                                                                                    9. Add Preprocessing

                                                                                                                    Alternative 16: 75.7% accurate, 2.2× speedup?

                                                                                                                    \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{t\_m \cdot t\_m}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2 \cdot 10^{+121}:\\ \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\ \end{array} \end{array} \end{array} \]
                                                                                                                    t\_m = (fabs.f64 t)
                                                                                                                    t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                    (FPCore (t_s t_m l k)
                                                                                                                     :precision binary64
                                                                                                                     (let* ((t_2 (/ (* t_m t_m) l)))
                                                                                                                       (*
                                                                                                                        t_s
                                                                                                                        (if (<= t_m 2e+121)
                                                                                                                          (/
                                                                                                                           2.0
                                                                                                                           (*
                                                                                                                            (/ (sin k) l)
                                                                                                                            (*
                                                                                                                             t_m
                                                                                                                             (*
                                                                                                                              k
                                                                                                                              (fma k (* k (fma t_2 0.6666666666666666 (/ 1.0 l))) (* 2.0 t_2))))))
                                                                                                                          (* l (/ (/ l (* k (* t_m (* t_m k)))) t_m))))))
                                                                                                                    t\_m = fabs(t);
                                                                                                                    t\_s = copysign(1.0, t);
                                                                                                                    double code(double t_s, double t_m, double l, double k) {
                                                                                                                    	double t_2 = (t_m * t_m) / l;
                                                                                                                    	double tmp;
                                                                                                                    	if (t_m <= 2e+121) {
                                                                                                                    		tmp = 2.0 / ((sin(k) / l) * (t_m * (k * fma(k, (k * fma(t_2, 0.6666666666666666, (1.0 / l))), (2.0 * t_2)))));
                                                                                                                    	} else {
                                                                                                                    		tmp = l * ((l / (k * (t_m * (t_m * k)))) / t_m);
                                                                                                                    	}
                                                                                                                    	return t_s * tmp;
                                                                                                                    }
                                                                                                                    
                                                                                                                    t\_m = abs(t)
                                                                                                                    t\_s = copysign(1.0, t)
                                                                                                                    function code(t_s, t_m, l, k)
                                                                                                                    	t_2 = Float64(Float64(t_m * t_m) / l)
                                                                                                                    	tmp = 0.0
                                                                                                                    	if (t_m <= 2e+121)
                                                                                                                    		tmp = Float64(2.0 / Float64(Float64(sin(k) / l) * Float64(t_m * Float64(k * fma(k, Float64(k * fma(t_2, 0.6666666666666666, Float64(1.0 / l))), Float64(2.0 * t_2))))));
                                                                                                                    	else
                                                                                                                    		tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m));
                                                                                                                    	end
                                                                                                                    	return Float64(t_s * tmp)
                                                                                                                    end
                                                                                                                    
                                                                                                                    t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                    t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                    code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2e+121], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m * N[(k * N[(k * N[(k * N[(t$95$2 * 0.6666666666666666 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    t\_m = \left|t\right|
                                                                                                                    \\
                                                                                                                    t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                    
                                                                                                                    \\
                                                                                                                    \begin{array}{l}
                                                                                                                    t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
                                                                                                                    t\_s \cdot \begin{array}{l}
                                                                                                                    \mathbf{if}\;t\_m \leq 2 \cdot 10^{+121}:\\
                                                                                                                    \;\;\;\;\frac{2}{\frac{\sin k}{\ell} \cdot \left(t\_m \cdot \left(k \cdot \mathsf{fma}\left(k, k \cdot \mathsf{fma}\left(t\_2, 0.6666666666666666, \frac{1}{\ell}\right), 2 \cdot t\_2\right)\right)\right)}\\
                                                                                                                    
                                                                                                                    \mathbf{else}:\\
                                                                                                                    \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
                                                                                                                    
                                                                                                                    
                                                                                                                    \end{array}
                                                                                                                    \end{array}
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Split input into 2 regimes
                                                                                                                    2. if t < 2.00000000000000007e121

                                                                                                                      1. Initial program 55.5%

                                                                                                                        \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                      2. Add Preprocessing
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. lift-*.f64N/A

                                                                                                                          \[\leadsto \frac{2}{\color{blue}{\left(\left(\frac{{t}^{3}}{\ell \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}{\color{blue}{\left(\left(\frac{{t}^{3}}{\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}{\color{blue}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}} \]
                                                                                                                        4. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                                                                                                        \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k} + \frac{{k}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right)} \cdot \frac{\sin k}{\ell}} \]
                                                                                                                      6. Step-by-step derivation
                                                                                                                        1. lower-*.f64N/A

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

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

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

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

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

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

                                                                                                                          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, \color{blue}{k \cdot \frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                                        8. lower-/.f64N/A

                                                                                                                          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \color{blue}{\frac{\sin k}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                                        9. lower-sin.f64N/A

                                                                                                                          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\color{blue}{\sin k}}{\ell \cdot \cos k}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                                        10. lower-*.f64N/A

                                                                                                                          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\color{blue}{\ell \cdot \cos k}}, 2 \cdot \frac{{t}^{2} \cdot \sin k}{\ell \cdot \cos k}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                                        11. lower-cos.f64N/A

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

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

                                                                                                                          \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(k, k \cdot \frac{\sin k}{\ell \cdot \cos k}, \color{blue}{\frac{2 \cdot \left({t}^{2} \cdot \sin k\right)}{\ell \cdot \cos k}}\right)\right) \cdot \frac{\sin k}{\ell}} \]
                                                                                                                      7. Applied rewrites90.9%

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

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

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

                                                                                                                        if 2.00000000000000007e121 < t

                                                                                                                        1. Initial program 55.9%

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

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

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

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

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

                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                          5. lower-*.f64N/A

                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                          6. cube-multN/A

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

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

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

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

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

                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                          12. lower-*.f6452.7

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

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

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

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

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

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

                                                                                                                            Alternative 17: 70.8% accurate, 2.2× speedup?

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

                                                                                                                              1. Initial program 51.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 k around 0

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

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

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

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

                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                5. lower-*.f64N/A

                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                6. cube-multN/A

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

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

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

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

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

                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                12. lower-*.f6450.0

                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                              5. Applied rewrites50.0%

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

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

                                                                                                                                if 1.59999999999999993e-161 < t < 4.49999999999999988e-48

                                                                                                                                1. Initial program 39.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}{\left(\color{blue}{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                4. Step-by-step derivation
                                                                                                                                  1. *-commutativeN/A

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

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

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

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

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

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

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

                                                                                                                                    \[\leadsto \frac{2}{\left(\left(\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \frac{k}{{\ell}^{2}}\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(\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                  10. unpow2N/A

                                                                                                                                    \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                  11. lower-*.f6439.2

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

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

                                                                                                                                  \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\color{blue}{\frac{{k}^{2}}{{t}^{2}}} + 1\right)} \]
                                                                                                                                7. Step-by-step derivation
                                                                                                                                  1. lower-/.f64N/A

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

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

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

                                                                                                                                    \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\frac{k \cdot k}{\color{blue}{t \cdot t}} + 1\right)} \]
                                                                                                                                  5. lower-*.f6439.2

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

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

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

                                                                                                                                  if 4.49999999999999988e-48 < t

                                                                                                                                  1. Initial program 67.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 \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                  4. Step-by-step derivation
                                                                                                                                    1. lower-/.f64N/A

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

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

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

                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                    5. lower-*.f64N/A

                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                    6. cube-multN/A

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

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

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

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

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

                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                    12. lower-*.f6463.5

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

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

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

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

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

                                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.6 \cdot 10^{-161}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-48}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \frac{\frac{k}{\frac{\ell}{t}}}{\frac{\ell}{t \cdot t}}\right) \cdot \left(1 + \frac{k \cdot k}{t \cdot t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot \left(t \cdot k\right)}}{k}\\ \end{array} \]
                                                                                                                                      5. Add Preprocessing

                                                                                                                                      Alternative 18: 69.5% accurate, 2.4× speedup?

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

                                                                                                                                        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 k around 0

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

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

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

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

                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                          5. lower-*.f64N/A

                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                          6. cube-multN/A

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

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

                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                          9. unpow2N/A

                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                          10. lower-*.f64N/A

                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                          11. unpow2N/A

                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                          12. lower-*.f6449.7

                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                        5. Applied rewrites49.7%

                                                                                                                                          \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                        6. Step-by-step derivation
                                                                                                                                          1. Applied rewrites60.6%

                                                                                                                                            \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]

                                                                                                                                          if 1.12000000000000001e-145 < t < 4.20000000000000003e-51

                                                                                                                                          1. Initial program 39.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 k around 0

                                                                                                                                            \[\leadsto \frac{2}{\left(\color{blue}{\frac{k \cdot {t}^{3}}{{\ell}^{2}}} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                          4. Step-by-step derivation
                                                                                                                                            1. *-commutativeN/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\frac{\color{blue}{{t}^{3} \cdot k}}{{\ell}^{2}} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                            2. associate-/l*N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\color{blue}{\left({t}^{3} \cdot \frac{k}{{\ell}^{2}}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                            3. lower-*.f64N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\color{blue}{\left({t}^{3} \cdot \frac{k}{{\ell}^{2}}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                            4. cube-multN/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot \frac{k}{{\ell}^{2}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                            5. unpow2N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot \frac{k}{{\ell}^{2}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                            6. lower-*.f64N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot \frac{k}{{\ell}^{2}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                            7. unpow2N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \frac{k}{{\ell}^{2}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                            8. lower-*.f64N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \frac{k}{{\ell}^{2}}\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(\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                            10. unpow2N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                            11. lower-*.f6439.9

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                          5. Applied rewrites39.9%

                                                                                                                                            \[\leadsto \frac{2}{\left(\color{blue}{\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                          6. Taylor expanded in k around inf

                                                                                                                                            \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\color{blue}{\frac{{k}^{2}}{{t}^{2}}} + 1\right)} \]
                                                                                                                                          7. Step-by-step derivation
                                                                                                                                            1. lower-/.f64N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\color{blue}{\frac{{k}^{2}}{{t}^{2}}} + 1\right)} \]
                                                                                                                                            2. unpow2N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\frac{\color{blue}{k \cdot k}}{{t}^{2}} + 1\right)} \]
                                                                                                                                            3. lower-*.f64N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\frac{\color{blue}{k \cdot k}}{{t}^{2}} + 1\right)} \]
                                                                                                                                            4. unpow2N/A

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\frac{k \cdot k}{\color{blue}{t \cdot t}} + 1\right)} \]
                                                                                                                                            5. lower-*.f6439.9

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\frac{k \cdot k}{\color{blue}{t \cdot t}} + 1\right)} \]
                                                                                                                                          8. Applied rewrites39.9%

                                                                                                                                            \[\leadsto \frac{2}{\left(\left(\left(t \cdot \left(t \cdot t\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\color{blue}{\frac{k \cdot k}{t \cdot t}} + 1\right)} \]
                                                                                                                                          9. Step-by-step derivation
                                                                                                                                            1. Applied rewrites59.3%

                                                                                                                                              \[\leadsto \frac{2}{\left(\left(\left(\frac{k}{\ell \cdot \ell} \cdot t\right) \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot \tan k\right) \cdot \left(\frac{k \cdot k}{t \cdot t} + 1\right)} \]

                                                                                                                                            if 4.20000000000000003e-51 < t

                                                                                                                                            1. Initial program 67.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 \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                            4. Step-by-step derivation
                                                                                                                                              1. lower-/.f64N/A

                                                                                                                                                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                              2. unpow2N/A

                                                                                                                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                              3. lower-*.f64N/A

                                                                                                                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                              4. *-commutativeN/A

                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                              5. lower-*.f64N/A

                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                              6. cube-multN/A

                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                              7. unpow2N/A

                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                              8. lower-*.f64N/A

                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                              9. unpow2N/A

                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                              10. lower-*.f64N/A

                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                              11. unpow2N/A

                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                              12. lower-*.f6463.5

                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                            5. Applied rewrites63.5%

                                                                                                                                              \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                            6. Step-by-step derivation
                                                                                                                                              1. Applied rewrites73.0%

                                                                                                                                                \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                              2. Step-by-step derivation
                                                                                                                                                1. Applied rewrites76.6%

                                                                                                                                                  \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(t \cdot k\right) \cdot k\right)\right)} \cdot \ell \]
                                                                                                                                                2. Step-by-step derivation
                                                                                                                                                  1. Applied rewrites86.1%

                                                                                                                                                    \[\leadsto \frac{\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot t\right)}}{k} \cdot \ell \]
                                                                                                                                                3. Recombined 3 regimes into one program.
                                                                                                                                                4. Final simplification68.6%

                                                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.12 \cdot 10^{-145}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)}\\ \mathbf{elif}\;t \leq 4.2 \cdot 10^{-51}:\\ \;\;\;\;\frac{2}{\left(1 + \frac{k \cdot k}{t \cdot t}\right) \cdot \left(\tan k \cdot \left(\left(t \cdot t\right) \cdot \left(t \cdot \frac{k}{\ell \cdot \ell}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot \left(t \cdot k\right)}}{k}\\ \end{array} \]
                                                                                                                                                5. Add Preprocessing

                                                                                                                                                Alternative 19: 68.7% accurate, 5.0× speedup?

                                                                                                                                                \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.75 \cdot 10^{-23}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(t\_m \cdot k\right)}}{k}\\ \mathbf{elif}\;k \leq 5 \cdot 10^{+146}:\\ \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{\ell \cdot \ell} \cdot \mathsf{fma}\left(2, \frac{t\_m \cdot \left(t\_m \cdot t\_m\right)}{k \cdot k}, t\_m\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\ \end{array} \end{array} \]
                                                                                                                                                t\_m = (fabs.f64 t)
                                                                                                                                                t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                (FPCore (t_s t_m l k)
                                                                                                                                                 :precision binary64
                                                                                                                                                 (*
                                                                                                                                                  t_s
                                                                                                                                                  (if (<= k 1.75e-23)
                                                                                                                                                    (* l (/ (/ (/ l t_m) (* t_m (* t_m k))) k))
                                                                                                                                                    (if (<= k 5e+146)
                                                                                                                                                      (/
                                                                                                                                                       2.0
                                                                                                                                                       (*
                                                                                                                                                        (* k k)
                                                                                                                                                        (* (/ (* k k) (* l l)) (fma 2.0 (/ (* t_m (* t_m t_m)) (* k k)) t_m))))
                                                                                                                                                      (* l (/ l (* t_m (* t_m (* t_m (* k k))))))))))
                                                                                                                                                t\_m = fabs(t);
                                                                                                                                                t\_s = copysign(1.0, t);
                                                                                                                                                double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                	double tmp;
                                                                                                                                                	if (k <= 1.75e-23) {
                                                                                                                                                		tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
                                                                                                                                                	} else if (k <= 5e+146) {
                                                                                                                                                		tmp = 2.0 / ((k * k) * (((k * k) / (l * l)) * fma(2.0, ((t_m * (t_m * t_m)) / (k * k)), t_m)));
                                                                                                                                                	} else {
                                                                                                                                                		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                                                                                	}
                                                                                                                                                	return t_s * tmp;
                                                                                                                                                }
                                                                                                                                                
                                                                                                                                                t\_m = abs(t)
                                                                                                                                                t\_s = copysign(1.0, t)
                                                                                                                                                function code(t_s, t_m, l, k)
                                                                                                                                                	tmp = 0.0
                                                                                                                                                	if (k <= 1.75e-23)
                                                                                                                                                		tmp = Float64(l * Float64(Float64(Float64(l / t_m) / Float64(t_m * Float64(t_m * k))) / k));
                                                                                                                                                	elseif (k <= 5e+146)
                                                                                                                                                		tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(Float64(k * k) / Float64(l * l)) * fma(2.0, Float64(Float64(t_m * Float64(t_m * t_m)) / Float64(k * k)), t_m))));
                                                                                                                                                	else
                                                                                                                                                		tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k))))));
                                                                                                                                                	end
                                                                                                                                                	return Float64(t_s * tmp)
                                                                                                                                                end
                                                                                                                                                
                                                                                                                                                t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.75e-23], N[(l * N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5e+146], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] + t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                                                                                                                                                
                                                                                                                                                \begin{array}{l}
                                                                                                                                                t\_m = \left|t\right|
                                                                                                                                                \\
                                                                                                                                                t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                
                                                                                                                                                \\
                                                                                                                                                t\_s \cdot \begin{array}{l}
                                                                                                                                                \mathbf{if}\;k \leq 1.75 \cdot 10^{-23}:\\
                                                                                                                                                \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(t\_m \cdot k\right)}}{k}\\
                                                                                                                                                
                                                                                                                                                \mathbf{elif}\;k \leq 5 \cdot 10^{+146}:\\
                                                                                                                                                \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{\ell \cdot \ell} \cdot \mathsf{fma}\left(2, \frac{t\_m \cdot \left(t\_m \cdot t\_m\right)}{k \cdot k}, t\_m\right)\right)}\\
                                                                                                                                                
                                                                                                                                                \mathbf{else}:\\
                                                                                                                                                \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
                                                                                                                                                
                                                                                                                                                
                                                                                                                                                \end{array}
                                                                                                                                                \end{array}
                                                                                                                                                
                                                                                                                                                Derivation
                                                                                                                                                1. Split input into 3 regimes
                                                                                                                                                2. if k < 1.74999999999999997e-23

                                                                                                                                                  1. Initial program 59.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 k around 0

                                                                                                                                                    \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                  4. Step-by-step derivation
                                                                                                                                                    1. lower-/.f64N/A

                                                                                                                                                      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                    2. unpow2N/A

                                                                                                                                                      \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                    3. lower-*.f64N/A

                                                                                                                                                      \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                    4. *-commutativeN/A

                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                    5. lower-*.f64N/A

                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                    6. cube-multN/A

                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                    7. unpow2N/A

                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                    8. lower-*.f64N/A

                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                    9. unpow2N/A

                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                    10. lower-*.f64N/A

                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                    11. unpow2N/A

                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                    12. lower-*.f6457.2

                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                  5. Applied rewrites57.2%

                                                                                                                                                    \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                  6. Step-by-step derivation
                                                                                                                                                    1. Applied rewrites67.7%

                                                                                                                                                      \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                    2. Step-by-step derivation
                                                                                                                                                      1. Applied rewrites69.8%

                                                                                                                                                        \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(t \cdot k\right) \cdot k\right)\right)} \cdot \ell \]
                                                                                                                                                      2. Step-by-step derivation
                                                                                                                                                        1. Applied rewrites76.7%

                                                                                                                                                          \[\leadsto \frac{\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot t\right)}}{k} \cdot \ell \]

                                                                                                                                                        if 1.74999999999999997e-23 < k < 4.9999999999999999e146

                                                                                                                                                        1. Initial program 52.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 inf

                                                                                                                                                          \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3} \cdot {\sin k}^{2}}{{k}^{2} \cdot \left({\ell}^{2} \cdot \cos k\right)} + \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                                                                                                                        4. Step-by-step derivation
                                                                                                                                                          1. lower-*.f64N/A

                                                                                                                                                            \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3} \cdot {\sin k}^{2}}{{k}^{2} \cdot \left({\ell}^{2} \cdot \cos k\right)} + \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                                                                                                                                                          2. unpow2N/A

                                                                                                                                                            \[\leadsto \frac{2}{\color{blue}{\left(k \cdot k\right)} \cdot \left(2 \cdot \frac{{t}^{3} \cdot {\sin k}^{2}}{{k}^{2} \cdot \left({\ell}^{2} \cdot \cos k\right)} + \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)} \]
                                                                                                                                                          3. lower-*.f64N/A

                                                                                                                                                            \[\leadsto \frac{2}{\color{blue}{\left(k \cdot k\right)} \cdot \left(2 \cdot \frac{{t}^{3} \cdot {\sin k}^{2}}{{k}^{2} \cdot \left({\ell}^{2} \cdot \cos k\right)} + \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)} \]
                                                                                                                                                          4. times-fracN/A

                                                                                                                                                            \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \left(2 \cdot \color{blue}{\left(\frac{{t}^{3}}{{k}^{2}} \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)} + \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)} \]
                                                                                                                                                          5. associate-*r*N/A

                                                                                                                                                            \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \left(\color{blue}{\left(2 \cdot \frac{{t}^{3}}{{k}^{2}}\right) \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}} + \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)} \]
                                                                                                                                                          6. associate-/l*N/A

                                                                                                                                                            \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \left(\left(2 \cdot \frac{{t}^{3}}{{k}^{2}}\right) \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \color{blue}{t \cdot \frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\right)} \]
                                                                                                                                                          7. distribute-rgt-outN/A

                                                                                                                                                            \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \color{blue}{\left(\frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot \left(2 \cdot \frac{{t}^{3}}{{k}^{2}} + t\right)\right)}} \]
                                                                                                                                                          8. lower-*.f64N/A

                                                                                                                                                            \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \color{blue}{\left(\frac{{\sin k}^{2}}{{\ell}^{2} \cdot \cos k} \cdot \left(2 \cdot \frac{{t}^{3}}{{k}^{2}} + t\right)\right)}} \]
                                                                                                                                                        5. Applied rewrites80.4%

                                                                                                                                                          \[\leadsto \frac{2}{\color{blue}{\left(k \cdot k\right) \cdot \left(\frac{{\sin k}^{2}}{\ell \cdot \left(\ell \cdot \cos k\right)} \cdot \mathsf{fma}\left(2, \frac{t \cdot \left(t \cdot t\right)}{k \cdot k}, t\right)\right)}} \]
                                                                                                                                                        6. Taylor expanded in k around 0

                                                                                                                                                          \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \left(\frac{{k}^{2}}{{\ell}^{2}} \cdot \mathsf{fma}\left(\color{blue}{2}, \frac{t \cdot \left(t \cdot t\right)}{k \cdot k}, t\right)\right)} \]
                                                                                                                                                        7. Step-by-step derivation
                                                                                                                                                          1. Applied rewrites60.3%

                                                                                                                                                            \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{\ell \cdot \ell} \cdot \mathsf{fma}\left(\color{blue}{2}, \frac{t \cdot \left(t \cdot t\right)}{k \cdot k}, t\right)\right)} \]

                                                                                                                                                          if 4.9999999999999999e146 < k

                                                                                                                                                          1. Initial program 38.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 \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                          4. Step-by-step derivation
                                                                                                                                                            1. lower-/.f64N/A

                                                                                                                                                              \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                            2. unpow2N/A

                                                                                                                                                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                            3. lower-*.f64N/A

                                                                                                                                                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                            4. *-commutativeN/A

                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                            5. lower-*.f64N/A

                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                            6. cube-multN/A

                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                            7. unpow2N/A

                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                            8. lower-*.f64N/A

                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                            9. unpow2N/A

                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                            10. lower-*.f64N/A

                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                            11. unpow2N/A

                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                            12. lower-*.f6435.7

                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                          5. Applied rewrites35.7%

                                                                                                                                                            \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                          6. Step-by-step derivation
                                                                                                                                                            1. Applied rewrites51.9%

                                                                                                                                                              \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                          7. Recombined 3 regimes into one program.
                                                                                                                                                          8. Final simplification71.1%

                                                                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.75 \cdot 10^{-23}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot \left(t \cdot k\right)}}{k}\\ \mathbf{elif}\;k \leq 5 \cdot 10^{+146}:\\ \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{\ell \cdot \ell} \cdot \mathsf{fma}\left(2, \frac{t \cdot \left(t \cdot t\right)}{k \cdot k}, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)}\\ \end{array} \]
                                                                                                                                                          9. Add Preprocessing

                                                                                                                                                          Alternative 20: 67.9% accurate, 8.4× speedup?

                                                                                                                                                          \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.3 \cdot 10^{-155}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(t\_m \cdot k\right)}}{k}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(k \cdot k\right)}}{t\_m}\\ \end{array} \end{array} \]
                                                                                                                                                          t\_m = (fabs.f64 t)
                                                                                                                                                          t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                          (FPCore (t_s t_m l k)
                                                                                                                                                           :precision binary64
                                                                                                                                                           (*
                                                                                                                                                            t_s
                                                                                                                                                            (if (<= k 1.3e-155)
                                                                                                                                                              (* l (/ (/ (/ l t_m) (* t_m (* t_m k))) k))
                                                                                                                                                              (* l (/ (/ (/ l t_m) (* t_m (* k k))) t_m)))))
                                                                                                                                                          t\_m = fabs(t);
                                                                                                                                                          t\_s = copysign(1.0, t);
                                                                                                                                                          double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                          	double tmp;
                                                                                                                                                          	if (k <= 1.3e-155) {
                                                                                                                                                          		tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
                                                                                                                                                          	} else {
                                                                                                                                                          		tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m);
                                                                                                                                                          	}
                                                                                                                                                          	return t_s * tmp;
                                                                                                                                                          }
                                                                                                                                                          
                                                                                                                                                          t\_m = abs(t)
                                                                                                                                                          t\_s = copysign(1.0d0, t)
                                                                                                                                                          real(8) function code(t_s, t_m, l, k)
                                                                                                                                                              real(8), intent (in) :: t_s
                                                                                                                                                              real(8), intent (in) :: t_m
                                                                                                                                                              real(8), intent (in) :: l
                                                                                                                                                              real(8), intent (in) :: k
                                                                                                                                                              real(8) :: tmp
                                                                                                                                                              if (k <= 1.3d-155) then
                                                                                                                                                                  tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k)
                                                                                                                                                              else
                                                                                                                                                                  tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m)
                                                                                                                                                              end if
                                                                                                                                                              code = t_s * tmp
                                                                                                                                                          end function
                                                                                                                                                          
                                                                                                                                                          t\_m = Math.abs(t);
                                                                                                                                                          t\_s = Math.copySign(1.0, t);
                                                                                                                                                          public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                          	double tmp;
                                                                                                                                                          	if (k <= 1.3e-155) {
                                                                                                                                                          		tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
                                                                                                                                                          	} else {
                                                                                                                                                          		tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m);
                                                                                                                                                          	}
                                                                                                                                                          	return t_s * tmp;
                                                                                                                                                          }
                                                                                                                                                          
                                                                                                                                                          t\_m = math.fabs(t)
                                                                                                                                                          t\_s = math.copysign(1.0, t)
                                                                                                                                                          def code(t_s, t_m, l, k):
                                                                                                                                                          	tmp = 0
                                                                                                                                                          	if k <= 1.3e-155:
                                                                                                                                                          		tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k)
                                                                                                                                                          	else:
                                                                                                                                                          		tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m)
                                                                                                                                                          	return t_s * tmp
                                                                                                                                                          
                                                                                                                                                          t\_m = abs(t)
                                                                                                                                                          t\_s = copysign(1.0, t)
                                                                                                                                                          function code(t_s, t_m, l, k)
                                                                                                                                                          	tmp = 0.0
                                                                                                                                                          	if (k <= 1.3e-155)
                                                                                                                                                          		tmp = Float64(l * Float64(Float64(Float64(l / t_m) / Float64(t_m * Float64(t_m * k))) / k));
                                                                                                                                                          	else
                                                                                                                                                          		tmp = Float64(l * Float64(Float64(Float64(l / t_m) / Float64(t_m * Float64(k * k))) / t_m));
                                                                                                                                                          	end
                                                                                                                                                          	return Float64(t_s * tmp)
                                                                                                                                                          end
                                                                                                                                                          
                                                                                                                                                          t\_m = abs(t);
                                                                                                                                                          t\_s = sign(t) * abs(1.0);
                                                                                                                                                          function tmp_2 = code(t_s, t_m, l, k)
                                                                                                                                                          	tmp = 0.0;
                                                                                                                                                          	if (k <= 1.3e-155)
                                                                                                                                                          		tmp = l * (((l / t_m) / (t_m * (t_m * k))) / k);
                                                                                                                                                          	else
                                                                                                                                                          		tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m);
                                                                                                                                                          	end
                                                                                                                                                          	tmp_2 = t_s * tmp;
                                                                                                                                                          end
                                                                                                                                                          
                                                                                                                                                          t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                          t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                          code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.3e-155], N[(l * N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                                                                          
                                                                                                                                                          \begin{array}{l}
                                                                                                                                                          t\_m = \left|t\right|
                                                                                                                                                          \\
                                                                                                                                                          t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                          
                                                                                                                                                          \\
                                                                                                                                                          t\_s \cdot \begin{array}{l}
                                                                                                                                                          \mathbf{if}\;k \leq 1.3 \cdot 10^{-155}:\\
                                                                                                                                                          \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(t\_m \cdot k\right)}}{k}\\
                                                                                                                                                          
                                                                                                                                                          \mathbf{else}:\\
                                                                                                                                                          \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(k \cdot k\right)}}{t\_m}\\
                                                                                                                                                          
                                                                                                                                                          
                                                                                                                                                          \end{array}
                                                                                                                                                          \end{array}
                                                                                                                                                          
                                                                                                                                                          Derivation
                                                                                                                                                          1. Split input into 2 regimes
                                                                                                                                                          2. if k < 1.30000000000000004e-155

                                                                                                                                                            1. Initial program 57.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 k around 0

                                                                                                                                                              \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                            4. Step-by-step derivation
                                                                                                                                                              1. lower-/.f64N/A

                                                                                                                                                                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                              2. unpow2N/A

                                                                                                                                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                              3. lower-*.f64N/A

                                                                                                                                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                              4. *-commutativeN/A

                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                              5. lower-*.f64N/A

                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                              6. cube-multN/A

                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                              7. unpow2N/A

                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                              8. lower-*.f64N/A

                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                              9. unpow2N/A

                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                              10. lower-*.f64N/A

                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                              11. unpow2N/A

                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                              12. lower-*.f6452.6

                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                            5. Applied rewrites52.6%

                                                                                                                                                              \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                            6. Step-by-step derivation
                                                                                                                                                              1. Applied rewrites65.6%

                                                                                                                                                                \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                              2. Step-by-step derivation
                                                                                                                                                                1. Applied rewrites68.2%

                                                                                                                                                                  \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(t \cdot k\right) \cdot k\right)\right)} \cdot \ell \]
                                                                                                                                                                2. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites72.9%

                                                                                                                                                                    \[\leadsto \frac{\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot t\right)}}{k} \cdot \ell \]

                                                                                                                                                                  if 1.30000000000000004e-155 < k

                                                                                                                                                                  1. Initial program 52.6%

                                                                                                                                                                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                                                  2. Add Preprocessing
                                                                                                                                                                  3. Taylor expanded in k around 0

                                                                                                                                                                    \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                  4. Step-by-step derivation
                                                                                                                                                                    1. lower-/.f64N/A

                                                                                                                                                                      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                    2. unpow2N/A

                                                                                                                                                                      \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                    3. lower-*.f64N/A

                                                                                                                                                                      \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                    4. *-commutativeN/A

                                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                    5. lower-*.f64N/A

                                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                    6. cube-multN/A

                                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                    7. unpow2N/A

                                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                    8. lower-*.f64N/A

                                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                    9. unpow2N/A

                                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                    10. lower-*.f64N/A

                                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                    11. unpow2N/A

                                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                    12. lower-*.f6452.9

                                                                                                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                  5. Applied rewrites52.9%

                                                                                                                                                                    \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                  6. Step-by-step derivation
                                                                                                                                                                    1. Applied rewrites59.3%

                                                                                                                                                                      \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                    2. Step-by-step derivation
                                                                                                                                                                      1. Applied rewrites64.5%

                                                                                                                                                                        \[\leadsto \frac{\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}}{t} \cdot \ell \]
                                                                                                                                                                    3. Recombined 2 regimes into one program.
                                                                                                                                                                    4. Final simplification69.4%

                                                                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.3 \cdot 10^{-155}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot \left(t \cdot k\right)}}{k}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}}{t}\\ \end{array} \]
                                                                                                                                                                    5. Add Preprocessing

                                                                                                                                                                    Alternative 21: 67.6% accurate, 8.4× speedup?

                                                                                                                                                                    \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.2 \cdot 10^{-155}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(k \cdot k\right)}}{t\_m}\\ \end{array} \end{array} \]
                                                                                                                                                                    t\_m = (fabs.f64 t)
                                                                                                                                                                    t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                                    (FPCore (t_s t_m l k)
                                                                                                                                                                     :precision binary64
                                                                                                                                                                     (*
                                                                                                                                                                      t_s
                                                                                                                                                                      (if (<= k 2.2e-155)
                                                                                                                                                                        (* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
                                                                                                                                                                        (* l (/ (/ (/ l t_m) (* t_m (* k k))) t_m)))))
                                                                                                                                                                    t\_m = fabs(t);
                                                                                                                                                                    t\_s = copysign(1.0, t);
                                                                                                                                                                    double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                    	double tmp;
                                                                                                                                                                    	if (k <= 2.2e-155) {
                                                                                                                                                                    		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                                                                                    	} else {
                                                                                                                                                                    		tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m);
                                                                                                                                                                    	}
                                                                                                                                                                    	return t_s * tmp;
                                                                                                                                                                    }
                                                                                                                                                                    
                                                                                                                                                                    t\_m = abs(t)
                                                                                                                                                                    t\_s = copysign(1.0d0, t)
                                                                                                                                                                    real(8) function code(t_s, t_m, l, k)
                                                                                                                                                                        real(8), intent (in) :: t_s
                                                                                                                                                                        real(8), intent (in) :: t_m
                                                                                                                                                                        real(8), intent (in) :: l
                                                                                                                                                                        real(8), intent (in) :: k
                                                                                                                                                                        real(8) :: tmp
                                                                                                                                                                        if (k <= 2.2d-155) then
                                                                                                                                                                            tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)))
                                                                                                                                                                        else
                                                                                                                                                                            tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m)
                                                                                                                                                                        end if
                                                                                                                                                                        code = t_s * tmp
                                                                                                                                                                    end function
                                                                                                                                                                    
                                                                                                                                                                    t\_m = Math.abs(t);
                                                                                                                                                                    t\_s = Math.copySign(1.0, t);
                                                                                                                                                                    public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                    	double tmp;
                                                                                                                                                                    	if (k <= 2.2e-155) {
                                                                                                                                                                    		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                                                                                    	} else {
                                                                                                                                                                    		tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m);
                                                                                                                                                                    	}
                                                                                                                                                                    	return t_s * tmp;
                                                                                                                                                                    }
                                                                                                                                                                    
                                                                                                                                                                    t\_m = math.fabs(t)
                                                                                                                                                                    t\_s = math.copysign(1.0, t)
                                                                                                                                                                    def code(t_s, t_m, l, k):
                                                                                                                                                                    	tmp = 0
                                                                                                                                                                    	if k <= 2.2e-155:
                                                                                                                                                                    		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)))
                                                                                                                                                                    	else:
                                                                                                                                                                    		tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m)
                                                                                                                                                                    	return t_s * tmp
                                                                                                                                                                    
                                                                                                                                                                    t\_m = abs(t)
                                                                                                                                                                    t\_s = copysign(1.0, t)
                                                                                                                                                                    function code(t_s, t_m, l, k)
                                                                                                                                                                    	tmp = 0.0
                                                                                                                                                                    	if (k <= 2.2e-155)
                                                                                                                                                                    		tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k))));
                                                                                                                                                                    	else
                                                                                                                                                                    		tmp = Float64(l * Float64(Float64(Float64(l / t_m) / Float64(t_m * Float64(k * k))) / t_m));
                                                                                                                                                                    	end
                                                                                                                                                                    	return Float64(t_s * tmp)
                                                                                                                                                                    end
                                                                                                                                                                    
                                                                                                                                                                    t\_m = abs(t);
                                                                                                                                                                    t\_s = sign(t) * abs(1.0);
                                                                                                                                                                    function tmp_2 = code(t_s, t_m, l, k)
                                                                                                                                                                    	tmp = 0.0;
                                                                                                                                                                    	if (k <= 2.2e-155)
                                                                                                                                                                    		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                                                                                    	else
                                                                                                                                                                    		tmp = l * (((l / t_m) / (t_m * (k * k))) / t_m);
                                                                                                                                                                    	end
                                                                                                                                                                    	tmp_2 = t_s * tmp;
                                                                                                                                                                    end
                                                                                                                                                                    
                                                                                                                                                                    t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                                    t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                                    code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.2e-155], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                                                                                    
                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                    t\_m = \left|t\right|
                                                                                                                                                                    \\
                                                                                                                                                                    t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                                    
                                                                                                                                                                    \\
                                                                                                                                                                    t\_s \cdot \begin{array}{l}
                                                                                                                                                                    \mathbf{if}\;k \leq 2.2 \cdot 10^{-155}:\\
                                                                                                                                                                    \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
                                                                                                                                                                    
                                                                                                                                                                    \mathbf{else}:\\
                                                                                                                                                                    \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(k \cdot k\right)}}{t\_m}\\
                                                                                                                                                                    
                                                                                                                                                                    
                                                                                                                                                                    \end{array}
                                                                                                                                                                    \end{array}
                                                                                                                                                                    
                                                                                                                                                                    Derivation
                                                                                                                                                                    1. Split input into 2 regimes
                                                                                                                                                                    2. if k < 2.1999999999999999e-155

                                                                                                                                                                      1. Initial program 57.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 k around 0

                                                                                                                                                                        \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                      4. Step-by-step derivation
                                                                                                                                                                        1. lower-/.f64N/A

                                                                                                                                                                          \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                        2. unpow2N/A

                                                                                                                                                                          \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                        3. lower-*.f64N/A

                                                                                                                                                                          \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                        4. *-commutativeN/A

                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                        5. lower-*.f64N/A

                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                        6. cube-multN/A

                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                        7. unpow2N/A

                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                        8. lower-*.f64N/A

                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                        9. unpow2N/A

                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                        10. lower-*.f64N/A

                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                        11. unpow2N/A

                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                        12. lower-*.f6452.6

                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                      5. Applied rewrites52.6%

                                                                                                                                                                        \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                      6. Step-by-step derivation
                                                                                                                                                                        1. Applied rewrites65.6%

                                                                                                                                                                          \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                        2. Step-by-step derivation
                                                                                                                                                                          1. Applied rewrites68.2%

                                                                                                                                                                            \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(t \cdot k\right) \cdot k\right)\right)} \cdot \ell \]
                                                                                                                                                                          2. Step-by-step derivation
                                                                                                                                                                            1. Applied rewrites72.7%

                                                                                                                                                                              \[\leadsto \frac{\ell}{\left(t \cdot \left(k \cdot t\right)\right) \cdot \left(k \cdot t\right)} \cdot \ell \]

                                                                                                                                                                            if 2.1999999999999999e-155 < k

                                                                                                                                                                            1. Initial program 52.6%

                                                                                                                                                                              \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                                                            2. Add Preprocessing
                                                                                                                                                                            3. Taylor expanded in k around 0

                                                                                                                                                                              \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                            4. Step-by-step derivation
                                                                                                                                                                              1. lower-/.f64N/A

                                                                                                                                                                                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                              2. unpow2N/A

                                                                                                                                                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                              3. lower-*.f64N/A

                                                                                                                                                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                              4. *-commutativeN/A

                                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                              5. lower-*.f64N/A

                                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                              6. cube-multN/A

                                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                              7. unpow2N/A

                                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                              8. lower-*.f64N/A

                                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                              9. unpow2N/A

                                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                              10. lower-*.f64N/A

                                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                              11. unpow2N/A

                                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                              12. lower-*.f6452.9

                                                                                                                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                            5. Applied rewrites52.9%

                                                                                                                                                                              \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                            6. Step-by-step derivation
                                                                                                                                                                              1. Applied rewrites59.3%

                                                                                                                                                                                \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                              2. Step-by-step derivation
                                                                                                                                                                                1. Applied rewrites64.5%

                                                                                                                                                                                  \[\leadsto \frac{\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}}{t} \cdot \ell \]
                                                                                                                                                                              3. Recombined 2 regimes into one program.
                                                                                                                                                                              4. Final simplification69.3%

                                                                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.2 \cdot 10^{-155}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot k\right)\right) \cdot \left(t \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}}{t}\\ \end{array} \]
                                                                                                                                                                              5. Add Preprocessing

                                                                                                                                                                              Alternative 22: 67.6% accurate, 9.4× speedup?

                                                                                                                                                                              \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.2 \cdot 10^{-155}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\ \end{array} \end{array} \]
                                                                                                                                                                              t\_m = (fabs.f64 t)
                                                                                                                                                                              t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                                              (FPCore (t_s t_m l k)
                                                                                                                                                                               :precision binary64
                                                                                                                                                                               (*
                                                                                                                                                                                t_s
                                                                                                                                                                                (if (<= k 2.2e-155)
                                                                                                                                                                                  (* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
                                                                                                                                                                                  (* (/ l t_m) (/ l (* t_m (* t_m (* k k))))))))
                                                                                                                                                                              t\_m = fabs(t);
                                                                                                                                                                              t\_s = copysign(1.0, t);
                                                                                                                                                                              double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                              	double tmp;
                                                                                                                                                                              	if (k <= 2.2e-155) {
                                                                                                                                                                              		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                                                                                              	} else {
                                                                                                                                                                              		tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
                                                                                                                                                                              	}
                                                                                                                                                                              	return t_s * tmp;
                                                                                                                                                                              }
                                                                                                                                                                              
                                                                                                                                                                              t\_m = abs(t)
                                                                                                                                                                              t\_s = copysign(1.0d0, t)
                                                                                                                                                                              real(8) function code(t_s, t_m, l, k)
                                                                                                                                                                                  real(8), intent (in) :: t_s
                                                                                                                                                                                  real(8), intent (in) :: t_m
                                                                                                                                                                                  real(8), intent (in) :: l
                                                                                                                                                                                  real(8), intent (in) :: k
                                                                                                                                                                                  real(8) :: tmp
                                                                                                                                                                                  if (k <= 2.2d-155) then
                                                                                                                                                                                      tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)))
                                                                                                                                                                                  else
                                                                                                                                                                                      tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))))
                                                                                                                                                                                  end if
                                                                                                                                                                                  code = t_s * tmp
                                                                                                                                                                              end function
                                                                                                                                                                              
                                                                                                                                                                              t\_m = Math.abs(t);
                                                                                                                                                                              t\_s = Math.copySign(1.0, t);
                                                                                                                                                                              public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                              	double tmp;
                                                                                                                                                                              	if (k <= 2.2e-155) {
                                                                                                                                                                              		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                                                                                              	} else {
                                                                                                                                                                              		tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
                                                                                                                                                                              	}
                                                                                                                                                                              	return t_s * tmp;
                                                                                                                                                                              }
                                                                                                                                                                              
                                                                                                                                                                              t\_m = math.fabs(t)
                                                                                                                                                                              t\_s = math.copysign(1.0, t)
                                                                                                                                                                              def code(t_s, t_m, l, k):
                                                                                                                                                                              	tmp = 0
                                                                                                                                                                              	if k <= 2.2e-155:
                                                                                                                                                                              		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)))
                                                                                                                                                                              	else:
                                                                                                                                                                              		tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))))
                                                                                                                                                                              	return t_s * tmp
                                                                                                                                                                              
                                                                                                                                                                              t\_m = abs(t)
                                                                                                                                                                              t\_s = copysign(1.0, t)
                                                                                                                                                                              function code(t_s, t_m, l, k)
                                                                                                                                                                              	tmp = 0.0
                                                                                                                                                                              	if (k <= 2.2e-155)
                                                                                                                                                                              		tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k))));
                                                                                                                                                                              	else
                                                                                                                                                                              		tmp = Float64(Float64(l / t_m) * Float64(l / Float64(t_m * Float64(t_m * Float64(k * k)))));
                                                                                                                                                                              	end
                                                                                                                                                                              	return Float64(t_s * tmp)
                                                                                                                                                                              end
                                                                                                                                                                              
                                                                                                                                                                              t\_m = abs(t);
                                                                                                                                                                              t\_s = sign(t) * abs(1.0);
                                                                                                                                                                              function tmp_2 = code(t_s, t_m, l, k)
                                                                                                                                                                              	tmp = 0.0;
                                                                                                                                                                              	if (k <= 2.2e-155)
                                                                                                                                                                              		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                                                                                              	else
                                                                                                                                                                              		tmp = (l / t_m) * (l / (t_m * (t_m * (k * k))));
                                                                                                                                                                              	end
                                                                                                                                                                              	tmp_2 = t_s * tmp;
                                                                                                                                                                              end
                                                                                                                                                                              
                                                                                                                                                                              t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                                              t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                                              code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.2e-155], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(l / N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                                                                                              
                                                                                                                                                                              \begin{array}{l}
                                                                                                                                                                              t\_m = \left|t\right|
                                                                                                                                                                              \\
                                                                                                                                                                              t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                                              
                                                                                                                                                                              \\
                                                                                                                                                                              t\_s \cdot \begin{array}{l}
                                                                                                                                                                              \mathbf{if}\;k \leq 2.2 \cdot 10^{-155}:\\
                                                                                                                                                                              \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
                                                                                                                                                                              
                                                                                                                                                                              \mathbf{else}:\\
                                                                                                                                                                              \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}\\
                                                                                                                                                                              
                                                                                                                                                                              
                                                                                                                                                                              \end{array}
                                                                                                                                                                              \end{array}
                                                                                                                                                                              
                                                                                                                                                                              Derivation
                                                                                                                                                                              1. Split input into 2 regimes
                                                                                                                                                                              2. if k < 2.1999999999999999e-155

                                                                                                                                                                                1. Initial program 57.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 k around 0

                                                                                                                                                                                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                4. Step-by-step derivation
                                                                                                                                                                                  1. lower-/.f64N/A

                                                                                                                                                                                    \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                  2. unpow2N/A

                                                                                                                                                                                    \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                  3. lower-*.f64N/A

                                                                                                                                                                                    \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                  4. *-commutativeN/A

                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                  5. lower-*.f64N/A

                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                  6. cube-multN/A

                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                  7. unpow2N/A

                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                  8. lower-*.f64N/A

                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                  9. unpow2N/A

                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                  10. lower-*.f64N/A

                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                  11. unpow2N/A

                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                  12. lower-*.f6452.6

                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                5. Applied rewrites52.6%

                                                                                                                                                                                  \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                                6. Step-by-step derivation
                                                                                                                                                                                  1. Applied rewrites65.6%

                                                                                                                                                                                    \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                                  2. Step-by-step derivation
                                                                                                                                                                                    1. Applied rewrites68.2%

                                                                                                                                                                                      \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(t \cdot k\right) \cdot k\right)\right)} \cdot \ell \]
                                                                                                                                                                                    2. Step-by-step derivation
                                                                                                                                                                                      1. Applied rewrites72.7%

                                                                                                                                                                                        \[\leadsto \frac{\ell}{\left(t \cdot \left(k \cdot t\right)\right) \cdot \left(k \cdot t\right)} \cdot \ell \]

                                                                                                                                                                                      if 2.1999999999999999e-155 < k

                                                                                                                                                                                      1. Initial program 52.6%

                                                                                                                                                                                        \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                                                                      2. Add Preprocessing
                                                                                                                                                                                      3. Taylor expanded in k around 0

                                                                                                                                                                                        \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                      4. Step-by-step derivation
                                                                                                                                                                                        1. lower-/.f64N/A

                                                                                                                                                                                          \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                        2. unpow2N/A

                                                                                                                                                                                          \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                        3. lower-*.f64N/A

                                                                                                                                                                                          \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                        4. *-commutativeN/A

                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                        5. lower-*.f64N/A

                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                        6. cube-multN/A

                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                        7. unpow2N/A

                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                        8. lower-*.f64N/A

                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                        9. unpow2N/A

                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                        10. lower-*.f64N/A

                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                        11. unpow2N/A

                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                        12. lower-*.f6452.9

                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                      5. Applied rewrites52.9%

                                                                                                                                                                                        \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                                      6. Step-by-step derivation
                                                                                                                                                                                        1. Applied rewrites63.6%

                                                                                                                                                                                          \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{t \cdot \left(t \cdot \left(k \cdot k\right)\right)}} \]
                                                                                                                                                                                      7. Recombined 2 regimes into one program.
                                                                                                                                                                                      8. Final simplification68.9%

                                                                                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.2 \cdot 10^{-155}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot k\right)\right) \cdot \left(t \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{t} \cdot \frac{\ell}{t \cdot \left(t \cdot \left(k \cdot k\right)\right)}\\ \end{array} \]
                                                                                                                                                                                      9. Add Preprocessing

                                                                                                                                                                                      Alternative 23: 67.0% accurate, 10.7× speedup?

                                                                                                                                                                                      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 10^{-123}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\ \end{array} \end{array} \]
                                                                                                                                                                                      t\_m = (fabs.f64 t)
                                                                                                                                                                                      t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                                                      (FPCore (t_s t_m l k)
                                                                                                                                                                                       :precision binary64
                                                                                                                                                                                       (*
                                                                                                                                                                                        t_s
                                                                                                                                                                                        (if (<= k 1e-123)
                                                                                                                                                                                          (* l (/ l (* (* t_m (* t_m k)) (* t_m k))))
                                                                                                                                                                                          (* l (/ l (* t_m (* t_m (* t_m (* k k)))))))))
                                                                                                                                                                                      t\_m = fabs(t);
                                                                                                                                                                                      t\_s = copysign(1.0, t);
                                                                                                                                                                                      double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                                      	double tmp;
                                                                                                                                                                                      	if (k <= 1e-123) {
                                                                                                                                                                                      		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                                                                                                      	} else {
                                                                                                                                                                                      		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                                                                                                                      	}
                                                                                                                                                                                      	return t_s * tmp;
                                                                                                                                                                                      }
                                                                                                                                                                                      
                                                                                                                                                                                      t\_m = abs(t)
                                                                                                                                                                                      t\_s = copysign(1.0d0, t)
                                                                                                                                                                                      real(8) function code(t_s, t_m, l, k)
                                                                                                                                                                                          real(8), intent (in) :: t_s
                                                                                                                                                                                          real(8), intent (in) :: t_m
                                                                                                                                                                                          real(8), intent (in) :: l
                                                                                                                                                                                          real(8), intent (in) :: k
                                                                                                                                                                                          real(8) :: tmp
                                                                                                                                                                                          if (k <= 1d-123) then
                                                                                                                                                                                              tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)))
                                                                                                                                                                                          else
                                                                                                                                                                                              tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                                                                                                                                          end if
                                                                                                                                                                                          code = t_s * tmp
                                                                                                                                                                                      end function
                                                                                                                                                                                      
                                                                                                                                                                                      t\_m = Math.abs(t);
                                                                                                                                                                                      t\_s = Math.copySign(1.0, t);
                                                                                                                                                                                      public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                                      	double tmp;
                                                                                                                                                                                      	if (k <= 1e-123) {
                                                                                                                                                                                      		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                                                                                                      	} else {
                                                                                                                                                                                      		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                                                                                                                      	}
                                                                                                                                                                                      	return t_s * tmp;
                                                                                                                                                                                      }
                                                                                                                                                                                      
                                                                                                                                                                                      t\_m = math.fabs(t)
                                                                                                                                                                                      t\_s = math.copysign(1.0, t)
                                                                                                                                                                                      def code(t_s, t_m, l, k):
                                                                                                                                                                                      	tmp = 0
                                                                                                                                                                                      	if k <= 1e-123:
                                                                                                                                                                                      		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)))
                                                                                                                                                                                      	else:
                                                                                                                                                                                      		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                                                                                                                                      	return t_s * tmp
                                                                                                                                                                                      
                                                                                                                                                                                      t\_m = abs(t)
                                                                                                                                                                                      t\_s = copysign(1.0, t)
                                                                                                                                                                                      function code(t_s, t_m, l, k)
                                                                                                                                                                                      	tmp = 0.0
                                                                                                                                                                                      	if (k <= 1e-123)
                                                                                                                                                                                      		tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * Float64(t_m * k))));
                                                                                                                                                                                      	else
                                                                                                                                                                                      		tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k))))));
                                                                                                                                                                                      	end
                                                                                                                                                                                      	return Float64(t_s * tmp)
                                                                                                                                                                                      end
                                                                                                                                                                                      
                                                                                                                                                                                      t\_m = abs(t);
                                                                                                                                                                                      t\_s = sign(t) * abs(1.0);
                                                                                                                                                                                      function tmp_2 = code(t_s, t_m, l, k)
                                                                                                                                                                                      	tmp = 0.0;
                                                                                                                                                                                      	if (k <= 1e-123)
                                                                                                                                                                                      		tmp = l * (l / ((t_m * (t_m * k)) * (t_m * k)));
                                                                                                                                                                                      	else
                                                                                                                                                                                      		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                                                                                                                      	end
                                                                                                                                                                                      	tmp_2 = t_s * tmp;
                                                                                                                                                                                      end
                                                                                                                                                                                      
                                                                                                                                                                                      t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                                                      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                                                      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-123], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                                                                                                      
                                                                                                                                                                                      \begin{array}{l}
                                                                                                                                                                                      t\_m = \left|t\right|
                                                                                                                                                                                      \\
                                                                                                                                                                                      t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                                                      
                                                                                                                                                                                      \\
                                                                                                                                                                                      t\_s \cdot \begin{array}{l}
                                                                                                                                                                                      \mathbf{if}\;k \leq 10^{-123}:\\
                                                                                                                                                                                      \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
                                                                                                                                                                                      
                                                                                                                                                                                      \mathbf{else}:\\
                                                                                                                                                                                      \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
                                                                                                                                                                                      
                                                                                                                                                                                      
                                                                                                                                                                                      \end{array}
                                                                                                                                                                                      \end{array}
                                                                                                                                                                                      
                                                                                                                                                                                      Derivation
                                                                                                                                                                                      1. Split input into 2 regimes
                                                                                                                                                                                      2. if k < 1.0000000000000001e-123

                                                                                                                                                                                        1. Initial program 59.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 k around 0

                                                                                                                                                                                          \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                        4. Step-by-step derivation
                                                                                                                                                                                          1. lower-/.f64N/A

                                                                                                                                                                                            \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                          2. unpow2N/A

                                                                                                                                                                                            \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                          3. lower-*.f64N/A

                                                                                                                                                                                            \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                          4. *-commutativeN/A

                                                                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                          5. lower-*.f64N/A

                                                                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                          6. cube-multN/A

                                                                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                          7. unpow2N/A

                                                                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                          8. lower-*.f64N/A

                                                                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                          9. unpow2N/A

                                                                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                          10. lower-*.f64N/A

                                                                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                          11. unpow2N/A

                                                                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                          12. lower-*.f6455.0

                                                                                                                                                                                            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                        5. Applied rewrites55.0%

                                                                                                                                                                                          \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                                        6. Step-by-step derivation
                                                                                                                                                                                          1. Applied rewrites67.3%

                                                                                                                                                                                            \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                                          2. Step-by-step derivation
                                                                                                                                                                                            1. Applied rewrites69.8%

                                                                                                                                                                                              \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(t \cdot k\right) \cdot k\right)\right)} \cdot \ell \]
                                                                                                                                                                                            2. Step-by-step derivation
                                                                                                                                                                                              1. Applied rewrites74.1%

                                                                                                                                                                                                \[\leadsto \frac{\ell}{\left(t \cdot \left(k \cdot t\right)\right) \cdot \left(k \cdot t\right)} \cdot \ell \]

                                                                                                                                                                                              if 1.0000000000000001e-123 < k

                                                                                                                                                                                              1. Initial program 48.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 k around 0

                                                                                                                                                                                                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                              4. Step-by-step derivation
                                                                                                                                                                                                1. lower-/.f64N/A

                                                                                                                                                                                                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                2. unpow2N/A

                                                                                                                                                                                                  \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                3. lower-*.f64N/A

                                                                                                                                                                                                  \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                4. *-commutativeN/A

                                                                                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                5. lower-*.f64N/A

                                                                                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                6. cube-multN/A

                                                                                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                7. unpow2N/A

                                                                                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                8. lower-*.f64N/A

                                                                                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                9. unpow2N/A

                                                                                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                10. lower-*.f64N/A

                                                                                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                11. unpow2N/A

                                                                                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                12. lower-*.f6449.1

                                                                                                                                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                              5. Applied rewrites49.1%

                                                                                                                                                                                                \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                                              6. Step-by-step derivation
                                                                                                                                                                                                1. Applied rewrites56.0%

                                                                                                                                                                                                  \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                                              7. Recombined 2 regimes into one program.
                                                                                                                                                                                              8. Final simplification67.1%

                                                                                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 10^{-123}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot k\right)\right) \cdot \left(t \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)}\\ \end{array} \]
                                                                                                                                                                                              9. Add Preprocessing

                                                                                                                                                                                              Alternative 24: 66.6% accurate, 10.7× speedup?

                                                                                                                                                                                              \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 10^{-123}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\ \end{array} \end{array} \]
                                                                                                                                                                                              t\_m = (fabs.f64 t)
                                                                                                                                                                                              t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                                                              (FPCore (t_s t_m l k)
                                                                                                                                                                                               :precision binary64
                                                                                                                                                                                               (*
                                                                                                                                                                                                t_s
                                                                                                                                                                                                (if (<= k 1e-123)
                                                                                                                                                                                                  (* l (/ l (* t_m (* k (* t_m (* t_m k))))))
                                                                                                                                                                                                  (* l (/ l (* t_m (* t_m (* t_m (* k k)))))))))
                                                                                                                                                                                              t\_m = fabs(t);
                                                                                                                                                                                              t\_s = copysign(1.0, t);
                                                                                                                                                                                              double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                                              	double tmp;
                                                                                                                                                                                              	if (k <= 1e-123) {
                                                                                                                                                                                              		tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))));
                                                                                                                                                                                              	} else {
                                                                                                                                                                                              		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                                                                                                                              	}
                                                                                                                                                                                              	return t_s * tmp;
                                                                                                                                                                                              }
                                                                                                                                                                                              
                                                                                                                                                                                              t\_m = abs(t)
                                                                                                                                                                                              t\_s = copysign(1.0d0, t)
                                                                                                                                                                                              real(8) function code(t_s, t_m, l, k)
                                                                                                                                                                                                  real(8), intent (in) :: t_s
                                                                                                                                                                                                  real(8), intent (in) :: t_m
                                                                                                                                                                                                  real(8), intent (in) :: l
                                                                                                                                                                                                  real(8), intent (in) :: k
                                                                                                                                                                                                  real(8) :: tmp
                                                                                                                                                                                                  if (k <= 1d-123) then
                                                                                                                                                                                                      tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))))
                                                                                                                                                                                                  else
                                                                                                                                                                                                      tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                                                                                                                                                  end if
                                                                                                                                                                                                  code = t_s * tmp
                                                                                                                                                                                              end function
                                                                                                                                                                                              
                                                                                                                                                                                              t\_m = Math.abs(t);
                                                                                                                                                                                              t\_s = Math.copySign(1.0, t);
                                                                                                                                                                                              public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                                              	double tmp;
                                                                                                                                                                                              	if (k <= 1e-123) {
                                                                                                                                                                                              		tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))));
                                                                                                                                                                                              	} else {
                                                                                                                                                                                              		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                                                                                                                              	}
                                                                                                                                                                                              	return t_s * tmp;
                                                                                                                                                                                              }
                                                                                                                                                                                              
                                                                                                                                                                                              t\_m = math.fabs(t)
                                                                                                                                                                                              t\_s = math.copysign(1.0, t)
                                                                                                                                                                                              def code(t_s, t_m, l, k):
                                                                                                                                                                                              	tmp = 0
                                                                                                                                                                                              	if k <= 1e-123:
                                                                                                                                                                                              		tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))))
                                                                                                                                                                                              	else:
                                                                                                                                                                                              		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                                                                                                                                              	return t_s * tmp
                                                                                                                                                                                              
                                                                                                                                                                                              t\_m = abs(t)
                                                                                                                                                                                              t\_s = copysign(1.0, t)
                                                                                                                                                                                              function code(t_s, t_m, l, k)
                                                                                                                                                                                              	tmp = 0.0
                                                                                                                                                                                              	if (k <= 1e-123)
                                                                                                                                                                                              		tmp = Float64(l * Float64(l / Float64(t_m * Float64(k * Float64(t_m * Float64(t_m * k))))));
                                                                                                                                                                                              	else
                                                                                                                                                                                              		tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k))))));
                                                                                                                                                                                              	end
                                                                                                                                                                                              	return Float64(t_s * tmp)
                                                                                                                                                                                              end
                                                                                                                                                                                              
                                                                                                                                                                                              t\_m = abs(t);
                                                                                                                                                                                              t\_s = sign(t) * abs(1.0);
                                                                                                                                                                                              function tmp_2 = code(t_s, t_m, l, k)
                                                                                                                                                                                              	tmp = 0.0;
                                                                                                                                                                                              	if (k <= 1e-123)
                                                                                                                                                                                              		tmp = l * (l / (t_m * (k * (t_m * (t_m * k)))));
                                                                                                                                                                                              	else
                                                                                                                                                                                              		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                                                                                                                              	end
                                                                                                                                                                                              	tmp_2 = t_s * tmp;
                                                                                                                                                                                              end
                                                                                                                                                                                              
                                                                                                                                                                                              t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                                                              t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                                                              code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-123], N[(l * N[(l / N[(t$95$m * N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                                                                                                              
                                                                                                                                                                                              \begin{array}{l}
                                                                                                                                                                                              t\_m = \left|t\right|
                                                                                                                                                                                              \\
                                                                                                                                                                                              t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                                                              
                                                                                                                                                                                              \\
                                                                                                                                                                                              t\_s \cdot \begin{array}{l}
                                                                                                                                                                                              \mathbf{if}\;k \leq 10^{-123}:\\
                                                                                                                                                                                              \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\\
                                                                                                                                                                                              
                                                                                                                                                                                              \mathbf{else}:\\
                                                                                                                                                                                              \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
                                                                                                                                                                                              
                                                                                                                                                                                              
                                                                                                                                                                                              \end{array}
                                                                                                                                                                                              \end{array}
                                                                                                                                                                                              
                                                                                                                                                                                              Derivation
                                                                                                                                                                                              1. Split input into 2 regimes
                                                                                                                                                                                              2. if k < 1.0000000000000001e-123

                                                                                                                                                                                                1. Initial program 59.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 k around 0

                                                                                                                                                                                                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                4. Step-by-step derivation
                                                                                                                                                                                                  1. lower-/.f64N/A

                                                                                                                                                                                                    \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                  2. unpow2N/A

                                                                                                                                                                                                    \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                  3. lower-*.f64N/A

                                                                                                                                                                                                    \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                  4. *-commutativeN/A

                                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                  5. lower-*.f64N/A

                                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                  6. cube-multN/A

                                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                  7. unpow2N/A

                                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                  8. lower-*.f64N/A

                                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                  9. unpow2N/A

                                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                  10. lower-*.f64N/A

                                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                  11. unpow2N/A

                                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                  12. lower-*.f6455.0

                                                                                                                                                                                                    \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                5. Applied rewrites55.0%

                                                                                                                                                                                                  \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                                                6. Step-by-step derivation
                                                                                                                                                                                                  1. Applied rewrites67.3%

                                                                                                                                                                                                    \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                                                  2. Step-by-step derivation
                                                                                                                                                                                                    1. Applied rewrites74.7%

                                                                                                                                                                                                      \[\leadsto \frac{\ell}{t \cdot \left(\left(t \cdot \left(t \cdot k\right)\right) \cdot k\right)} \cdot \ell \]

                                                                                                                                                                                                    if 1.0000000000000001e-123 < k

                                                                                                                                                                                                    1. Initial program 48.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 k around 0

                                                                                                                                                                                                      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                                                                      1. lower-/.f64N/A

                                                                                                                                                                                                        \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                      2. unpow2N/A

                                                                                                                                                                                                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                      3. lower-*.f64N/A

                                                                                                                                                                                                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                      4. *-commutativeN/A

                                                                                                                                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                      5. lower-*.f64N/A

                                                                                                                                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                      6. cube-multN/A

                                                                                                                                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                      7. unpow2N/A

                                                                                                                                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                      8. lower-*.f64N/A

                                                                                                                                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                      9. unpow2N/A

                                                                                                                                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                      10. lower-*.f64N/A

                                                                                                                                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                      11. unpow2N/A

                                                                                                                                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                      12. lower-*.f6449.1

                                                                                                                                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                    5. Applied rewrites49.1%

                                                                                                                                                                                                      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                                                    6. Step-by-step derivation
                                                                                                                                                                                                      1. Applied rewrites56.0%

                                                                                                                                                                                                        \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                                                    7. Recombined 2 regimes into one program.
                                                                                                                                                                                                    8. Final simplification67.5%

                                                                                                                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 10^{-123}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t \cdot \left(k \cdot \left(t \cdot \left(t \cdot k\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)}\\ \end{array} \]
                                                                                                                                                                                                    9. Add Preprocessing

                                                                                                                                                                                                    Alternative 25: 65.3% accurate, 10.7× speedup?

                                                                                                                                                                                                    \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 10^{-123}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot \left(t\_m \cdot k\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\ \end{array} \end{array} \]
                                                                                                                                                                                                    t\_m = (fabs.f64 t)
                                                                                                                                                                                                    t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                                                                    (FPCore (t_s t_m l k)
                                                                                                                                                                                                     :precision binary64
                                                                                                                                                                                                     (*
                                                                                                                                                                                                      t_s
                                                                                                                                                                                                      (if (<= k 1e-123)
                                                                                                                                                                                                        (* l (/ l (* t_m (* t_m (* k (* t_m k))))))
                                                                                                                                                                                                        (* l (/ l (* t_m (* t_m (* t_m (* k k)))))))))
                                                                                                                                                                                                    t\_m = fabs(t);
                                                                                                                                                                                                    t\_s = copysign(1.0, t);
                                                                                                                                                                                                    double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                                                    	double tmp;
                                                                                                                                                                                                    	if (k <= 1e-123) {
                                                                                                                                                                                                    		tmp = l * (l / (t_m * (t_m * (k * (t_m * k)))));
                                                                                                                                                                                                    	} else {
                                                                                                                                                                                                    		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                                                                                                                                    	}
                                                                                                                                                                                                    	return t_s * tmp;
                                                                                                                                                                                                    }
                                                                                                                                                                                                    
                                                                                                                                                                                                    t\_m = abs(t)
                                                                                                                                                                                                    t\_s = copysign(1.0d0, t)
                                                                                                                                                                                                    real(8) function code(t_s, t_m, l, k)
                                                                                                                                                                                                        real(8), intent (in) :: t_s
                                                                                                                                                                                                        real(8), intent (in) :: t_m
                                                                                                                                                                                                        real(8), intent (in) :: l
                                                                                                                                                                                                        real(8), intent (in) :: k
                                                                                                                                                                                                        real(8) :: tmp
                                                                                                                                                                                                        if (k <= 1d-123) then
                                                                                                                                                                                                            tmp = l * (l / (t_m * (t_m * (k * (t_m * k)))))
                                                                                                                                                                                                        else
                                                                                                                                                                                                            tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                                                                                                                                                        end if
                                                                                                                                                                                                        code = t_s * tmp
                                                                                                                                                                                                    end function
                                                                                                                                                                                                    
                                                                                                                                                                                                    t\_m = Math.abs(t);
                                                                                                                                                                                                    t\_s = Math.copySign(1.0, t);
                                                                                                                                                                                                    public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                                                    	double tmp;
                                                                                                                                                                                                    	if (k <= 1e-123) {
                                                                                                                                                                                                    		tmp = l * (l / (t_m * (t_m * (k * (t_m * k)))));
                                                                                                                                                                                                    	} else {
                                                                                                                                                                                                    		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                                                                                                                                    	}
                                                                                                                                                                                                    	return t_s * tmp;
                                                                                                                                                                                                    }
                                                                                                                                                                                                    
                                                                                                                                                                                                    t\_m = math.fabs(t)
                                                                                                                                                                                                    t\_s = math.copysign(1.0, t)
                                                                                                                                                                                                    def code(t_s, t_m, l, k):
                                                                                                                                                                                                    	tmp = 0
                                                                                                                                                                                                    	if k <= 1e-123:
                                                                                                                                                                                                    		tmp = l * (l / (t_m * (t_m * (k * (t_m * k)))))
                                                                                                                                                                                                    	else:
                                                                                                                                                                                                    		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                                                                                                                                                    	return t_s * tmp
                                                                                                                                                                                                    
                                                                                                                                                                                                    t\_m = abs(t)
                                                                                                                                                                                                    t\_s = copysign(1.0, t)
                                                                                                                                                                                                    function code(t_s, t_m, l, k)
                                                                                                                                                                                                    	tmp = 0.0
                                                                                                                                                                                                    	if (k <= 1e-123)
                                                                                                                                                                                                    		tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(k * Float64(t_m * k))))));
                                                                                                                                                                                                    	else
                                                                                                                                                                                                    		tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k))))));
                                                                                                                                                                                                    	end
                                                                                                                                                                                                    	return Float64(t_s * tmp)
                                                                                                                                                                                                    end
                                                                                                                                                                                                    
                                                                                                                                                                                                    t\_m = abs(t);
                                                                                                                                                                                                    t\_s = sign(t) * abs(1.0);
                                                                                                                                                                                                    function tmp_2 = code(t_s, t_m, l, k)
                                                                                                                                                                                                    	tmp = 0.0;
                                                                                                                                                                                                    	if (k <= 1e-123)
                                                                                                                                                                                                    		tmp = l * (l / (t_m * (t_m * (k * (t_m * k)))));
                                                                                                                                                                                                    	else
                                                                                                                                                                                                    		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                                                                                                                                    	end
                                                                                                                                                                                                    	tmp_2 = t_s * tmp;
                                                                                                                                                                                                    end
                                                                                                                                                                                                    
                                                                                                                                                                                                    t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                                                                    t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                                                                    code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-123], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                                                                                                                    
                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                    t\_m = \left|t\right|
                                                                                                                                                                                                    \\
                                                                                                                                                                                                    t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                                                                    
                                                                                                                                                                                                    \\
                                                                                                                                                                                                    t\_s \cdot \begin{array}{l}
                                                                                                                                                                                                    \mathbf{if}\;k \leq 10^{-123}:\\
                                                                                                                                                                                                    \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot \left(t\_m \cdot k\right)\right)\right)}\\
                                                                                                                                                                                                    
                                                                                                                                                                                                    \mathbf{else}:\\
                                                                                                                                                                                                    \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
                                                                                                                                                                                                    
                                                                                                                                                                                                    
                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                    
                                                                                                                                                                                                    Derivation
                                                                                                                                                                                                    1. Split input into 2 regimes
                                                                                                                                                                                                    2. if k < 1.0000000000000001e-123

                                                                                                                                                                                                      1. Initial program 59.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 k around 0

                                                                                                                                                                                                        \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                      4. Step-by-step derivation
                                                                                                                                                                                                        1. lower-/.f64N/A

                                                                                                                                                                                                          \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                        2. unpow2N/A

                                                                                                                                                                                                          \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                        3. lower-*.f64N/A

                                                                                                                                                                                                          \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                        4. *-commutativeN/A

                                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                        5. lower-*.f64N/A

                                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                        6. cube-multN/A

                                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                        7. unpow2N/A

                                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                        8. lower-*.f64N/A

                                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                        9. unpow2N/A

                                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                        10. lower-*.f64N/A

                                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                        11. unpow2N/A

                                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                        12. lower-*.f6455.0

                                                                                                                                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                      5. Applied rewrites55.0%

                                                                                                                                                                                                        \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                                                      6. Step-by-step derivation
                                                                                                                                                                                                        1. Applied rewrites67.3%

                                                                                                                                                                                                          \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                                                        2. Step-by-step derivation
                                                                                                                                                                                                          1. Applied rewrites69.8%

                                                                                                                                                                                                            \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(t \cdot k\right) \cdot k\right)\right)} \cdot \ell \]

                                                                                                                                                                                                          if 1.0000000000000001e-123 < k

                                                                                                                                                                                                          1. Initial program 48.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 k around 0

                                                                                                                                                                                                            \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                          4. Step-by-step derivation
                                                                                                                                                                                                            1. lower-/.f64N/A

                                                                                                                                                                                                              \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                            2. unpow2N/A

                                                                                                                                                                                                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                            3. lower-*.f64N/A

                                                                                                                                                                                                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                            4. *-commutativeN/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                            5. lower-*.f64N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                            6. cube-multN/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                            7. unpow2N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                            8. lower-*.f64N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                            9. unpow2N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                            10. lower-*.f64N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                            11. unpow2N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                            12. lower-*.f6449.1

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                          5. Applied rewrites49.1%

                                                                                                                                                                                                            \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                                                          6. Step-by-step derivation
                                                                                                                                                                                                            1. Applied rewrites56.0%

                                                                                                                                                                                                              \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                                                          7. Recombined 2 regimes into one program.
                                                                                                                                                                                                          8. Final simplification64.5%

                                                                                                                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 10^{-123}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t \cdot \left(t \cdot \left(k \cdot \left(t \cdot k\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)}\\ \end{array} \]
                                                                                                                                                                                                          9. Add Preprocessing

                                                                                                                                                                                                          Alternative 26: 61.4% accurate, 12.5× speedup?

                                                                                                                                                                                                          \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\right) \end{array} \]
                                                                                                                                                                                                          t\_m = (fabs.f64 t)
                                                                                                                                                                                                          t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                                                                          (FPCore (t_s t_m l k)
                                                                                                                                                                                                           :precision binary64
                                                                                                                                                                                                           (* t_s (* l (/ l (* t_m (* t_m (* t_m (* k k))))))))
                                                                                                                                                                                                          t\_m = fabs(t);
                                                                                                                                                                                                          t\_s = copysign(1.0, t);
                                                                                                                                                                                                          double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                                                          	return t_s * (l * (l / (t_m * (t_m * (t_m * (k * k))))));
                                                                                                                                                                                                          }
                                                                                                                                                                                                          
                                                                                                                                                                                                          t\_m = abs(t)
                                                                                                                                                                                                          t\_s = copysign(1.0d0, t)
                                                                                                                                                                                                          real(8) function code(t_s, t_m, l, k)
                                                                                                                                                                                                              real(8), intent (in) :: t_s
                                                                                                                                                                                                              real(8), intent (in) :: t_m
                                                                                                                                                                                                              real(8), intent (in) :: l
                                                                                                                                                                                                              real(8), intent (in) :: k
                                                                                                                                                                                                              code = t_s * (l * (l / (t_m * (t_m * (t_m * (k * k))))))
                                                                                                                                                                                                          end function
                                                                                                                                                                                                          
                                                                                                                                                                                                          t\_m = Math.abs(t);
                                                                                                                                                                                                          t\_s = Math.copySign(1.0, t);
                                                                                                                                                                                                          public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                                                                          	return t_s * (l * (l / (t_m * (t_m * (t_m * (k * k))))));
                                                                                                                                                                                                          }
                                                                                                                                                                                                          
                                                                                                                                                                                                          t\_m = math.fabs(t)
                                                                                                                                                                                                          t\_s = math.copysign(1.0, t)
                                                                                                                                                                                                          def code(t_s, t_m, l, k):
                                                                                                                                                                                                          	return t_s * (l * (l / (t_m * (t_m * (t_m * (k * k))))))
                                                                                                                                                                                                          
                                                                                                                                                                                                          t\_m = abs(t)
                                                                                                                                                                                                          t\_s = copysign(1.0, t)
                                                                                                                                                                                                          function code(t_s, t_m, l, k)
                                                                                                                                                                                                          	return Float64(t_s * Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))))
                                                                                                                                                                                                          end
                                                                                                                                                                                                          
                                                                                                                                                                                                          t\_m = abs(t);
                                                                                                                                                                                                          t\_s = sign(t) * abs(1.0);
                                                                                                                                                                                                          function tmp = code(t_s, t_m, l, k)
                                                                                                                                                                                                          	tmp = t_s * (l * (l / (t_m * (t_m * (t_m * (k * k))))));
                                                                                                                                                                                                          end
                                                                                                                                                                                                          
                                                                                                                                                                                                          t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                                                                          t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                                                                          code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                                                                                                                                                          
                                                                                                                                                                                                          \begin{array}{l}
                                                                                                                                                                                                          t\_m = \left|t\right|
                                                                                                                                                                                                          \\
                                                                                                                                                                                                          t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                                                                          
                                                                                                                                                                                                          \\
                                                                                                                                                                                                          t\_s \cdot \left(\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\right)
                                                                                                                                                                                                          \end{array}
                                                                                                                                                                                                          
                                                                                                                                                                                                          Derivation
                                                                                                                                                                                                          1. Initial program 55.6%

                                                                                                                                                                                                            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                                                                                                                                                                                          2. Add Preprocessing
                                                                                                                                                                                                          3. Taylor expanded in k around 0

                                                                                                                                                                                                            \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                          4. Step-by-step derivation
                                                                                                                                                                                                            1. lower-/.f64N/A

                                                                                                                                                                                                              \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                            2. unpow2N/A

                                                                                                                                                                                                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                            3. lower-*.f64N/A

                                                                                                                                                                                                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                                                                                                                                            4. *-commutativeN/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                            5. lower-*.f64N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                                                                                                                                            6. cube-multN/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                            7. unpow2N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{{t}^{2}}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                            8. lower-*.f64N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                                                                                                                                            9. unpow2N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                            10. lower-*.f64N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                                                                                                                                            11. unpow2N/A

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                            12. lower-*.f6452.7

                                                                                                                                                                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                                                                                                                                          5. Applied rewrites52.7%

                                                                                                                                                                                                            \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
                                                                                                                                                                                                          6. Step-by-step derivation
                                                                                                                                                                                                            1. Applied rewrites62.9%

                                                                                                                                                                                                              \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
                                                                                                                                                                                                            2. Final simplification62.9%

                                                                                                                                                                                                              \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \]
                                                                                                                                                                                                            3. Add Preprocessing

                                                                                                                                                                                                            Reproduce

                                                                                                                                                                                                            ?
                                                                                                                                                                                                            herbie shell --seed 2024232 
                                                                                                                                                                                                            (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))))