Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.1% → 91.0%
Time: 19.1s
Alternatives: 17
Speedup: 23.4×

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 17 alternatives:

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

Initial Program: 54.1% accurate, 1.0× speedup?

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

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

Alternative 1: 91.0% accurate, 1.8× speedup?

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

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

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

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


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

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6470.4%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified70.4%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr69.5%

      \[\leadsto \frac{2}{\color{blue}{\frac{k}{\frac{\cos k}{t \cdot \left(0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \cdot \frac{k}{\ell \cdot \ell}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{1}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}\right)\right) \]
      3. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{1 \cdot \frac{k}{\ell}}{\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k} \cdot \ell}}\right)\right) \]
      4. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{\frac{k}{\ell}}{\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \ell}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{k}{\ell}\right), \color{blue}{\left(\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k} \cdot \ell\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \left(\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \ell\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\left(\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}\right), \color{blue}{\ell}\right)\right)\right) \]
    11. Applied egg-rr80.9%

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

    if 5.2e-22 < t < 5.00000000000000018e153

    1. Initial program 60.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. Applied egg-rr96.1%

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

    if 5.00000000000000018e153 < t

    1. Initial program 74.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{\left(\sin k \cdot \left(\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)\right)\right) \cdot \left(t \cdot \left(t \cdot t\right)\right)}{\color{blue}{\ell} \cdot \ell}\right)\right) \]
      2. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{\sin k \cdot \left(\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)\right)}{\ell} \cdot \frac{\left(t \cdot t\right) \cdot t}{\ell}\right)\right) \]
      4. associate-/l*N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{\sin k \cdot \left(\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)\right)}{\ell} \cdot \left(t \cdot t\right)\right), \color{blue}{\left(\frac{t}{\ell}\right)}\right)\right) \]
    6. Applied egg-rr77.7%

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(2 + \frac{k}{\frac{t}{\frac{k}{t}}}\right) \cdot \left(\sin k \cdot \frac{\tan k}{\ell}\right)\right) \cdot t\right), t\right), \mathsf{/.f64}\left(\color{blue}{t}, \ell\right)\right)\right) \]
    8. Applied egg-rr93.6%

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

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

Alternative 2: 78.8% accurate, 1.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k \cdot \tan k\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 4.4 \cdot 10^{-72}:\\ \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot k\right)}\\ \mathbf{elif}\;k \leq 1.3 \cdot 10^{+111}:\\ \;\;\;\;\frac{\frac{2}{\frac{t\_m}{\ell}}}{\frac{t\_2 \cdot \left(2 \cdot \left(t\_m \cdot t\_m\right) + k \cdot k\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{k}{\ell}}{\ell \cdot \frac{\frac{1}{t\_m \cdot t\_2}}{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 (* (sin k) (tan k))))
   (*
    t_s
    (if (<= k 4.4e-72)
      (* (/ l t_m) (/ (/ l t_m) (* k (* t_m k))))
      (if (<= k 1.3e+111)
        (/ (/ 2.0 (/ t_m l)) (/ (* t_2 (+ (* 2.0 (* t_m t_m)) (* k k))) l))
        (/ 2.0 (/ (/ k l) (* l (/ (/ 1.0 (* t_m t_2)) 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 = sin(k) * tan(k);
	double tmp;
	if (k <= 4.4e-72) {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	} else if (k <= 1.3e+111) {
		tmp = (2.0 / (t_m / l)) / ((t_2 * ((2.0 * (t_m * t_m)) + (k * k))) / l);
	} else {
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * t_2)) / 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) :: t_2
    real(8) :: tmp
    t_2 = sin(k) * tan(k)
    if (k <= 4.4d-72) then
        tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)))
    else if (k <= 1.3d+111) then
        tmp = (2.0d0 / (t_m / l)) / ((t_2 * ((2.0d0 * (t_m * t_m)) + (k * k))) / l)
    else
        tmp = 2.0d0 / ((k / l) / (l * ((1.0d0 / (t_m * t_2)) / 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 t_2 = Math.sin(k) * Math.tan(k);
	double tmp;
	if (k <= 4.4e-72) {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	} else if (k <= 1.3e+111) {
		tmp = (2.0 / (t_m / l)) / ((t_2 * ((2.0 * (t_m * t_m)) + (k * k))) / l);
	} else {
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * t_2)) / 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):
	t_2 = math.sin(k) * math.tan(k)
	tmp = 0
	if k <= 4.4e-72:
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)))
	elif k <= 1.3e+111:
		tmp = (2.0 / (t_m / l)) / ((t_2 * ((2.0 * (t_m * t_m)) + (k * k))) / l)
	else:
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * t_2)) / 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(sin(k) * tan(k))
	tmp = 0.0
	if (k <= 4.4e-72)
		tmp = Float64(Float64(l / t_m) * Float64(Float64(l / t_m) / Float64(k * Float64(t_m * k))));
	elseif (k <= 1.3e+111)
		tmp = Float64(Float64(2.0 / Float64(t_m / l)) / Float64(Float64(t_2 * Float64(Float64(2.0 * Float64(t_m * t_m)) + Float64(k * k))) / l));
	else
		tmp = Float64(2.0 / Float64(Float64(k / l) / Float64(l * Float64(Float64(1.0 / Float64(t_m * t_2)) / 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)
	t_2 = sin(k) * tan(k);
	tmp = 0.0;
	if (k <= 4.4e-72)
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	elseif (k <= 1.3e+111)
		tmp = (2.0 / (t_m / l)) / ((t_2 * ((2.0 * (t_m * t_m)) + (k * k))) / l);
	else
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * t_2)) / 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_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 4.4e-72], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.3e+111], N[(N[(2.0 / N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$2 * N[(N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k / l), $MachinePrecision] / N[(l * N[(N[(1.0 / N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] / 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 := \sin k \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.4 \cdot 10^{-72}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot k\right)}\\

\mathbf{elif}\;k \leq 1.3 \cdot 10^{+111}:\\
\;\;\;\;\frac{\frac{2}{\frac{t\_m}{\ell}}}{\frac{t\_2 \cdot \left(2 \cdot \left(t\_m \cdot t\_m\right) + k \cdot k\right)}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{k}{\ell}}{\ell \cdot \frac{\frac{1}{t\_m \cdot t\_2}}{k}}}\\


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

    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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6456.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified56.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6469.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr69.9%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6474.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr74.6%

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

    if 4.40000000000000005e-72 < k < 1.2999999999999999e111

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\frac{2 \cdot \left({t}^{2} \cdot {\sin k}^{2}\right)}{\cos k}\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      4. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(2 \cdot {t}^{2}\right) \cdot {\sin k}^{2}\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left({t}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(t \cdot t\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      11. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      12. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right), \mathsf{/.f64}\left(\left({k}^{2} \cdot {\sin k}^{2}\right), \cos k\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
    7. Simplified83.7%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(t, \ell\right)\right), \mathsf{/.f64}\left(\left(\frac{\left(2 \cdot \left(t \cdot t\right)\right) \cdot {\sin k}^{2}}{\cos k} + \frac{\left(k \cdot k\right) \cdot {\sin k}^{2}}{\cos k}\right), \color{blue}{\ell}\right)\right) \]
    9. Applied egg-rr94.6%

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

    if 1.2999999999999999e111 < k

    1. Initial program 37.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6459.3%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified59.3%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr68.2%

      \[\leadsto \frac{2}{\color{blue}{\frac{k}{\frac{\cos k}{t \cdot \left(0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \cdot \frac{k}{\ell \cdot \ell}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{1}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}\right)\right) \]
      3. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{1 \cdot \frac{k}{\ell}}{\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k} \cdot \ell}}\right)\right) \]
      4. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{\frac{k}{\ell}}{\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \ell}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{k}{\ell}\right), \color{blue}{\left(\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k} \cdot \ell\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \left(\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \ell\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\left(\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}\right), \color{blue}{\ell}\right)\right)\right) \]
    11. Applied egg-rr92.6%

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

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

Alternative 3: 78.8% accurate, 1.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 3.2 \cdot 10^{-72}:\\ \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot k\right)}\\ \mathbf{elif}\;k \leq 3.7 \cdot 10^{+148}:\\ \;\;\;\;\frac{\ell}{\left(\sin k \cdot \left(\tan k \cdot \left(2 \cdot \left(t\_m \cdot t\_m\right) + k \cdot k\right)\right)\right) \cdot \frac{t\_m}{2 \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{k}{\ell}}{\ell \cdot \frac{\frac{1}{t\_m \cdot \left(\sin k \cdot \tan 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 (<= k 3.2e-72)
    (* (/ l t_m) (/ (/ l t_m) (* k (* t_m k))))
    (if (<= k 3.7e+148)
      (/
       l
       (*
        (* (sin k) (* (tan k) (+ (* 2.0 (* t_m t_m)) (* k k))))
        (/ t_m (* 2.0 l))))
      (/ 2.0 (/ (/ k l) (* l (/ (/ 1.0 (* t_m (* (sin k) (tan 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 <= 3.2e-72) {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	} else if (k <= 3.7e+148) {
		tmp = l / ((sin(k) * (tan(k) * ((2.0 * (t_m * t_m)) + (k * k)))) * (t_m / (2.0 * l)));
	} else {
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * (sin(k) * tan(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 <= 3.2d-72) then
        tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)))
    else if (k <= 3.7d+148) then
        tmp = l / ((sin(k) * (tan(k) * ((2.0d0 * (t_m * t_m)) + (k * k)))) * (t_m / (2.0d0 * l)))
    else
        tmp = 2.0d0 / ((k / l) / (l * ((1.0d0 / (t_m * (sin(k) * tan(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 <= 3.2e-72) {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	} else if (k <= 3.7e+148) {
		tmp = l / ((Math.sin(k) * (Math.tan(k) * ((2.0 * (t_m * t_m)) + (k * k)))) * (t_m / (2.0 * l)));
	} else {
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * (Math.sin(k) * Math.tan(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 <= 3.2e-72:
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)))
	elif k <= 3.7e+148:
		tmp = l / ((math.sin(k) * (math.tan(k) * ((2.0 * (t_m * t_m)) + (k * k)))) * (t_m / (2.0 * l)))
	else:
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * (math.sin(k) * math.tan(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 <= 3.2e-72)
		tmp = Float64(Float64(l / t_m) * Float64(Float64(l / t_m) / Float64(k * Float64(t_m * k))));
	elseif (k <= 3.7e+148)
		tmp = Float64(l / Float64(Float64(sin(k) * Float64(tan(k) * Float64(Float64(2.0 * Float64(t_m * t_m)) + Float64(k * k)))) * Float64(t_m / Float64(2.0 * l))));
	else
		tmp = Float64(2.0 / Float64(Float64(k / l) / Float64(l * Float64(Float64(1.0 / Float64(t_m * Float64(sin(k) * tan(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 <= 3.2e-72)
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	elseif (k <= 3.7e+148)
		tmp = l / ((sin(k) * (tan(k) * ((2.0 * (t_m * t_m)) + (k * k)))) * (t_m / (2.0 * l)));
	else
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * (sin(k) * tan(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, 3.2e-72], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.7e+148], N[(l / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k / l), $MachinePrecision] / N[(l * N[(N[(1.0 / N[(t$95$m * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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


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

    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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6456.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified56.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6469.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr69.9%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6474.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr74.6%

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

    if 3.19999999999999999e-72 < k < 3.7000000000000002e148

    1. Initial program 44.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\frac{2 \cdot \left({t}^{2} \cdot {\sin k}^{2}\right)}{\cos k}\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      4. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(2 \cdot {t}^{2}\right) \cdot {\sin k}^{2}\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left({t}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(t \cdot t\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      11. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      12. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right), \mathsf{/.f64}\left(\left({k}^{2} \cdot {\sin k}^{2}\right), \cos k\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
    7. Simplified77.9%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(t, \ell\right)\right), \mathsf{/.f64}\left(\left(\frac{\left(2 \cdot \left(t \cdot t\right)\right) \cdot {\sin k}^{2}}{\cos k} + \frac{\left(k \cdot k\right) \cdot {\sin k}^{2}}{\cos k}\right), \color{blue}{\ell}\right)\right) \]
    9. Applied egg-rr93.6%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\ell, \color{blue}{\left(\frac{\left(\sin k \cdot \tan k\right) \cdot \left(2 \cdot \left(t \cdot t\right) + k \cdot k\right)}{\frac{2}{\frac{t}{\ell}}}\right)}\right) \]
      6. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\ell, \left(\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 \cdot \left(t \cdot t\right) + k \cdot k\right)\right) \cdot \color{blue}{\frac{1}{\frac{2}{\frac{t}{\ell}}}}\right)\right) \]
      7. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 \cdot \left(t \cdot t\right) + k \cdot k\right)\right), \color{blue}{\left(\frac{\frac{t}{\ell}}{2}\right)}\right)\right) \]
    11. Applied egg-rr93.6%

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

    if 3.7000000000000002e148 < k

    1. Initial program 43.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6460.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified60.6%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr72.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{k}{\frac{\cos k}{t \cdot \left(0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \cdot \frac{k}{\ell \cdot \ell}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{1}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}\right)\right) \]
      3. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{1 \cdot \frac{k}{\ell}}{\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k} \cdot \ell}}\right)\right) \]
      4. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{\frac{k}{\ell}}{\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \ell}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{k}{\ell}\right), \color{blue}{\left(\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k} \cdot \ell\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \left(\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \ell\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\left(\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}\right), \color{blue}{\ell}\right)\right)\right) \]
    11. Applied egg-rr93.1%

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

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

Alternative 4: 78.7% accurate, 1.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k \cdot \tan k\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.7 \cdot 10^{-72}:\\ \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot k\right)}\\ \mathbf{elif}\;k \leq 3.5 \cdot 10^{+111}:\\ \;\;\;\;\frac{2}{\frac{\frac{t\_2 \cdot \left(2 \cdot \left(t\_m \cdot t\_m\right) + k \cdot k\right)}{\frac{\ell}{t\_m}}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{k}{\ell}}{\ell \cdot \frac{\frac{1}{t\_m \cdot t\_2}}{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 (* (sin k) (tan k))))
   (*
    t_s
    (if (<= k 2.7e-72)
      (* (/ l t_m) (/ (/ l t_m) (* k (* t_m k))))
      (if (<= k 3.5e+111)
        (/ 2.0 (/ (/ (* t_2 (+ (* 2.0 (* t_m t_m)) (* k k))) (/ l t_m)) l))
        (/ 2.0 (/ (/ k l) (* l (/ (/ 1.0 (* t_m t_2)) 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 = sin(k) * tan(k);
	double tmp;
	if (k <= 2.7e-72) {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	} else if (k <= 3.5e+111) {
		tmp = 2.0 / (((t_2 * ((2.0 * (t_m * t_m)) + (k * k))) / (l / t_m)) / l);
	} else {
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * t_2)) / 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) :: t_2
    real(8) :: tmp
    t_2 = sin(k) * tan(k)
    if (k <= 2.7d-72) then
        tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)))
    else if (k <= 3.5d+111) then
        tmp = 2.0d0 / (((t_2 * ((2.0d0 * (t_m * t_m)) + (k * k))) / (l / t_m)) / l)
    else
        tmp = 2.0d0 / ((k / l) / (l * ((1.0d0 / (t_m * t_2)) / 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 t_2 = Math.sin(k) * Math.tan(k);
	double tmp;
	if (k <= 2.7e-72) {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	} else if (k <= 3.5e+111) {
		tmp = 2.0 / (((t_2 * ((2.0 * (t_m * t_m)) + (k * k))) / (l / t_m)) / l);
	} else {
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * t_2)) / 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):
	t_2 = math.sin(k) * math.tan(k)
	tmp = 0
	if k <= 2.7e-72:
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)))
	elif k <= 3.5e+111:
		tmp = 2.0 / (((t_2 * ((2.0 * (t_m * t_m)) + (k * k))) / (l / t_m)) / l)
	else:
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * t_2)) / 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(sin(k) * tan(k))
	tmp = 0.0
	if (k <= 2.7e-72)
		tmp = Float64(Float64(l / t_m) * Float64(Float64(l / t_m) / Float64(k * Float64(t_m * k))));
	elseif (k <= 3.5e+111)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_2 * Float64(Float64(2.0 * Float64(t_m * t_m)) + Float64(k * k))) / Float64(l / t_m)) / l));
	else
		tmp = Float64(2.0 / Float64(Float64(k / l) / Float64(l * Float64(Float64(1.0 / Float64(t_m * t_2)) / 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)
	t_2 = sin(k) * tan(k);
	tmp = 0.0;
	if (k <= 2.7e-72)
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	elseif (k <= 3.5e+111)
		tmp = 2.0 / (((t_2 * ((2.0 * (t_m * t_m)) + (k * k))) / (l / t_m)) / l);
	else
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * t_2)) / 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_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 2.7e-72], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.5e+111], N[(2.0 / N[(N[(N[(t$95$2 * N[(N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k / l), $MachinePrecision] / N[(l * N[(N[(1.0 / N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] / 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 := \sin k \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.7 \cdot 10^{-72}:\\
\;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot k\right)}\\

\mathbf{elif}\;k \leq 3.5 \cdot 10^{+111}:\\
\;\;\;\;\frac{2}{\frac{\frac{t\_2 \cdot \left(2 \cdot \left(t\_m \cdot t\_m\right) + k \cdot k\right)}{\frac{\ell}{t\_m}}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{k}{\ell}}{\ell \cdot \frac{\frac{1}{t\_m \cdot t\_2}}{k}}}\\


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

    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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6456.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified56.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6469.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr69.9%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6474.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr74.6%

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

    if 2.7e-72 < k < 3.5000000000000002e111

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\frac{2 \cdot \left({t}^{2} \cdot {\sin k}^{2}\right)}{\cos k}\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      4. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(2 \cdot {t}^{2}\right) \cdot {\sin k}^{2}\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left({t}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(t \cdot t\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      11. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      12. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right), \mathsf{/.f64}\left(\left({k}^{2} \cdot {\sin k}^{2}\right), \cos k\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
    7. Simplified83.7%

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{t \cdot \left(\frac{\left(2 \cdot \left(t \cdot t\right)\right) \cdot {\sin k}^{2}}{\cos k} + \frac{\left(k \cdot k\right) \cdot {\sin k}^{2}}{\cos k}\right)}{\ell}\right), \color{blue}{\ell}\right)\right) \]
    9. Applied egg-rr94.6%

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

    if 3.5000000000000002e111 < k

    1. Initial program 37.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6459.3%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified59.3%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr68.2%

      \[\leadsto \frac{2}{\color{blue}{\frac{k}{\frac{\cos k}{t \cdot \left(0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \cdot \frac{k}{\ell \cdot \ell}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{1}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}\right)\right) \]
      3. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{1 \cdot \frac{k}{\ell}}{\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k} \cdot \ell}}\right)\right) \]
      4. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{\frac{k}{\ell}}{\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \ell}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{k}{\ell}\right), \color{blue}{\left(\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k} \cdot \ell\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \left(\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \ell\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\left(\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}\right), \color{blue}{\ell}\right)\right)\right) \]
    11. Applied egg-rr92.6%

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

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

Alternative 5: 76.3% accurate, 1.9× speedup?

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

\mathbf{elif}\;k \leq 7 \cdot 10^{+236}:\\
\;\;\;\;\ell \cdot \frac{\frac{\frac{2}{k}}{t\_2}}{\frac{k}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \frac{k}{\frac{\ell}{\frac{k}{\ell}}}}\\


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

    1. Initial program 62.1%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6460.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified60.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6472.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr72.4%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6476.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr76.6%

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

    if 3.50000000000000024e-8 < k < 6.99999999999999958e236

    1. Initial program 30.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6461.1%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified61.1%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr69.4%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{2}{\frac{k}{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}}}{\frac{k}{\ell}}\right), \color{blue}{\ell}\right) \]
    11. Applied egg-rr89.0%

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

    if 6.99999999999999958e236 < k

    1. Initial program 37.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6462.9%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified62.9%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr69.3%

      \[\leadsto \frac{2}{\color{blue}{\frac{k}{\frac{\cos k}{t \cdot \left(0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \cdot \frac{k}{\ell \cdot \ell}}} \]
    10. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot \frac{k}{\ell \cdot \ell}}{\color{blue}{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}}\right)\right) \]
      3. div-invN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \color{blue}{\frac{1}{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}}\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \frac{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}{\color{blue}{\cos k}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(k \cdot \frac{k}{\ell \cdot \ell}\right), \color{blue}{\left(\frac{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}{\cos k}\right)}\right)\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(k \cdot \frac{1}{\frac{\ell \cdot \ell}{k}}\right), \left(\frac{t \cdot \color{blue}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{\cos k}\right)\right)\right) \]
      7. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\ell \cdot \ell}{k}}\right), \left(\frac{\color{blue}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{\cos k}\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \left(\frac{\ell \cdot \ell}{k}\right)\right), \left(\frac{\color{blue}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{\cos k}\right)\right)\right) \]
      9. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \left(\frac{1}{\frac{\frac{k}{\ell}}{\ell}}\right)\right), \left(\frac{t \cdot \left(\frac{1}{2} + \color{blue}{\frac{-1}{2} \cdot \cos \left(2 \cdot k\right)}\right)}{\cos k}\right)\right)\right) \]
      11. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \left(\frac{\ell}{\frac{k}{\ell}}\right)\right), \left(\frac{t \cdot \color{blue}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{\cos k}\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, \left(\frac{k}{\ell}\right)\right)\right), \left(\frac{t \cdot \color{blue}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{\cos k}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(k, \ell\right)\right)\right), \left(t \cdot \color{blue}{\frac{\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)}{\cos k}}\right)\right)\right) \]
    11. Applied egg-rr99.7%

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

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

Alternative 6: 76.6% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 6.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{k}{\ell}}{\ell \cdot \frac{\frac{1}{t\_m \cdot \left(\sin k \cdot \tan 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 (<= k 6.5e-8)
    (* (/ l t_m) (/ (/ l t_m) (* k (* t_m k))))
    (/ 2.0 (/ (/ k l) (* l (/ (/ 1.0 (* t_m (* (sin k) (tan 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 <= 6.5e-8) {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	} else {
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * (sin(k) * tan(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 <= 6.5d-8) then
        tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)))
    else
        tmp = 2.0d0 / ((k / l) / (l * ((1.0d0 / (t_m * (sin(k) * tan(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 <= 6.5e-8) {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	} else {
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * (Math.sin(k) * Math.tan(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 <= 6.5e-8:
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)))
	else:
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * (math.sin(k) * math.tan(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 <= 6.5e-8)
		tmp = Float64(Float64(l / t_m) * Float64(Float64(l / t_m) / Float64(k * Float64(t_m * k))));
	else
		tmp = Float64(2.0 / Float64(Float64(k / l) / Float64(l * Float64(Float64(1.0 / Float64(t_m * Float64(sin(k) * tan(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 <= 6.5e-8)
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	else
		tmp = 2.0 / ((k / l) / (l * ((1.0 / (t_m * (sin(k) * tan(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, 6.5e-8], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k / l), $MachinePrecision] / N[(l * N[(N[(1.0 / N[(t$95$m * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 6.49999999999999997e-8

    1. Initial program 62.1%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6460.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified60.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6472.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr72.4%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6476.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr76.6%

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

    if 6.49999999999999997e-8 < k

    1. Initial program 32.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6461.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified61.6%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr69.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{k}{\frac{\cos k}{t \cdot \left(0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)\right)}} \cdot \frac{k}{\ell \cdot \ell}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{1}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}\right)\right) \]
      3. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{1 \cdot \frac{k}{\ell}}{\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k} \cdot \ell}}\right)\right) \]
      4. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{\frac{k}{\ell}}{\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \ell}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\left(\frac{k}{\ell}\right), \color{blue}{\left(\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k} \cdot \ell\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \left(\color{blue}{\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}} \cdot \ell\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\left(\frac{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{k}\right), \color{blue}{\ell}\right)\right)\right) \]
    11. Applied egg-rr90.1%

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

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

Alternative 7: 76.6% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.6000000000000001e-8

    1. Initial program 62.1%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6460.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified60.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6472.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr72.4%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6476.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr76.6%

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

    if 1.6000000000000001e-8 < k

    1. Initial program 32.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6461.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified61.6%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr69.4%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{\frac{k}{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}} \cdot k}{\color{blue}{\ell \cdot \ell}}\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{\frac{k}{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}}{\ell} \cdot \color{blue}{\frac{k}{\ell}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{\frac{k}{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}}{\ell}\right), \color{blue}{\left(\frac{k}{\ell}\right)}\right)\right) \]
    11. Applied egg-rr89.4%

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

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

Alternative 8: 76.3% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 2.6000000000000001e-8

    1. Initial program 62.1%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6460.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified60.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6472.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr72.4%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6476.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr76.6%

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

    if 2.6000000000000001e-8 < k

    1. Initial program 32.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6461.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified61.6%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr69.4%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{2}{\frac{k}{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}}}{\frac{k}{\ell}}\right), \color{blue}{\ell}\right) \]
    11. Applied egg-rr87.4%

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

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

Alternative 9: 75.6% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.90000000000000014e-8

    1. Initial program 62.1%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6460.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified60.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6472.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr72.4%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6476.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr76.6%

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

    if 1.90000000000000014e-8 < k

    1. Initial program 32.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6461.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified61.6%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr69.4%

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

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

        \[\leadsto \frac{2}{\frac{k}{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}} \cdot \color{blue}{\frac{1}{\frac{k}{\ell \cdot \ell}}} \]
      3. clear-numN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{2}{\frac{k}{\frac{\cos k}{t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}}\right), \color{blue}{\left(\frac{\ell \cdot \ell}{k}\right)}\right) \]
    11. Applied egg-rr80.7%

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

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

Alternative 10: 75.8% accurate, 3.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}\;\ell \cdot \ell \leq 5 \cdot 10^{-74}:\\ \;\;\;\;\frac{\frac{\frac{\ell}{k}}{\tan k \cdot \left(2 \cdot \left(t\_m \cdot t\_m\right) + k \cdot k\right)}}{\frac{t\_m}{2 \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot k\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= (* l l) 5e-74)
    (/
     (/ (/ l k) (* (tan k) (+ (* 2.0 (* t_m t_m)) (* k k))))
     (/ t_m (* 2.0 l)))
    (* (/ l t_m) (/ (/ l t_m) (* 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 tmp;
	if ((l * l) <= 5e-74) {
		tmp = ((l / k) / (tan(k) * ((2.0 * (t_m * t_m)) + (k * k)))) / (t_m / (2.0 * l));
	} else {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * 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 ((l * l) <= 5d-74) then
        tmp = ((l / k) / (tan(k) * ((2.0d0 * (t_m * t_m)) + (k * k)))) / (t_m / (2.0d0 * l))
    else
        tmp = (l / t_m) * ((l / t_m) / (k * (t_m * 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 ((l * l) <= 5e-74) {
		tmp = ((l / k) / (Math.tan(k) * ((2.0 * (t_m * t_m)) + (k * k)))) / (t_m / (2.0 * l));
	} else {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if (l * l) <= 5e-74:
		tmp = ((l / k) / (math.tan(k) * ((2.0 * (t_m * t_m)) + (k * k)))) / (t_m / (2.0 * l))
	else:
		tmp = (l / t_m) * ((l / t_m) / (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)
	tmp = 0.0
	if (Float64(l * l) <= 5e-74)
		tmp = Float64(Float64(Float64(l / k) / Float64(tan(k) * Float64(Float64(2.0 * Float64(t_m * t_m)) + Float64(k * k)))) / Float64(t_m / Float64(2.0 * l)));
	else
		tmp = Float64(Float64(l / t_m) * Float64(Float64(l / t_m) / Float64(k * Float64(t_m * k))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if ((l * l) <= 5e-74)
		tmp = ((l / k) / (tan(k) * ((2.0 * (t_m * t_m)) + (k * k)))) / (t_m / (2.0 * l));
	else
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 5e-74], N[(N[(N[(l / k), $MachinePrecision] / N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m / N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(k * 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)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 l l) < 4.99999999999999998e-74

    1. Initial program 62.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(\frac{2 \cdot \left({t}^{2} \cdot {\sin k}^{2}\right)}{\cos k}\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      4. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(2 \cdot {t}^{2}\right) \cdot {\sin k}^{2}\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left({t}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(t \cdot t\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      10. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      11. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      12. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right), \left(\frac{{k}^{2} \cdot {\sin k}^{2}}{\cos k}\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right), \mathsf{/.f64}\left(\left({k}^{2} \cdot {\sin k}^{2}\right), \cos k\right)\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right) \]
    7. Simplified78.0%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(t, \ell\right)\right), \mathsf{/.f64}\left(\left(\frac{\left(2 \cdot \left(t \cdot t\right)\right) \cdot {\sin k}^{2}}{\cos k} + \frac{\left(k \cdot k\right) \cdot {\sin k}^{2}}{\cos k}\right), \color{blue}{\ell}\right)\right) \]
    9. Applied egg-rr87.0%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell}{\left(\sin k \cdot \tan k\right) \cdot \left(2 \cdot \left(t \cdot t\right) + k \cdot k\right)}\right), \color{blue}{\left(\frac{\frac{t}{\ell}}{2}\right)}\right) \]
    11. Applied egg-rr97.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(\frac{\ell}{k}\right)}, \mathsf{*.f64}\left(\mathsf{tan.f64}\left(k\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right)\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(2, \ell\right)\right)\right) \]
    13. Step-by-step derivation
      1. /-lowering-/.f6492.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(\mathsf{tan.f64}\left(k\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right)\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(2, \ell\right)\right)\right) \]
    14. Simplified92.5%

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

    if 4.99999999999999998e-74 < (*.f64 l l)

    1. Initial program 49.3%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6454.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified54.4%

      \[\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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6464.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr64.4%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6467.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr67.0%

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

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

Alternative 11: 70.7% accurate, 3.5× 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.9 \cdot 10^{-62}:\\ \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \frac{\frac{t\_m \cdot \left(k \cdot k\right)}{\ell \cdot \ell}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot k\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.9e-62)
    (/ 2.0 (* (* k k) (/ (/ (* t_m (* k k)) (* l l)) (cos k))))
    (* (/ l t_m) (/ (/ l t_m) (* 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 tmp;
	if (t_m <= 4.9e-62) {
		tmp = 2.0 / ((k * k) * (((t_m * (k * k)) / (l * l)) / cos(k)));
	} else {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * 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 <= 4.9d-62) then
        tmp = 2.0d0 / ((k * k) * (((t_m * (k * k)) / (l * l)) / cos(k)))
    else
        tmp = (l / t_m) * ((l / t_m) / (k * (t_m * 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 <= 4.9e-62) {
		tmp = 2.0 / ((k * k) * (((t_m * (k * k)) / (l * l)) / Math.cos(k)));
	} else {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 4.9e-62:
		tmp = 2.0 / ((k * k) * (((t_m * (k * k)) / (l * l)) / math.cos(k)))
	else:
		tmp = (l / t_m) * ((l / t_m) / (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)
	tmp = 0.0
	if (t_m <= 4.9e-62)
		tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(Float64(t_m * Float64(k * k)) / Float64(l * l)) / cos(k))));
	else
		tmp = Float64(Float64(l / t_m) * Float64(Float64(l / t_m) / Float64(k * Float64(t_m * k))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 4.9e-62)
		tmp = 2.0 / ((k * k) * (((t_m * (k * k)) / (l * l)) / cos(k)));
	else
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.9e-62], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(k * 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)

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

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


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

    1. Initial program 50.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6470.9%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified70.9%

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\color{blue}{\left(\frac{{k}^{2} \cdot t}{{\ell}^{2}}\right)}, \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left({k}^{2} \cdot t\right), \left({\ell}^{2}\right)\right), \mathsf{cos.f64}\left(\color{blue}{k}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), t\right), \left({\ell}^{2}\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), t\right), \left({\ell}^{2}\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \left({\ell}^{2}\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \left(\ell \cdot \ell\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
      6. *-lowering-*.f6461.2%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    10. Simplified61.2%

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

    if 4.9000000000000004e-62 < t

    1. Initial program 65.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6461.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified61.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6477.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr77.4%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6480.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr80.5%

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

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

Alternative 12: 73.6% accurate, 21.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.45 \cdot 10^{-66}:\\ \;\;\;\;\frac{\frac{\frac{2}{k \cdot k}}{\frac{k}{\frac{\ell}{k}}}}{\frac{t\_m}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot k\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.45e-66)
    (/ (/ (/ 2.0 (* k k)) (/ k (/ l k))) (/ t_m l))
    (* (/ l t_m) (/ (/ l t_m) (* 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 tmp;
	if (t_m <= 1.45e-66) {
		tmp = ((2.0 / (k * k)) / (k / (l / k))) / (t_m / l);
	} else {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * 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.45d-66) then
        tmp = ((2.0d0 / (k * k)) / (k / (l / k))) / (t_m / l)
    else
        tmp = (l / t_m) * ((l / t_m) / (k * (t_m * 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.45e-66) {
		tmp = ((2.0 / (k * k)) / (k / (l / k))) / (t_m / l);
	} else {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 1.45e-66:
		tmp = ((2.0 / (k * k)) / (k / (l / k))) / (t_m / l)
	else:
		tmp = (l / t_m) * ((l / t_m) / (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)
	tmp = 0.0
	if (t_m <= 1.45e-66)
		tmp = Float64(Float64(Float64(2.0 / Float64(k * k)) / Float64(k / Float64(l / k))) / Float64(t_m / l));
	else
		tmp = Float64(Float64(l / t_m) * Float64(Float64(l / t_m) / Float64(k * Float64(t_m * k))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 1.45e-66)
		tmp = ((2.0 / (k * k)) / (k / (l / k))) / (t_m / l);
	else
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.45e-66], N[(N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m / l), $MachinePrecision]), $MachinePrecision], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(k * 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)

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

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


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

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6470.8%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified70.8%

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \color{blue}{\left(\frac{{k}^{2} \cdot t}{{\ell}^{2}}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\left({k}^{2} \cdot t\right), \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), t\right), \left({\color{blue}{\ell}}^{2}\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), t\right), \left({\ell}^{2}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \left({\ell}^{2}\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
      6. *-lowering-*.f6458.7%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    10. Simplified58.7%

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

        \[\leadsto \frac{\frac{2}{k \cdot k}}{\color{blue}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell}}} \]
      2. times-fracN/A

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

        \[\leadsto \frac{\frac{\frac{2}{k \cdot k}}{\frac{k \cdot k}{\ell}}}{\color{blue}{\frac{t}{\ell}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{2}{k \cdot k}}{\frac{k \cdot k}{\ell}}\right), \color{blue}{\left(\frac{t}{\ell}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{2}{k \cdot k}\right), \left(\frac{k \cdot k}{\ell}\right)\right), \left(\frac{\color{blue}{t}}{\ell}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \left(k \cdot k\right)\right), \left(\frac{k \cdot k}{\ell}\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{k \cdot k}{\ell}\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, k\right)\right), \left(k \cdot \frac{k}{\ell}\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, k\right)\right), \left(k \cdot \frac{1}{\frac{\ell}{k}}\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      10. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{k}{\frac{\ell}{k}}\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(k, \left(\frac{\ell}{k}\right)\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, k\right)\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      13. /-lowering-/.f6460.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, k\right)\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\ell}\right)\right) \]
    12. Applied egg-rr60.1%

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

    if 1.45000000000000006e-66 < t

    1. Initial program 65.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6462.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified62.4%

      \[\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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6477.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr77.3%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6480.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr80.2%

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

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

Alternative 13: 69.3% accurate, 23.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 6.5 \cdot 10^{+64}:\\ \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{k \cdot \left(t\_m \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell \cdot -0.3333333333333333}{k} \cdot \frac{\ell}{t\_m \cdot k}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 6.5e+64)
    (* (/ l t_m) (/ (/ l t_m) (* k (* t_m k))))
    (* (/ (* l -0.3333333333333333) k) (/ l (* t_m k))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 6.5e+64) {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	} else {
		tmp = ((l * -0.3333333333333333) / k) * (l / (t_m * 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 <= 6.5d+64) then
        tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)))
    else
        tmp = ((l * (-0.3333333333333333d0)) / k) * (l / (t_m * 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 <= 6.5e+64) {
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	} else {
		tmp = ((l * -0.3333333333333333) / k) * (l / (t_m * k));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 6.5e+64:
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)))
	else:
		tmp = ((l * -0.3333333333333333) / k) * (l / (t_m * k))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 6.5e+64)
		tmp = Float64(Float64(l / t_m) * Float64(Float64(l / t_m) / Float64(k * Float64(t_m * k))));
	else
		tmp = Float64(Float64(Float64(l * -0.3333333333333333) / k) * Float64(l / Float64(t_m * k)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 6.5e+64)
		tmp = (l / t_m) * ((l / t_m) / (k * (t_m * k)));
	else
		tmp = ((l * -0.3333333333333333) / k) * (l / (t_m * k));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 6.5e+64], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(k * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * -0.3333333333333333), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot -0.3333333333333333}{k} \cdot \frac{\ell}{t\_m \cdot k}\\


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

    1. Initial program 59.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6459.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified59.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6470.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr70.9%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(t \cdot k\right) \cdot \color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f6475.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), k\right)\right)\right) \]
    9. Applied egg-rr75.0%

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

    if 6.50000000000000007e64 < k

    1. Initial program 35.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6461.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified61.6%

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

      \[\leadsto \color{blue}{\frac{2 \cdot \left({k}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\ell}^{2}}{t} - \frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right)\right) + 2 \cdot \frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
    9. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({k}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\ell}^{2}}{t} - \frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right)\right) + 2 \cdot \frac{{\ell}^{2}}{t}\right), \color{blue}{\left({k}^{4}\right)}\right) \]
    10. Simplified12.6%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\left(k \cdot k\right) \cdot \frac{\left(\ell \cdot \ell\right) \cdot -0.16666666666666666}{t} + \frac{\ell \cdot \ell}{t}\right)}{{k}^{4}}} \]
    11. Taylor expanded in k around inf

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \left(\ell \cdot \ell\right)\right), \left({k}^{\color{blue}{2}} \cdot t\right)\right) \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{t}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\left(k \cdot k\right), t\right)\right) \]
      8. *-lowering-*.f6453.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right)\right) \]
    13. Simplified53.6%

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

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

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

        \[\leadsto \frac{\frac{-1}{3} \cdot \ell}{k} \cdot \color{blue}{\frac{\ell}{k \cdot t}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{-1}{3} \cdot \ell}{k}\right), \color{blue}{\left(\frac{\ell}{k \cdot t}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{3} \cdot \ell\right), k\right), \left(\frac{\color{blue}{\ell}}{k \cdot t}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \frac{-1}{3}\right), k\right), \left(\frac{\ell}{k \cdot t}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \frac{-1}{3}\right), k\right), \left(\frac{\ell}{k \cdot t}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \frac{-1}{3}\right), k\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(k \cdot t\right)}\right)\right) \]
      9. *-lowering-*.f6460.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \frac{-1}{3}\right), k\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{t}\right)\right)\right) \]
    15. Applied egg-rr60.0%

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

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

Alternative 14: 64.5% accurate, 23.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 7.5 \cdot 10^{+64}:\\ \;\;\;\;\frac{\ell}{t\_m} \cdot \frac{\frac{\ell}{t\_m}}{t\_m \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell \cdot -0.3333333333333333}{k} \cdot \frac{\ell}{t\_m \cdot k}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 7.5e+64)
    (* (/ l t_m) (/ (/ l t_m) (* t_m (* k k))))
    (* (/ (* l -0.3333333333333333) k) (/ l (* t_m k))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 7.5e+64) {
		tmp = (l / t_m) * ((l / t_m) / (t_m * (k * k)));
	} else {
		tmp = ((l * -0.3333333333333333) / k) * (l / (t_m * 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 <= 7.5d+64) then
        tmp = (l / t_m) * ((l / t_m) / (t_m * (k * k)))
    else
        tmp = ((l * (-0.3333333333333333d0)) / k) * (l / (t_m * 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 <= 7.5e+64) {
		tmp = (l / t_m) * ((l / t_m) / (t_m * (k * k)));
	} else {
		tmp = ((l * -0.3333333333333333) / k) * (l / (t_m * k));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 7.5e+64:
		tmp = (l / t_m) * ((l / t_m) / (t_m * (k * k)))
	else:
		tmp = ((l * -0.3333333333333333) / k) * (l / (t_m * k))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 7.5e+64)
		tmp = Float64(Float64(l / t_m) * Float64(Float64(l / t_m) / Float64(t_m * Float64(k * k))));
	else
		tmp = Float64(Float64(Float64(l * -0.3333333333333333) / k) * Float64(l / Float64(t_m * k)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 7.5e+64)
		tmp = (l / t_m) * ((l / t_m) / (t_m * (k * k)));
	else
		tmp = ((l * -0.3333333333333333) / k) * (l / (t_m * k));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 7.5e+64], N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * -0.3333333333333333), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot -0.3333333333333333}{k} \cdot \frac{\ell}{t\_m \cdot k}\\


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

    1. Initial program 59.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. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6459.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified59.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. associate-*l*N/A

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

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

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

        \[\leadsto \frac{\ell \cdot \frac{\ell}{t}}{t \cdot \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}} \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right)}\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\frac{\ell}{t}}}{t \cdot \left(k \cdot k\right)}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(t \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\color{blue}{t} \cdot \left(k \cdot k\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      11. *-lowering-*.f6470.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr70.9%

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

    if 7.5000000000000005e64 < k

    1. Initial program 35.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6461.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified61.6%

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

      \[\leadsto \color{blue}{\frac{2 \cdot \left({k}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\ell}^{2}}{t} - \frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right)\right) + 2 \cdot \frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
    9. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({k}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\ell}^{2}}{t} - \frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right)\right) + 2 \cdot \frac{{\ell}^{2}}{t}\right), \color{blue}{\left({k}^{4}\right)}\right) \]
    10. Simplified12.6%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\left(k \cdot k\right) \cdot \frac{\left(\ell \cdot \ell\right) \cdot -0.16666666666666666}{t} + \frac{\ell \cdot \ell}{t}\right)}{{k}^{4}}} \]
    11. Taylor expanded in k around inf

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \left(\ell \cdot \ell\right)\right), \left({k}^{\color{blue}{2}} \cdot t\right)\right) \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{t}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\left(k \cdot k\right), t\right)\right) \]
      8. *-lowering-*.f6453.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right)\right) \]
    13. Simplified53.6%

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

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

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

        \[\leadsto \frac{\frac{-1}{3} \cdot \ell}{k} \cdot \color{blue}{\frac{\ell}{k \cdot t}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{-1}{3} \cdot \ell}{k}\right), \color{blue}{\left(\frac{\ell}{k \cdot t}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{3} \cdot \ell\right), k\right), \left(\frac{\color{blue}{\ell}}{k \cdot t}\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \frac{-1}{3}\right), k\right), \left(\frac{\ell}{k \cdot t}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \frac{-1}{3}\right), k\right), \left(\frac{\ell}{k \cdot t}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \frac{-1}{3}\right), k\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(k \cdot t\right)}\right)\right) \]
      9. *-lowering-*.f6460.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \frac{-1}{3}\right), k\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{t}\right)\right)\right) \]
    15. Applied egg-rr60.0%

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

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

Alternative 15: 31.4% accurate, 26.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 32:\\ \;\;\;\;\frac{2}{\frac{t\_m}{\ell \cdot \ell} \cdot -17.142857142857142}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot -0.3333333333333333\right) \cdot \frac{\ell}{k \cdot \left(t\_m \cdot k\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 32.0)
    (/ 2.0 (* (/ t_m (* l l)) -17.142857142857142))
    (* (* l -0.3333333333333333) (/ l (* 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 tmp;
	if (k <= 32.0) {
		tmp = 2.0 / ((t_m / (l * l)) * -17.142857142857142);
	} else {
		tmp = (l * -0.3333333333333333) * (l / (k * (t_m * 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 <= 32.0d0) then
        tmp = 2.0d0 / ((t_m / (l * l)) * (-17.142857142857142d0))
    else
        tmp = (l * (-0.3333333333333333d0)) * (l / (k * (t_m * 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 <= 32.0) {
		tmp = 2.0 / ((t_m / (l * l)) * -17.142857142857142);
	} else {
		tmp = (l * -0.3333333333333333) * (l / (k * (t_m * k)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 32.0:
		tmp = 2.0 / ((t_m / (l * l)) * -17.142857142857142)
	else:
		tmp = (l * -0.3333333333333333) * (l / (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)
	tmp = 0.0
	if (k <= 32.0)
		tmp = Float64(2.0 / Float64(Float64(t_m / Float64(l * l)) * -17.142857142857142));
	else
		tmp = Float64(Float64(l * -0.3333333333333333) * Float64(l / Float64(k * Float64(t_m * k))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 32.0)
		tmp = 2.0 / ((t_m / (l * l)) * -17.142857142857142);
	else
		tmp = (l * -0.3333333333333333) * (l / (k * (t_m * k)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 32.0], N[(2.0 / N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * -17.142857142857142), $MachinePrecision]), $MachinePrecision], N[(N[(l * -0.3333333333333333), $MachinePrecision] * N[(l / N[(k * 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)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 32:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell \cdot \ell} \cdot -17.142857142857142}\\

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


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

    1. Initial program 61.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6467.8%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified67.8%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
      2. un-div-invN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
      5. times-fracN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr62.5%

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \color{blue}{\left(\frac{{k}^{2} \cdot \left(\frac{-7}{120} \cdot \frac{{k}^{2}}{t} - \frac{1}{6} \cdot \frac{1}{t}\right) + \frac{1}{t}}{{k}^{2}}\right)}\right), \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right) \]
    11. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\left({k}^{2} \cdot \left(\frac{-7}{120} \cdot \frac{{k}^{2}}{t} - \frac{1}{6} \cdot \frac{1}{t}\right) + \frac{1}{t}\right), \left({k}^{2}\right)\right)\right), \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right) \]
    12. Simplified43.9%

      \[\leadsto \frac{2}{\frac{k}{\color{blue}{\frac{\frac{1}{t} + \left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{t} \cdot -0.058333333333333334 + \frac{-0.16666666666666666}{t}\right)}{k \cdot k}}} \cdot \frac{k}{\ell \cdot \ell}} \]
    13. Taylor expanded in k around inf

      \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{-120}{7} \cdot \frac{t}{{\ell}^{2}}\right)}\right) \]
    14. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{t}{{\ell}^{2}} \cdot \color{blue}{\frac{-120}{7}}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{t}{{\ell}^{2}}\right), \color{blue}{\frac{-120}{7}}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \frac{-120}{7}\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \frac{-120}{7}\right)\right) \]
      5. *-lowering-*.f6425.4%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \frac{-120}{7}\right)\right) \]
    15. Simplified25.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{t}{\ell \cdot \ell} \cdot -17.142857142857142}} \]

    if 32 < k

    1. Initial program 32.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. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
      5. times-fracN/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
      13. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
      14. cos-lowering-cos.f6461.0%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
    7. Simplified61.0%

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

      \[\leadsto \color{blue}{\frac{2 \cdot \left({k}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\ell}^{2}}{t} - \frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right)\right) + 2 \cdot \frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
    9. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({k}^{2} \cdot \left(\frac{-1}{2} \cdot \frac{{\ell}^{2}}{t} - \frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right)\right) + 2 \cdot \frac{{\ell}^{2}}{t}\right), \color{blue}{\left({k}^{4}\right)}\right) \]
    10. Simplified11.1%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\left(k \cdot k\right) \cdot \frac{\left(\ell \cdot \ell\right) \cdot -0.16666666666666666}{t} + \frac{\ell \cdot \ell}{t}\right)}{{k}^{4}}} \]
    11. Taylor expanded in k around inf

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \left(\ell \cdot \ell\right)\right), \left({k}^{\color{blue}{2}} \cdot t\right)\right) \]
      5. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{t}\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\left(k \cdot k\right), t\right)\right) \]
      8. *-lowering-*.f6446.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{3}, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right)\right) \]
    13. Simplified46.5%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{\left(k \cdot k\right) \cdot t}\right), \color{blue}{\left(\frac{-1}{3} \cdot \ell\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \left(\left(k \cdot k\right) \cdot t\right)\right), \left(\color{blue}{\frac{-1}{3}} \cdot \ell\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \left(k \cdot \left(k \cdot t\right)\right)\right), \left(\frac{-1}{3} \cdot \ell\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \left(k \cdot t\right)\right)\right), \left(\frac{-1}{3} \cdot \ell\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, t\right)\right)\right), \left(\frac{-1}{3} \cdot \ell\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, t\right)\right)\right), \left(\ell \cdot \color{blue}{\frac{-1}{3}}\right)\right) \]
      10. *-lowering-*.f6453.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, t\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\frac{-1}{3}}\right)\right) \]
    15. Applied egg-rr53.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 32:\\ \;\;\;\;\frac{2}{\frac{t}{\ell \cdot \ell} \cdot -17.142857142857142}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot -0.3333333333333333\right) \cdot \frac{\ell}{k \cdot \left(t \cdot k\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 25.7% accurate, 46.8× speedup?

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

\\
t\_s \cdot \frac{2}{\frac{t\_m}{\ell \cdot \ell} \cdot -17.142857142857142}
\end{array}
Derivation
  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. Step-by-step derivation
    1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
    5. times-fracN/A

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
    10. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
    12. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
    13. sin-lowering-sin.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
    14. cos-lowering-cos.f6466.1%

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
  7. Simplified66.1%

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

      \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
    2. un-div-invN/A

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

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

      \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
    5. times-fracN/A

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
  9. Applied egg-rr64.2%

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

    \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \color{blue}{\left(\frac{{k}^{2} \cdot \left(\frac{-7}{120} \cdot \frac{{k}^{2}}{t} - \frac{1}{6} \cdot \frac{1}{t}\right) + \frac{1}{t}}{{k}^{2}}\right)}\right), \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right) \]
  11. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\left({k}^{2} \cdot \left(\frac{-7}{120} \cdot \frac{{k}^{2}}{t} - \frac{1}{6} \cdot \frac{1}{t}\right) + \frac{1}{t}\right), \left({k}^{2}\right)\right)\right), \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right) \]
  12. Simplified33.4%

    \[\leadsto \frac{2}{\frac{k}{\color{blue}{\frac{\frac{1}{t} + \left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{t} \cdot -0.058333333333333334 + \frac{-0.16666666666666666}{t}\right)}{k \cdot k}}} \cdot \frac{k}{\ell \cdot \ell}} \]
  13. Taylor expanded in k around inf

    \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{-120}{7} \cdot \frac{t}{{\ell}^{2}}\right)}\right) \]
  14. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{t}{{\ell}^{2}} \cdot \color{blue}{\frac{-120}{7}}\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{t}{{\ell}^{2}}\right), \color{blue}{\frac{-120}{7}}\right)\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \frac{-120}{7}\right)\right) \]
    4. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \frac{-120}{7}\right)\right) \]
    5. *-lowering-*.f6426.1%

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \frac{-120}{7}\right)\right) \]
  15. Simplified26.1%

    \[\leadsto \frac{2}{\color{blue}{\frac{t}{\ell \cdot \ell} \cdot -17.142857142857142}} \]
  16. Add Preprocessing

Alternative 17: 25.5% accurate, 60.1× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\frac{\ell \cdot \ell}{t\_m} \cdot -0.11666666666666667\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) -0.11666666666666667)))
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) * -0.11666666666666667);
}
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) * (-0.11666666666666667d0))
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) * -0.11666666666666667);
}
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) * -0.11666666666666667)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(Float64(Float64(l * l) / t_m) * -0.11666666666666667))
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) * -0.11666666666666667);
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[(N[(N[(l * l), $MachinePrecision] / t$95$m), $MachinePrecision] * -0.11666666666666667), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\frac{\ell \cdot \ell}{t\_m} \cdot -0.11666666666666667\right)
\end{array}
Derivation
  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. Step-by-step derivation
    1. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}\right)\right)\right) \]
    5. times-fracN/A

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
    10. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({\sin k}^{2}\right)\right), \cos k\right)\right)\right) \]
    12. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\sin k, 2\right)\right), \cos k\right)\right)\right) \]
    13. sin-lowering-sin.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \cos k\right)\right)\right) \]
    14. cos-lowering-cos.f6466.1%

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right), \mathsf{cos.f64}\left(k\right)\right)\right)\right) \]
  7. Simplified66.1%

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

      \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \frac{1}{\color{blue}{\frac{\cos k}{\frac{t}{\ell \cdot \ell} \cdot {\sin k}^{2}}}}\right)\right) \]
    2. un-div-invN/A

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

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

      \[\leadsto \mathsf{/.f64}\left(2, \left(\frac{k \cdot k}{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\left(\ell \cdot \ell\right)}}\right)\right) \]
    5. times-fracN/A

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\frac{k}{\frac{\cos k}{t \cdot {\sin k}^{2}}}\right), \color{blue}{\left(\frac{k}{\ell \cdot \ell}\right)}\right)\right) \]
  9. Applied egg-rr64.2%

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

    \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \color{blue}{\left(\frac{{k}^{2} \cdot \left(\frac{-7}{120} \cdot \frac{{k}^{2}}{t} - \frac{1}{6} \cdot \frac{1}{t}\right) + \frac{1}{t}}{{k}^{2}}\right)}\right), \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right) \]
  11. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\left({k}^{2} \cdot \left(\frac{-7}{120} \cdot \frac{{k}^{2}}{t} - \frac{1}{6} \cdot \frac{1}{t}\right) + \frac{1}{t}\right), \left({k}^{2}\right)\right)\right), \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right) \]
  12. Simplified33.4%

    \[\leadsto \frac{2}{\frac{k}{\color{blue}{\frac{\frac{1}{t} + \left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{t} \cdot -0.058333333333333334 + \frac{-0.16666666666666666}{t}\right)}{k \cdot k}}} \cdot \frac{k}{\ell \cdot \ell}} \]
  13. Taylor expanded in k around inf

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

      \[\leadsto \frac{{\ell}^{2}}{t} \cdot \color{blue}{\frac{-7}{60}} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{{\ell}^{2}}{t}\right), \color{blue}{\frac{-7}{60}}\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({\ell}^{2}\right), t\right), \frac{-7}{60}\right) \]
    4. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \ell\right), t\right), \frac{-7}{60}\right) \]
    5. *-lowering-*.f6425.6%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \frac{-7}{60}\right) \]
  15. Simplified25.6%

    \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{t} \cdot -0.11666666666666667} \]
  16. Add Preprocessing

Reproduce

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