Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.7% → 96.3%
Time: 18.1s
Alternatives: 17
Speedup: 28.1×

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: 35.7% accurate, 1.0× speedup?

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

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

Alternative 1: 96.3% accurate, 1.9× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 6.2 \cdot 10^{-5}:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\cos k\_m}{\frac{k\_m}{\ell}}}{t} \cdot \frac{\ell}{k\_m \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 6.2e-5)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (*
    (/ (/ (cos k_m) (/ k_m l)) t)
    (/ l (* k_m (+ 0.25 (* (cos (* k_m 2.0)) -0.25)))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-5) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = ((cos(k_m) / (k_m / l)) / t) * (l / (k_m * (0.25 + (cos((k_m * 2.0)) * -0.25))));
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 6.2d-5) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else
        tmp = ((cos(k_m) / (k_m / l)) / t) * (l / (k_m * (0.25d0 + (cos((k_m * 2.0d0)) * (-0.25d0)))))
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-5) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = ((Math.cos(k_m) / (k_m / l)) / t) * (l / (k_m * (0.25 + (Math.cos((k_m * 2.0)) * -0.25))));
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 6.2e-5:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	else:
		tmp = ((math.cos(k_m) / (k_m / l)) / t) * (l / (k_m * (0.25 + (math.cos((k_m * 2.0)) * -0.25))))
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 6.2e-5)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	else
		tmp = Float64(Float64(Float64(cos(k_m) / Float64(k_m / l)) / t) * Float64(l / Float64(k_m * Float64(0.25 + Float64(cos(Float64(k_m * 2.0)) * -0.25)))));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 6.2e-5)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	else
		tmp = ((cos(k_m) / (k_m / l)) / t) * (l / (k_m * (0.25 + (cos((k_m * 2.0)) * -0.25))));
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 6.2e-5], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Cos[k$95$m], $MachinePrecision] / N[(k$95$m / l), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(l / N[(k$95$m * N[(0.25 + N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

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

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\cos k\_m}{\frac{k\_m}{\ell}}}{t} \cdot \frac{\ell}{k\_m \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)}\\


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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified70.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6470.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6481.6%

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

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

    if 6.20000000000000027e-5 < k

    1. Initial program 24.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{cos.f64}\left(k\right), \mathsf{/.f64}\left(k, \ell\right)\right), t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(k \cdot 2\right)\right), \frac{-1}{4}\right)\right)\right)\right)\right) \]
      18. *-lowering-*.f6498.9%

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

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

Alternative 2: 96.3% accurate, 1.9× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 6.2 \cdot 10^{-5}:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos k\_m}{\frac{k\_m}{\ell}} \cdot \frac{\frac{\ell}{k\_m}}{t \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 6.2e-5)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (*
    (/ (cos k_m) (/ k_m l))
    (/ (/ l k_m) (* t (+ 0.25 (* (cos (* k_m 2.0)) -0.25)))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-5) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = (cos(k_m) / (k_m / l)) * ((l / k_m) / (t * (0.25 + (cos((k_m * 2.0)) * -0.25))));
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 6.2d-5) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else
        tmp = (cos(k_m) / (k_m / l)) * ((l / k_m) / (t * (0.25d0 + (cos((k_m * 2.0d0)) * (-0.25d0)))))
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-5) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = (Math.cos(k_m) / (k_m / l)) * ((l / k_m) / (t * (0.25 + (Math.cos((k_m * 2.0)) * -0.25))));
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 6.2e-5:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	else:
		tmp = (math.cos(k_m) / (k_m / l)) * ((l / k_m) / (t * (0.25 + (math.cos((k_m * 2.0)) * -0.25))))
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 6.2e-5)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	else
		tmp = Float64(Float64(cos(k_m) / Float64(k_m / l)) * Float64(Float64(l / k_m) / Float64(t * Float64(0.25 + Float64(cos(Float64(k_m * 2.0)) * -0.25)))));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 6.2e-5)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	else
		tmp = (cos(k_m) / (k_m / l)) * ((l / k_m) / (t * (0.25 + (cos((k_m * 2.0)) * -0.25))));
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 6.2e-5], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k$95$m], $MachinePrecision] / N[(k$95$m / l), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k$95$m), $MachinePrecision] / N[(t * N[(0.25 + N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

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

\mathbf{else}:\\
\;\;\;\;\frac{\cos k\_m}{\frac{k\_m}{\ell}} \cdot \frac{\frac{\ell}{k\_m}}{t \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)}\\


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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified70.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6470.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6481.6%

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

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

    if 6.20000000000000027e-5 < k

    1. Initial program 24.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{cos.f64}\left(k\right), \mathsf{/.f64}\left(k, \ell\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(k \cdot 2\right)\right), \frac{-1}{4}\right)\right)\right)\right)\right) \]
      20. *-lowering-*.f6498.9%

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

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

Alternative 3: 93.4% accurate, 1.9× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 6.2 \cdot 10^{-5}:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{k\_m} \cdot \frac{\frac{\ell \cdot \cos k\_m}{t}}{k\_m \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 6.2e-5)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (*
    (/ l k_m)
    (/ (/ (* l (cos k_m)) t) (* k_m (+ 0.25 (* (cos (* k_m 2.0)) -0.25)))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-5) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = (l / k_m) * (((l * cos(k_m)) / t) / (k_m * (0.25 + (cos((k_m * 2.0)) * -0.25))));
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 6.2d-5) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else
        tmp = (l / k_m) * (((l * cos(k_m)) / t) / (k_m * (0.25d0 + (cos((k_m * 2.0d0)) * (-0.25d0)))))
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-5) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = (l / k_m) * (((l * Math.cos(k_m)) / t) / (k_m * (0.25 + (Math.cos((k_m * 2.0)) * -0.25))));
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 6.2e-5:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	else:
		tmp = (l / k_m) * (((l * math.cos(k_m)) / t) / (k_m * (0.25 + (math.cos((k_m * 2.0)) * -0.25))))
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 6.2e-5)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	else
		tmp = Float64(Float64(l / k_m) * Float64(Float64(Float64(l * cos(k_m)) / t) / Float64(k_m * Float64(0.25 + Float64(cos(Float64(k_m * 2.0)) * -0.25)))));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 6.2e-5)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	else
		tmp = (l / k_m) * (((l * cos(k_m)) / t) / (k_m * (0.25 + (cos((k_m * 2.0)) * -0.25))));
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 6.2e-5], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k$95$m), $MachinePrecision] * N[(N[(N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] / N[(k$95$m * N[(0.25 + N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

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

\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k\_m} \cdot \frac{\frac{\ell \cdot \cos k\_m}{t}}{k\_m \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)}\\


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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified70.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6470.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6481.6%

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

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

    if 6.20000000000000027e-5 < k

    1. Initial program 24.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.8% accurate, 1.9× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 6.2 \cdot 10^{-5}:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\cos k\_m}{\frac{k\_m \cdot t}{\ell}}}{k\_m \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 6.2e-5)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (*
    l
    (/
     (/ (cos k_m) (/ (* k_m t) l))
     (* k_m (+ 0.25 (* (cos (* k_m 2.0)) -0.25)))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-5) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = l * ((cos(k_m) / ((k_m * t) / l)) / (k_m * (0.25 + (cos((k_m * 2.0)) * -0.25))));
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 6.2d-5) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else
        tmp = l * ((cos(k_m) / ((k_m * t) / l)) / (k_m * (0.25d0 + (cos((k_m * 2.0d0)) * (-0.25d0)))))
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-5) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = l * ((Math.cos(k_m) / ((k_m * t) / l)) / (k_m * (0.25 + (Math.cos((k_m * 2.0)) * -0.25))));
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 6.2e-5:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	else:
		tmp = l * ((math.cos(k_m) / ((k_m * t) / l)) / (k_m * (0.25 + (math.cos((k_m * 2.0)) * -0.25))))
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 6.2e-5)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	else
		tmp = Float64(l * Float64(Float64(cos(k_m) / Float64(Float64(k_m * t) / l)) / Float64(k_m * Float64(0.25 + Float64(cos(Float64(k_m * 2.0)) * -0.25)))));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 6.2e-5)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	else
		tmp = l * ((cos(k_m) / ((k_m * t) / l)) / (k_m * (0.25 + (cos((k_m * 2.0)) * -0.25))));
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 6.2e-5], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[Cos[k$95$m], $MachinePrecision] / N[(N[(k$95$m * t), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * N[(0.25 + N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

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

\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\cos k\_m}{\frac{k\_m \cdot t}{\ell}}}{k\_m \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)}\\


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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified70.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6470.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6481.6%

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

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

    if 6.20000000000000027e-5 < k

    1. Initial program 24.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 92.8% accurate, 1.9× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 6.2 \cdot 10^{-5}:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\cos k\_m}{\frac{k\_m}{\ell}}}{k\_m \cdot \left(t \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 6.2e-5)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (*
    l
    (/
     (/ (cos k_m) (/ k_m l))
     (* k_m (* t (+ 0.25 (* (cos (* k_m 2.0)) -0.25))))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-5) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = l * ((cos(k_m) / (k_m / l)) / (k_m * (t * (0.25 + (cos((k_m * 2.0)) * -0.25)))));
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 6.2d-5) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else
        tmp = l * ((cos(k_m) / (k_m / l)) / (k_m * (t * (0.25d0 + (cos((k_m * 2.0d0)) * (-0.25d0))))))
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-5) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = l * ((Math.cos(k_m) / (k_m / l)) / (k_m * (t * (0.25 + (Math.cos((k_m * 2.0)) * -0.25)))));
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 6.2e-5:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	else:
		tmp = l * ((math.cos(k_m) / (k_m / l)) / (k_m * (t * (0.25 + (math.cos((k_m * 2.0)) * -0.25)))))
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 6.2e-5)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	else
		tmp = Float64(l * Float64(Float64(cos(k_m) / Float64(k_m / l)) / Float64(k_m * Float64(t * Float64(0.25 + Float64(cos(Float64(k_m * 2.0)) * -0.25))))));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 6.2e-5)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	else
		tmp = l * ((cos(k_m) / (k_m / l)) / (k_m * (t * (0.25 + (cos((k_m * 2.0)) * -0.25)))));
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 6.2e-5], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[Cos[k$95$m], $MachinePrecision] / N[(k$95$m / l), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * N[(t * N[(0.25 + N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

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

\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\cos k\_m}{\frac{k\_m}{\ell}}}{k\_m \cdot \left(t \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)\right)}\\


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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified70.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6470.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6481.6%

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

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

    if 6.20000000000000027e-5 < k

    1. Initial program 24.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 77.5% accurate, 3.2× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 3.4 \cdot 10^{-105}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \frac{\ell}{k\_m \cdot k\_m}}{k\_m}}{t}}{\frac{k\_m}{2}}\\ \mathbf{elif}\;k\_m \leq 4.8 \cdot 10^{+106}:\\ \;\;\;\;\frac{\ell \cdot \cos k\_m}{k\_m} \cdot \frac{\frac{\ell}{t} \cdot \left(2 + \left(k\_m \cdot k\_m\right) \cdot 0.6666666666666666\right)}{k\_m \cdot \left(k\_m \cdot k\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{\frac{t}{\frac{\ell \cdot 2}{k\_m \cdot \left(0.5 + \cos \left(k\_m \cdot 2\right) \cdot -0.5\right)}}}}{\frac{k\_m}{\ell}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 3.4e-105)
   (/ (/ (/ (* l (/ l (* k_m k_m))) k_m) t) (/ k_m 2.0))
   (if (<= k_m 4.8e+106)
     (*
      (/ (* l (cos k_m)) k_m)
      (/
       (* (/ l t) (+ 2.0 (* (* k_m k_m) 0.6666666666666666)))
       (* k_m (* k_m k_m))))
     (/
      (/ 1.0 (/ t (/ (* l 2.0) (* k_m (+ 0.5 (* (cos (* k_m 2.0)) -0.5))))))
      (/ k_m l)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 3.4e-105) {
		tmp = (((l * (l / (k_m * k_m))) / k_m) / t) / (k_m / 2.0);
	} else if (k_m <= 4.8e+106) {
		tmp = ((l * cos(k_m)) / k_m) * (((l / t) * (2.0 + ((k_m * k_m) * 0.6666666666666666))) / (k_m * (k_m * k_m)));
	} else {
		tmp = (1.0 / (t / ((l * 2.0) / (k_m * (0.5 + (cos((k_m * 2.0)) * -0.5)))))) / (k_m / l);
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 3.4d-105) then
        tmp = (((l * (l / (k_m * k_m))) / k_m) / t) / (k_m / 2.0d0)
    else if (k_m <= 4.8d+106) then
        tmp = ((l * cos(k_m)) / k_m) * (((l / t) * (2.0d0 + ((k_m * k_m) * 0.6666666666666666d0))) / (k_m * (k_m * k_m)))
    else
        tmp = (1.0d0 / (t / ((l * 2.0d0) / (k_m * (0.5d0 + (cos((k_m * 2.0d0)) * (-0.5d0))))))) / (k_m / l)
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 3.4e-105) {
		tmp = (((l * (l / (k_m * k_m))) / k_m) / t) / (k_m / 2.0);
	} else if (k_m <= 4.8e+106) {
		tmp = ((l * Math.cos(k_m)) / k_m) * (((l / t) * (2.0 + ((k_m * k_m) * 0.6666666666666666))) / (k_m * (k_m * k_m)));
	} else {
		tmp = (1.0 / (t / ((l * 2.0) / (k_m * (0.5 + (Math.cos((k_m * 2.0)) * -0.5)))))) / (k_m / l);
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 3.4e-105:
		tmp = (((l * (l / (k_m * k_m))) / k_m) / t) / (k_m / 2.0)
	elif k_m <= 4.8e+106:
		tmp = ((l * math.cos(k_m)) / k_m) * (((l / t) * (2.0 + ((k_m * k_m) * 0.6666666666666666))) / (k_m * (k_m * k_m)))
	else:
		tmp = (1.0 / (t / ((l * 2.0) / (k_m * (0.5 + (math.cos((k_m * 2.0)) * -0.5)))))) / (k_m / l)
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 3.4e-105)
		tmp = Float64(Float64(Float64(Float64(l * Float64(l / Float64(k_m * k_m))) / k_m) / t) / Float64(k_m / 2.0));
	elseif (k_m <= 4.8e+106)
		tmp = Float64(Float64(Float64(l * cos(k_m)) / k_m) * Float64(Float64(Float64(l / t) * Float64(2.0 + Float64(Float64(k_m * k_m) * 0.6666666666666666))) / Float64(k_m * Float64(k_m * k_m))));
	else
		tmp = Float64(Float64(1.0 / Float64(t / Float64(Float64(l * 2.0) / Float64(k_m * Float64(0.5 + Float64(cos(Float64(k_m * 2.0)) * -0.5)))))) / Float64(k_m / l));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 3.4e-105)
		tmp = (((l * (l / (k_m * k_m))) / k_m) / t) / (k_m / 2.0);
	elseif (k_m <= 4.8e+106)
		tmp = ((l * cos(k_m)) / k_m) * (((l / t) * (2.0 + ((k_m * k_m) * 0.6666666666666666))) / (k_m * (k_m * k_m)));
	else
		tmp = (1.0 / (t / ((l * 2.0) / (k_m * (0.5 + (cos((k_m * 2.0)) * -0.5)))))) / (k_m / l);
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 3.4e-105], N[(N[(N[(N[(l * N[(l / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k$95$m), $MachinePrecision] / t), $MachinePrecision] / N[(k$95$m / 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 4.8e+106], N[(N[(N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / k$95$m), $MachinePrecision] * N[(N[(N[(l / t), $MachinePrecision] * N[(2.0 + N[(N[(k$95$m * k$95$m), $MachinePrecision] * 0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(t / N[(N[(l * 2.0), $MachinePrecision] / N[(k$95$m * N[(0.5 + N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 3.4 \cdot 10^{-105}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \frac{\ell}{k\_m \cdot k\_m}}{k\_m}}{t}}{\frac{k\_m}{2}}\\

\mathbf{elif}\;k\_m \leq 4.8 \cdot 10^{+106}:\\
\;\;\;\;\frac{\ell \cdot \cos k\_m}{k\_m} \cdot \frac{\frac{\ell}{t} \cdot \left(2 + \left(k\_m \cdot k\_m\right) \cdot 0.6666666666666666\right)}{k\_m \cdot \left(k\_m \cdot k\_m\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\frac{t}{\frac{\ell \cdot 2}{k\_m \cdot \left(0.5 + \cos \left(k\_m \cdot 2\right) \cdot -0.5\right)}}}}{\frac{k\_m}{\ell}}\\


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

    1. Initial program 37.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left(k \cdot k\right)\right)\right), k\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      12. *-lowering-*.f6480.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, k\right)\right)\right), k\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    10. Simplified80.7%

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

    if 3.39999999999999992e-105 < k < 4.8000000000000001e106

    1. Initial program 33.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right), k\right), \mathsf{/.f64}\left(\left({k}^{2} \cdot \left(\frac{2}{3} \cdot \frac{\ell}{t}\right) + 2 \cdot \frac{\ell}{t}\right), \color{blue}{\left({k}^{3}\right)}\right)\right) \]
    10. Simplified77.7%

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

    if 4.8000000000000001e106 < k

    1. Initial program 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    8. Simplified52.5%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\sin k \cdot \sin k\right)\right)}}{\frac{k}{\ell}} \]
      7. sqr-sin-aN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      8. cancel-sign-sub-invN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      9. metadata-evalN/A

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

        \[\leadsto \frac{\frac{2 \cdot \ell}{\left(k \cdot t\right) \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{\frac{k}{\ell}} \]
      11. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell \cdot 2}{k \cdot t}}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(k \cdot 2\right)}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      4. cancel-sign-sub-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell \cdot 2}{k \cdot t}}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      6. sqr-sin-aN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left({\sin k}^{2} \cdot k\right)\right)\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      17. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{*.f64}\left(k, \left({\sin k}^{2}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
    12. Applied egg-rr58.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.4 \cdot 10^{-105}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{k}}{t}}{\frac{k}{2}}\\ \mathbf{elif}\;k \leq 4.8 \cdot 10^{+106}:\\ \;\;\;\;\frac{\ell \cdot \cos k}{k} \cdot \frac{\frac{\ell}{t} \cdot \left(2 + \left(k \cdot k\right) \cdot 0.6666666666666666\right)}{k \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{\frac{t}{\frac{\ell \cdot 2}{k \cdot \left(0.5 + \cos \left(k \cdot 2\right) \cdot -0.5\right)}}}}{\frac{k}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 76.2% accurate, 3.2× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 136000000000:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{elif}\;k\_m \leq 2.9 \cdot 10^{+104}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\_m\right)}{k\_m \cdot t}}{k\_m \cdot k\_m}}{\frac{k\_m}{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{\frac{t}{\frac{\ell \cdot 2}{k\_m \cdot \left(0.5 + \cos \left(k\_m \cdot 2\right) \cdot -0.5\right)}}}}{\frac{k\_m}{\ell}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 136000000000.0)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (if (<= k_m 2.9e+104)
     (/ (/ (/ (* l (* l (cos k_m))) (* k_m t)) (* k_m k_m)) (/ k_m 2.0))
     (/
      (/ 1.0 (/ t (/ (* l 2.0) (* k_m (+ 0.5 (* (cos (* k_m 2.0)) -0.5))))))
      (/ k_m l)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 136000000000.0) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else if (k_m <= 2.9e+104) {
		tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	} else {
		tmp = (1.0 / (t / ((l * 2.0) / (k_m * (0.5 + (cos((k_m * 2.0)) * -0.5)))))) / (k_m / l);
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 136000000000.0d0) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else if (k_m <= 2.9d+104) then
        tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0d0)
    else
        tmp = (1.0d0 / (t / ((l * 2.0d0) / (k_m * (0.5d0 + (cos((k_m * 2.0d0)) * (-0.5d0))))))) / (k_m / l)
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 136000000000.0) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else if (k_m <= 2.9e+104) {
		tmp = (((l * (l * Math.cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	} else {
		tmp = (1.0 / (t / ((l * 2.0) / (k_m * (0.5 + (Math.cos((k_m * 2.0)) * -0.5)))))) / (k_m / l);
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 136000000000.0:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	elif k_m <= 2.9e+104:
		tmp = (((l * (l * math.cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0)
	else:
		tmp = (1.0 / (t / ((l * 2.0) / (k_m * (0.5 + (math.cos((k_m * 2.0)) * -0.5)))))) / (k_m / l)
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 136000000000.0)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	elseif (k_m <= 2.9e+104)
		tmp = Float64(Float64(Float64(Float64(l * Float64(l * cos(k_m))) / Float64(k_m * t)) / Float64(k_m * k_m)) / Float64(k_m / 2.0));
	else
		tmp = Float64(Float64(1.0 / Float64(t / Float64(Float64(l * 2.0) / Float64(k_m * Float64(0.5 + Float64(cos(Float64(k_m * 2.0)) * -0.5)))))) / Float64(k_m / l));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 136000000000.0)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	elseif (k_m <= 2.9e+104)
		tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	else
		tmp = (1.0 / (t / ((l * 2.0) / (k_m * (0.5 + (cos((k_m * 2.0)) * -0.5)))))) / (k_m / l);
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 136000000000.0], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 2.9e+104], N[(N[(N[(N[(l * N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] / N[(k$95$m / 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(t / N[(N[(l * 2.0), $MachinePrecision] / N[(k$95$m * N[(0.5 + N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 136000000000:\\
\;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\

\mathbf{elif}\;k\_m \leq 2.9 \cdot 10^{+104}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\_m\right)}{k\_m \cdot t}}{k\_m \cdot k\_m}}{\frac{k\_m}{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\frac{t}{\frac{\ell \cdot 2}{k\_m \cdot \left(0.5 + \cos \left(k\_m \cdot 2\right) \cdot -0.5\right)}}}}{\frac{k\_m}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 1.36e11

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified69.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6470.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.36e11 < k < 2.8999999999999998e104

    1. Initial program 26.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \color{blue}{\left({k}^{2}\right)}\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    10. Simplified50.9%

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

    if 2.8999999999999998e104 < k

    1. Initial program 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    8. Simplified52.5%

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

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

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

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

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

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

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\sin k \cdot \sin k\right)\right)}}{\frac{k}{\ell}} \]
      7. sqr-sin-aN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      8. cancel-sign-sub-invN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      9. metadata-evalN/A

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

        \[\leadsto \frac{\frac{2 \cdot \ell}{\left(k \cdot t\right) \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{\frac{k}{\ell}} \]
      11. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell \cdot 2}{k \cdot t}}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(k \cdot 2\right)}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      4. cancel-sign-sub-invN/A

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

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell \cdot 2}{k \cdot t}}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      6. sqr-sin-aN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left({\sin k}^{2} \cdot k\right)\right)\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      17. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{*.f64}\left(k, \left({\sin k}^{2}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
    12. Applied egg-rr58.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 136000000000:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}\\ \mathbf{elif}\;k \leq 2.9 \cdot 10^{+104}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{k \cdot k}}{\frac{k}{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{\frac{t}{\frac{\ell \cdot 2}{k \cdot \left(0.5 + \cos \left(k \cdot 2\right) \cdot -0.5\right)}}}}{\frac{k}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 76.2% accurate, 3.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 136000000000:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{elif}\;k\_m \leq 2.9 \cdot 10^{+104}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\_m\right)}{k\_m \cdot t}}{k\_m \cdot k\_m}}{\frac{k\_m}{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{2}{0.5 + \cos \left(k\_m \cdot 2\right) \cdot -0.5}}{\frac{t}{\frac{\ell}{k\_m}}}}{\frac{k\_m}{\ell}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 136000000000.0)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (if (<= k_m 2.9e+104)
     (/ (/ (/ (* l (* l (cos k_m))) (* k_m t)) (* k_m k_m)) (/ k_m 2.0))
     (/
      (/ (/ 2.0 (+ 0.5 (* (cos (* k_m 2.0)) -0.5))) (/ t (/ l k_m)))
      (/ k_m l)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 136000000000.0) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else if (k_m <= 2.9e+104) {
		tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	} else {
		tmp = ((2.0 / (0.5 + (cos((k_m * 2.0)) * -0.5))) / (t / (l / k_m))) / (k_m / l);
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 136000000000.0d0) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else if (k_m <= 2.9d+104) then
        tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0d0)
    else
        tmp = ((2.0d0 / (0.5d0 + (cos((k_m * 2.0d0)) * (-0.5d0)))) / (t / (l / k_m))) / (k_m / l)
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 136000000000.0) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else if (k_m <= 2.9e+104) {
		tmp = (((l * (l * Math.cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	} else {
		tmp = ((2.0 / (0.5 + (Math.cos((k_m * 2.0)) * -0.5))) / (t / (l / k_m))) / (k_m / l);
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 136000000000.0:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	elif k_m <= 2.9e+104:
		tmp = (((l * (l * math.cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0)
	else:
		tmp = ((2.0 / (0.5 + (math.cos((k_m * 2.0)) * -0.5))) / (t / (l / k_m))) / (k_m / l)
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 136000000000.0)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	elseif (k_m <= 2.9e+104)
		tmp = Float64(Float64(Float64(Float64(l * Float64(l * cos(k_m))) / Float64(k_m * t)) / Float64(k_m * k_m)) / Float64(k_m / 2.0));
	else
		tmp = Float64(Float64(Float64(2.0 / Float64(0.5 + Float64(cos(Float64(k_m * 2.0)) * -0.5))) / Float64(t / Float64(l / k_m))) / Float64(k_m / l));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 136000000000.0)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	elseif (k_m <= 2.9e+104)
		tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	else
		tmp = ((2.0 / (0.5 + (cos((k_m * 2.0)) * -0.5))) / (t / (l / k_m))) / (k_m / l);
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 136000000000.0], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 2.9e+104], N[(N[(N[(N[(l * N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] / N[(k$95$m / 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[(0.5 + N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t / N[(l / k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 136000000000:\\
\;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\

\mathbf{elif}\;k\_m \leq 2.9 \cdot 10^{+104}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\_m\right)}{k\_m \cdot t}}{k\_m \cdot k\_m}}{\frac{k\_m}{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{0.5 + \cos \left(k\_m \cdot 2\right) \cdot -0.5}}{\frac{t}{\frac{\ell}{k\_m}}}}{\frac{k\_m}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 1.36e11

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified69.9%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6470.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right) \]
    7. Applied egg-rr70.0%

      \[\leadsto \color{blue}{\frac{2}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \cdot \left(\ell \cdot \ell\right)} \]
    8. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{2 \cdot \left(\ell \cdot \ell\right)}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{t} \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \]
      3. associate-/l*N/A

        \[\leadsto \left(2 \cdot \ell\right) \cdot \color{blue}{\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(2 \cdot \ell\right), \color{blue}{\left(\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot \left(k \cdot k\right)\right)\right)\right)\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(k \cdot \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot k\right)}\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6477.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right)\right)\right) \]
    9. Applied egg-rr77.8%

      \[\leadsto \color{blue}{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    10. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot k\right)\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot k\right)}}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{\color{blue}{k \cdot k}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{k}}{k \cdot t}\right), \color{blue}{\left(k \cdot k\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{k}\right), \left(k \cdot t\right)\right), \left(\color{blue}{k} \cdot k\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \left(k \cdot t\right)\right), \left(k \cdot k\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6480.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    11. Applied egg-rr80.8%

      \[\leadsto \left(\ell \cdot 2\right) \cdot \color{blue}{\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}} \]

    if 1.36e11 < k < 2.8999999999999998e104

    1. Initial program 26.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\color{blue}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({\ell}^{2} \cdot \cos k\right)\right), \color{blue}{\left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2} \cdot \cos k\right)\right), \left(\color{blue}{{k}^{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \cos k\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      10. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(\left(k \cdot k\right) \cdot \left(\color{blue}{t} \cdot {\sin k}^{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \color{blue}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \left(\left(t \cdot {\sin k}^{2}\right) \cdot \color{blue}{k}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\left(t \cdot {\sin k}^{2}\right) \cdot k\right)}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left({\sin k}^{2}\right)}\right)\right)\right)\right) \]
      18. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\sin k, \color{blue}{2}\right)\right)\right)\right)\right) \]
      19. sin-lowering-sin.f6484.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    5. Simplified84.1%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \frac{2}{k} \cdot \color{blue}{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \color{blue}{\frac{2}{k}} \]
      3. clear-numN/A

        \[\leadsto \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \frac{1}{\color{blue}{\frac{k}{2}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}}{\color{blue}{\frac{k}{2}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}\right), \color{blue}{\left(\frac{k}{2}\right)}\right) \]
    7. Applied egg-rr84.6%

      \[\leadsto \color{blue}{\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)}}{\frac{k}{2}}} \]
    8. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \color{blue}{\left({k}^{2}\right)}\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      2. *-lowering-*.f6450.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    10. Simplified50.9%

      \[\leadsto \frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{\color{blue}{k \cdot k}}}{\frac{k}{2}} \]

    if 2.8999999999999998e104 < k

    1. Initial program 21.8%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\color{blue}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({\ell}^{2} \cdot \cos k\right)\right), \color{blue}{\left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2} \cdot \cos k\right)\right), \left(\color{blue}{{k}^{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \cos k\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      10. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(\left(k \cdot k\right) \cdot \left(\color{blue}{t} \cdot {\sin k}^{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \color{blue}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \left(\left(t \cdot {\sin k}^{2}\right) \cdot \color{blue}{k}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\left(t \cdot {\sin k}^{2}\right) \cdot k\right)}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left({\sin k}^{2}\right)}\right)\right)\right)\right) \]
      18. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\sin k, \color{blue}{2}\right)\right)\right)\right)\right) \]
      19. sin-lowering-sin.f6465.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    5. Simplified65.1%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
    6. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(2 \cdot {\ell}^{2}\right)}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2}\right)\right), \mathsf{*.f64}\left(\color{blue}{k}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \ell\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f6452.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    8. Simplified52.5%

      \[\leadsto \frac{\color{blue}{2 \cdot \left(\ell \cdot \ell\right)}}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{k} \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right) \cdot \color{blue}{k}} \]
      3. times-fracN/A

        \[\leadsto \frac{2 \cdot \ell}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \color{blue}{\frac{\ell}{k}} \]
      4. clear-numN/A

        \[\leadsto \frac{2 \cdot \ell}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
      5. un-div-invN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot {\sin k}^{2}\right)}}{\color{blue}{\frac{k}{\ell}}} \]
      6. unpow2N/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\sin k \cdot \sin k\right)\right)}}{\frac{k}{\ell}} \]
      7. sqr-sin-aN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      8. cancel-sign-sub-invN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      9. metadata-evalN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      10. associate-*l*N/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{\left(k \cdot t\right) \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{\frac{k}{\ell}} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}}{\frac{k}{\ell}} \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2 \cdot \ell}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}\right), \color{blue}{\left(\frac{k}{\ell}\right)}\right) \]
    10. Applied egg-rr57.5%

      \[\leadsto \color{blue}{\frac{\frac{\ell \cdot 2}{\left(0.5 + -0.5 \cdot \cos \left(k \cdot 2\right)\right) \cdot \left(k \cdot t\right)}}{\frac{k}{\ell}}} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell \cdot 2}{\left(k \cdot t\right) \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(k \cdot 2\right)\right)}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell \cdot 2}{k \cdot t}}{\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(k \cdot 2\right)}\right), \mathsf{/.f64}\left(\color{blue}{k}, \ell\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell \cdot 2}{k \cdot t}}{\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(k \cdot 2\right)}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      4. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell \cdot 2}{k \cdot t}}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k \cdot 2\right)}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell \cdot 2}{k \cdot t}}{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      6. sqr-sin-aN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell \cdot 2}{k \cdot t}}{\sin k \cdot \sin k}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell \cdot 2}{k \cdot t}}{{\sin k}^{2}}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell \cdot 2}{\left(k \cdot t\right) \cdot {\sin k}^{2}}\right), \mathsf{/.f64}\left(\color{blue}{k}, \ell\right)\right) \]
      9. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell}{k \cdot t} \cdot \frac{2}{{\sin k}^{2}}\right), \mathsf{/.f64}\left(\color{blue}{k}, \ell\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2}{{\sin k}^{2}} \cdot \frac{\ell}{k \cdot t}\right), \mathsf{/.f64}\left(\color{blue}{k}, \ell\right)\right) \]
      11. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2}{{\sin k}^{2}} \cdot \frac{1}{\frac{k \cdot t}{\ell}}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      12. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{2}{{\sin k}^{2}}}{\frac{k \cdot t}{\ell}}\right), \mathsf{/.f64}\left(\color{blue}{k}, \ell\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{2}{{\sin k}^{2}}\right), \left(\frac{k \cdot t}{\ell}\right)\right), \mathsf{/.f64}\left(\color{blue}{k}, \ell\right)\right) \]
    12. Applied egg-rr58.8%

      \[\leadsto \frac{\color{blue}{\frac{\frac{2}{0.5 + -0.5 \cdot \cos \left(k \cdot 2\right)}}{\frac{t}{\frac{\ell}{k}}}}}{\frac{k}{\ell}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 136000000000:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}\\ \mathbf{elif}\;k \leq 2.9 \cdot 10^{+104}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{k \cdot k}}{\frac{k}{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{2}{0.5 + \cos \left(k \cdot 2\right) \cdot -0.5}}{\frac{t}{\frac{\ell}{k}}}}{\frac{k}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 76.0% accurate, 3.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 70000000000:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{elif}\;k\_m \leq 2.9 \cdot 10^{+104}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\_m\right)}{k\_m \cdot t}}{k\_m \cdot k\_m}}{\frac{k\_m}{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{t} \cdot \frac{2}{k\_m \cdot \left(0.5 + \cos \left(k\_m \cdot 2\right) \cdot -0.5\right)}}{\frac{k\_m}{\ell}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 70000000000.0)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (if (<= k_m 2.9e+104)
     (/ (/ (/ (* l (* l (cos k_m))) (* k_m t)) (* k_m k_m)) (/ k_m 2.0))
     (/
      (* (/ l t) (/ 2.0 (* k_m (+ 0.5 (* (cos (* k_m 2.0)) -0.5)))))
      (/ k_m l)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 70000000000.0) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else if (k_m <= 2.9e+104) {
		tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	} else {
		tmp = ((l / t) * (2.0 / (k_m * (0.5 + (cos((k_m * 2.0)) * -0.5))))) / (k_m / l);
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 70000000000.0d0) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else if (k_m <= 2.9d+104) then
        tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0d0)
    else
        tmp = ((l / t) * (2.0d0 / (k_m * (0.5d0 + (cos((k_m * 2.0d0)) * (-0.5d0)))))) / (k_m / l)
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 70000000000.0) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else if (k_m <= 2.9e+104) {
		tmp = (((l * (l * Math.cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	} else {
		tmp = ((l / t) * (2.0 / (k_m * (0.5 + (Math.cos((k_m * 2.0)) * -0.5))))) / (k_m / l);
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 70000000000.0:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	elif k_m <= 2.9e+104:
		tmp = (((l * (l * math.cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0)
	else:
		tmp = ((l / t) * (2.0 / (k_m * (0.5 + (math.cos((k_m * 2.0)) * -0.5))))) / (k_m / l)
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 70000000000.0)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	elseif (k_m <= 2.9e+104)
		tmp = Float64(Float64(Float64(Float64(l * Float64(l * cos(k_m))) / Float64(k_m * t)) / Float64(k_m * k_m)) / Float64(k_m / 2.0));
	else
		tmp = Float64(Float64(Float64(l / t) * Float64(2.0 / Float64(k_m * Float64(0.5 + Float64(cos(Float64(k_m * 2.0)) * -0.5))))) / Float64(k_m / l));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 70000000000.0)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	elseif (k_m <= 2.9e+104)
		tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	else
		tmp = ((l / t) * (2.0 / (k_m * (0.5 + (cos((k_m * 2.0)) * -0.5))))) / (k_m / l);
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 70000000000.0], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 2.9e+104], N[(N[(N[(N[(l * N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] / N[(k$95$m / 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / t), $MachinePrecision] * N[(2.0 / N[(k$95$m * N[(0.5 + N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 70000000000:\\
\;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\

\mathbf{elif}\;k\_m \leq 2.9 \cdot 10^{+104}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\_m\right)}{k\_m \cdot t}}{k\_m \cdot k\_m}}{\frac{k\_m}{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t} \cdot \frac{2}{k\_m \cdot \left(0.5 + \cos \left(k\_m \cdot 2\right) \cdot -0.5\right)}}{\frac{k\_m}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 7e10

    1. Initial program 37.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 \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{{k}^{4} \cdot t}{{\ell}^{2}}\right)}\right) \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left({k}^{4} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left(\frac{t}{{\ell}^{2}}\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot {k}^{2}\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left({k}^{2}\right)\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(k \cdot k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f6469.9%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified69.9%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\color{blue}{\ell \cdot \ell}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t} \cdot \color{blue}{\left(\ell \cdot \ell\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), \color{blue}{\left(\ell \cdot \ell\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right), \left(\color{blue}{\ell} \cdot \ell\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6470.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right) \]
    7. Applied egg-rr70.0%

      \[\leadsto \color{blue}{\frac{2}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \cdot \left(\ell \cdot \ell\right)} \]
    8. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{2 \cdot \left(\ell \cdot \ell\right)}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{t} \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \]
      3. associate-/l*N/A

        \[\leadsto \left(2 \cdot \ell\right) \cdot \color{blue}{\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(2 \cdot \ell\right), \color{blue}{\left(\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot \left(k \cdot k\right)\right)\right)\right)\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(k \cdot \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot k\right)}\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6477.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right)\right)\right) \]
    9. Applied egg-rr77.8%

      \[\leadsto \color{blue}{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    10. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot k\right)\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot k\right)}}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{\color{blue}{k \cdot k}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{k}}{k \cdot t}\right), \color{blue}{\left(k \cdot k\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{k}\right), \left(k \cdot t\right)\right), \left(\color{blue}{k} \cdot k\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \left(k \cdot t\right)\right), \left(k \cdot k\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6480.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    11. Applied egg-rr80.8%

      \[\leadsto \left(\ell \cdot 2\right) \cdot \color{blue}{\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}} \]

    if 7e10 < k < 2.8999999999999998e104

    1. Initial program 26.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\color{blue}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({\ell}^{2} \cdot \cos k\right)\right), \color{blue}{\left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2} \cdot \cos k\right)\right), \left(\color{blue}{{k}^{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \cos k\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      10. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(\left(k \cdot k\right) \cdot \left(\color{blue}{t} \cdot {\sin k}^{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \color{blue}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \left(\left(t \cdot {\sin k}^{2}\right) \cdot \color{blue}{k}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\left(t \cdot {\sin k}^{2}\right) \cdot k\right)}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left({\sin k}^{2}\right)}\right)\right)\right)\right) \]
      18. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\sin k, \color{blue}{2}\right)\right)\right)\right)\right) \]
      19. sin-lowering-sin.f6484.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    5. Simplified84.1%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \frac{2}{k} \cdot \color{blue}{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \color{blue}{\frac{2}{k}} \]
      3. clear-numN/A

        \[\leadsto \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \frac{1}{\color{blue}{\frac{k}{2}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}}{\color{blue}{\frac{k}{2}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}\right), \color{blue}{\left(\frac{k}{2}\right)}\right) \]
    7. Applied egg-rr84.6%

      \[\leadsto \color{blue}{\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)}}{\frac{k}{2}}} \]
    8. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \color{blue}{\left({k}^{2}\right)}\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      2. *-lowering-*.f6450.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    10. Simplified50.9%

      \[\leadsto \frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{\color{blue}{k \cdot k}}}{\frac{k}{2}} \]

    if 2.8999999999999998e104 < k

    1. Initial program 21.8%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\color{blue}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({\ell}^{2} \cdot \cos k\right)\right), \color{blue}{\left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2} \cdot \cos k\right)\right), \left(\color{blue}{{k}^{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \cos k\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      10. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(\left(k \cdot k\right) \cdot \left(\color{blue}{t} \cdot {\sin k}^{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \color{blue}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \left(\left(t \cdot {\sin k}^{2}\right) \cdot \color{blue}{k}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\left(t \cdot {\sin k}^{2}\right) \cdot k\right)}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left({\sin k}^{2}\right)}\right)\right)\right)\right) \]
      18. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\sin k, \color{blue}{2}\right)\right)\right)\right)\right) \]
      19. sin-lowering-sin.f6465.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    5. Simplified65.1%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
    6. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(2 \cdot {\ell}^{2}\right)}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2}\right)\right), \mathsf{*.f64}\left(\color{blue}{k}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \ell\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f6452.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    8. Simplified52.5%

      \[\leadsto \frac{\color{blue}{2 \cdot \left(\ell \cdot \ell\right)}}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{k} \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right) \cdot \color{blue}{k}} \]
      3. times-fracN/A

        \[\leadsto \frac{2 \cdot \ell}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \color{blue}{\frac{\ell}{k}} \]
      4. clear-numN/A

        \[\leadsto \frac{2 \cdot \ell}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
      5. un-div-invN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot {\sin k}^{2}\right)}}{\color{blue}{\frac{k}{\ell}}} \]
      6. unpow2N/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\sin k \cdot \sin k\right)\right)}}{\frac{k}{\ell}} \]
      7. sqr-sin-aN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      8. cancel-sign-sub-invN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      9. metadata-evalN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      10. associate-*l*N/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{\left(k \cdot t\right) \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{\frac{k}{\ell}} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}}{\frac{k}{\ell}} \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2 \cdot \ell}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}\right), \color{blue}{\left(\frac{k}{\ell}\right)}\right) \]
    10. Applied egg-rr57.5%

      \[\leadsto \color{blue}{\frac{\frac{\ell \cdot 2}{\left(0.5 + -0.5 \cdot \cos \left(k \cdot 2\right)\right) \cdot \left(k \cdot t\right)}}{\frac{k}{\ell}}} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2 \cdot \ell}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(k \cdot 2\right)\right) \cdot \left(k \cdot t\right)}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2 \cdot \ell}{\left(\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(k \cdot 2\right)\right) \cdot k\right) \cdot t}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(k \cdot 2\right)\right) \cdot k} \cdot \frac{\ell}{t}\right), \mathsf{/.f64}\left(\color{blue}{k}, \ell\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{2}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(k \cdot 2\right)\right) \cdot k}\right), \left(\frac{\ell}{t}\right)\right), \mathsf{/.f64}\left(\color{blue}{k}, \ell\right)\right) \]
    12. Applied egg-rr57.9%

      \[\leadsto \frac{\color{blue}{\frac{2}{k \cdot \left(0.5 + -0.5 \cdot \cos \left(k \cdot 2\right)\right)} \cdot \frac{\ell}{t}}}{\frac{k}{\ell}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 70000000000:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}\\ \mathbf{elif}\;k \leq 2.9 \cdot 10^{+104}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{k \cdot k}}{\frac{k}{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{t} \cdot \frac{2}{k \cdot \left(0.5 + \cos \left(k \cdot 2\right) \cdot -0.5\right)}}{\frac{k}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 75.9% accurate, 3.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 136000000000:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{elif}\;k\_m \leq 2.9 \cdot 10^{+104}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\_m\right)}{k\_m \cdot t}}{k\_m \cdot k\_m}}{\frac{k\_m}{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{k\_m}{\ell} \cdot \frac{k\_m \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)}{\frac{\ell}{t}}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 136000000000.0)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (if (<= k_m 2.9e+104)
     (/ (/ (/ (* l (* l (cos k_m))) (* k_m t)) (* k_m k_m)) (/ k_m 2.0))
     (/
      1.0
      (*
       (/ k_m l)
       (/ (* k_m (+ 0.25 (* (cos (* k_m 2.0)) -0.25))) (/ l t)))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 136000000000.0) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else if (k_m <= 2.9e+104) {
		tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	} else {
		tmp = 1.0 / ((k_m / l) * ((k_m * (0.25 + (cos((k_m * 2.0)) * -0.25))) / (l / t)));
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 136000000000.0d0) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else if (k_m <= 2.9d+104) then
        tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0d0)
    else
        tmp = 1.0d0 / ((k_m / l) * ((k_m * (0.25d0 + (cos((k_m * 2.0d0)) * (-0.25d0)))) / (l / t)))
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 136000000000.0) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else if (k_m <= 2.9e+104) {
		tmp = (((l * (l * Math.cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	} else {
		tmp = 1.0 / ((k_m / l) * ((k_m * (0.25 + (Math.cos((k_m * 2.0)) * -0.25))) / (l / t)));
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 136000000000.0:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	elif k_m <= 2.9e+104:
		tmp = (((l * (l * math.cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0)
	else:
		tmp = 1.0 / ((k_m / l) * ((k_m * (0.25 + (math.cos((k_m * 2.0)) * -0.25))) / (l / t)))
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 136000000000.0)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	elseif (k_m <= 2.9e+104)
		tmp = Float64(Float64(Float64(Float64(l * Float64(l * cos(k_m))) / Float64(k_m * t)) / Float64(k_m * k_m)) / Float64(k_m / 2.0));
	else
		tmp = Float64(1.0 / Float64(Float64(k_m / l) * Float64(Float64(k_m * Float64(0.25 + Float64(cos(Float64(k_m * 2.0)) * -0.25))) / Float64(l / t))));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 136000000000.0)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	elseif (k_m <= 2.9e+104)
		tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	else
		tmp = 1.0 / ((k_m / l) * ((k_m * (0.25 + (cos((k_m * 2.0)) * -0.25))) / (l / t)));
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 136000000000.0], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 2.9e+104], N[(N[(N[(N[(l * N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] / N[(k$95$m / 2.0), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(k$95$m / l), $MachinePrecision] * N[(N[(k$95$m * N[(0.25 + N[(N[Cos[N[(k$95$m * 2.0), $MachinePrecision]], $MachinePrecision] * -0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 136000000000:\\
\;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\

\mathbf{elif}\;k\_m \leq 2.9 \cdot 10^{+104}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\_m\right)}{k\_m \cdot t}}{k\_m \cdot k\_m}}{\frac{k\_m}{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{k\_m}{\ell} \cdot \frac{k\_m \cdot \left(0.25 + \cos \left(k\_m \cdot 2\right) \cdot -0.25\right)}{\frac{\ell}{t}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < 1.36e11

    1. Initial program 37.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 \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{{k}^{4} \cdot t}{{\ell}^{2}}\right)}\right) \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left({k}^{4} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left(\frac{t}{{\ell}^{2}}\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot {k}^{2}\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left({k}^{2}\right)\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(k \cdot k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f6469.9%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified69.9%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\color{blue}{\ell \cdot \ell}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t} \cdot \color{blue}{\left(\ell \cdot \ell\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), \color{blue}{\left(\ell \cdot \ell\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right), \left(\color{blue}{\ell} \cdot \ell\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6470.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right) \]
    7. Applied egg-rr70.0%

      \[\leadsto \color{blue}{\frac{2}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \cdot \left(\ell \cdot \ell\right)} \]
    8. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{2 \cdot \left(\ell \cdot \ell\right)}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{t} \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \]
      3. associate-/l*N/A

        \[\leadsto \left(2 \cdot \ell\right) \cdot \color{blue}{\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(2 \cdot \ell\right), \color{blue}{\left(\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot \left(k \cdot k\right)\right)\right)\right)\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(k \cdot \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot k\right)}\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6477.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right)\right)\right) \]
    9. Applied egg-rr77.8%

      \[\leadsto \color{blue}{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    10. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot k\right)\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot k\right)}}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{\color{blue}{k \cdot k}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{k}}{k \cdot t}\right), \color{blue}{\left(k \cdot k\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{k}\right), \left(k \cdot t\right)\right), \left(\color{blue}{k} \cdot k\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \left(k \cdot t\right)\right), \left(k \cdot k\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6480.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    11. Applied egg-rr80.8%

      \[\leadsto \left(\ell \cdot 2\right) \cdot \color{blue}{\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}} \]

    if 1.36e11 < k < 2.8999999999999998e104

    1. Initial program 26.2%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\color{blue}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({\ell}^{2} \cdot \cos k\right)\right), \color{blue}{\left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2} \cdot \cos k\right)\right), \left(\color{blue}{{k}^{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \cos k\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      10. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(\left(k \cdot k\right) \cdot \left(\color{blue}{t} \cdot {\sin k}^{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \color{blue}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \left(\left(t \cdot {\sin k}^{2}\right) \cdot \color{blue}{k}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\left(t \cdot {\sin k}^{2}\right) \cdot k\right)}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left({\sin k}^{2}\right)}\right)\right)\right)\right) \]
      18. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\sin k, \color{blue}{2}\right)\right)\right)\right)\right) \]
      19. sin-lowering-sin.f6484.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    5. Simplified84.1%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \frac{2}{k} \cdot \color{blue}{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \color{blue}{\frac{2}{k}} \]
      3. clear-numN/A

        \[\leadsto \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \frac{1}{\color{blue}{\frac{k}{2}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}}{\color{blue}{\frac{k}{2}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}\right), \color{blue}{\left(\frac{k}{2}\right)}\right) \]
    7. Applied egg-rr84.6%

      \[\leadsto \color{blue}{\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)}}{\frac{k}{2}}} \]
    8. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \color{blue}{\left({k}^{2}\right)}\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      2. *-lowering-*.f6450.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    10. Simplified50.9%

      \[\leadsto \frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{\color{blue}{k \cdot k}}}{\frac{k}{2}} \]

    if 2.8999999999999998e104 < k

    1. Initial program 21.8%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\color{blue}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({\ell}^{2} \cdot \cos k\right)\right), \color{blue}{\left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2} \cdot \cos k\right)\right), \left(\color{blue}{{k}^{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \cos k\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      10. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(\left(k \cdot k\right) \cdot \left(\color{blue}{t} \cdot {\sin k}^{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \color{blue}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \left(\left(t \cdot {\sin k}^{2}\right) \cdot \color{blue}{k}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\left(t \cdot {\sin k}^{2}\right) \cdot k\right)}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left({\sin k}^{2}\right)}\right)\right)\right)\right) \]
      18. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\sin k, \color{blue}{2}\right)\right)\right)\right)\right) \]
      19. sin-lowering-sin.f6465.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    5. Simplified65.1%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
    6. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(2 \cdot {\ell}^{2}\right)}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2}\right)\right), \mathsf{*.f64}\left(\color{blue}{k}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \ell\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f6452.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    8. Simplified52.5%

      \[\leadsto \frac{\color{blue}{2 \cdot \left(\ell \cdot \ell\right)}}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)} \]
    9. Applied egg-rr57.9%

      \[\leadsto \color{blue}{\frac{1}{\frac{k \cdot \left(0.25 + -0.25 \cdot \cos \left(k \cdot 2\right)\right)}{\frac{\ell}{t}} \cdot \frac{k}{\ell}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 136000000000:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}\\ \mathbf{elif}\;k \leq 2.9 \cdot 10^{+104}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{k \cdot k}}{\frac{k}{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{k}{\ell} \cdot \frac{k \cdot \left(0.25 + \cos \left(k \cdot 2\right) \cdot -0.25\right)}{\frac{\ell}{t}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 74.7% accurate, 3.4× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 0:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\_m\right)}{k\_m \cdot t}}{k\_m \cdot k\_m}}{\frac{k\_m}{2}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= (* l l) 0.0)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (/ (/ (/ (* l (* l (cos k_m))) (* k_m t)) (* k_m k_m)) (/ k_m 2.0))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if ((l * l) <= 0.0) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if ((l * l) <= 0.0d0) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else
        tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0d0)
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if ((l * l) <= 0.0) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = (((l * (l * Math.cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if (l * l) <= 0.0:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	else:
		tmp = (((l * (l * math.cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0)
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (Float64(l * l) <= 0.0)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	else
		tmp = Float64(Float64(Float64(Float64(l * Float64(l * cos(k_m))) / Float64(k_m * t)) / Float64(k_m * k_m)) / Float64(k_m / 2.0));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if ((l * l) <= 0.0)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	else
		tmp = (((l * (l * cos(k_m))) / (k_m * t)) / (k_m * k_m)) / (k_m / 2.0);
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l * N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] / N[(k$95$m / 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\_m\right)}{k\_m \cdot t}}{k\_m \cdot k\_m}}{\frac{k\_m}{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 l l) < 0.0

    1. Initial program 12.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 \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{{k}^{4} \cdot t}{{\ell}^{2}}\right)}\right) \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left({k}^{4} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left(\frac{t}{{\ell}^{2}}\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot {k}^{2}\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left({k}^{2}\right)\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(k \cdot k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f6458.5%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified58.5%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\color{blue}{\ell \cdot \ell}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t} \cdot \color{blue}{\left(\ell \cdot \ell\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), \color{blue}{\left(\ell \cdot \ell\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right), \left(\color{blue}{\ell} \cdot \ell\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6458.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right) \]
    7. Applied egg-rr58.5%

      \[\leadsto \color{blue}{\frac{2}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \cdot \left(\ell \cdot \ell\right)} \]
    8. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{2 \cdot \left(\ell \cdot \ell\right)}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{t} \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \]
      3. associate-/l*N/A

        \[\leadsto \left(2 \cdot \ell\right) \cdot \color{blue}{\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(2 \cdot \ell\right), \color{blue}{\left(\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot \left(k \cdot k\right)\right)\right)\right)\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(k \cdot \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot k\right)}\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6483.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right)\right)\right) \]
    9. Applied egg-rr83.0%

      \[\leadsto \color{blue}{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    10. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot k\right)\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot k\right)}}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{\color{blue}{k \cdot k}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{k}}{k \cdot t}\right), \color{blue}{\left(k \cdot k\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{k}\right), \left(k \cdot t\right)\right), \left(\color{blue}{k} \cdot k\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \left(k \cdot t\right)\right), \left(k \cdot k\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6488.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    11. Applied egg-rr88.1%

      \[\leadsto \left(\ell \cdot 2\right) \cdot \color{blue}{\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}} \]

    if 0.0 < (*.f64 l l)

    1. Initial program 40.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 t around 0

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\color{blue}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({\ell}^{2} \cdot \cos k\right)\right), \color{blue}{\left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2} \cdot \cos k\right)\right), \left(\color{blue}{{k}^{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \cos k\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      10. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(\left(k \cdot k\right) \cdot \left(\color{blue}{t} \cdot {\sin k}^{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \color{blue}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \left(\left(t \cdot {\sin k}^{2}\right) \cdot \color{blue}{k}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\left(t \cdot {\sin k}^{2}\right) \cdot k\right)}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left({\sin k}^{2}\right)}\right)\right)\right)\right) \]
      18. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\sin k, \color{blue}{2}\right)\right)\right)\right)\right) \]
      19. sin-lowering-sin.f6481.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    5. Simplified81.4%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \frac{2}{k} \cdot \color{blue}{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \color{blue}{\frac{2}{k}} \]
      3. clear-numN/A

        \[\leadsto \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \frac{1}{\color{blue}{\frac{k}{2}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}}{\color{blue}{\frac{k}{2}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}\right), \color{blue}{\left(\frac{k}{2}\right)}\right) \]
    7. Applied egg-rr78.6%

      \[\leadsto \color{blue}{\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)}}{\frac{k}{2}}} \]
    8. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \color{blue}{\left({k}^{2}\right)}\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    9. Step-by-step derivation
      1. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      2. *-lowering-*.f6473.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    10. Simplified73.5%

      \[\leadsto \frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{\color{blue}{k \cdot k}}}{\frac{k}{2}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 72.9% accurate, 19.1× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 5.1 \cdot 10^{-6}:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{k\_m \cdot \left(k\_m \cdot k\_m\right)}{\frac{2}{\frac{k\_m}{\frac{\ell}{\frac{t}{\ell}}}}}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 5.1e-6)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (/ 1.0 (/ (* k_m (* k_m k_m)) (/ 2.0 (/ k_m (/ l (/ t l))))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 5.1e-6) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = 1.0 / ((k_m * (k_m * k_m)) / (2.0 / (k_m / (l / (t / l)))));
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 5.1d-6) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else
        tmp = 1.0d0 / ((k_m * (k_m * k_m)) / (2.0d0 / (k_m / (l / (t / l)))))
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 5.1e-6) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = 1.0 / ((k_m * (k_m * k_m)) / (2.0 / (k_m / (l / (t / l)))));
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 5.1e-6:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	else:
		tmp = 1.0 / ((k_m * (k_m * k_m)) / (2.0 / (k_m / (l / (t / l)))))
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 5.1e-6)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	else
		tmp = Float64(1.0 / Float64(Float64(k_m * Float64(k_m * k_m)) / Float64(2.0 / Float64(k_m / Float64(l / Float64(t / l))))));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 5.1e-6)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	else
		tmp = 1.0 / ((k_m * (k_m * k_m)) / (2.0 / (k_m / (l / (t / l)))));
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 5.1e-6], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(k$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] / N[(2.0 / N[(k$95$m / N[(l / N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 5.1 \cdot 10^{-6}:\\
\;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{k\_m \cdot \left(k\_m \cdot k\_m\right)}{\frac{2}{\frac{k\_m}{\frac{\ell}{\frac{t}{\ell}}}}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 5.1000000000000003e-6

    1. Initial program 37.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 \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{{k}^{4} \cdot t}{{\ell}^{2}}\right)}\right) \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left({k}^{4} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left(\frac{t}{{\ell}^{2}}\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot {k}^{2}\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left({k}^{2}\right)\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(k \cdot k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f6470.9%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified70.9%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\color{blue}{\ell \cdot \ell}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t} \cdot \color{blue}{\left(\ell \cdot \ell\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), \color{blue}{\left(\ell \cdot \ell\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right), \left(\color{blue}{\ell} \cdot \ell\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6471.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right) \]
    7. Applied egg-rr71.0%

      \[\leadsto \color{blue}{\frac{2}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \cdot \left(\ell \cdot \ell\right)} \]
    8. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{2 \cdot \left(\ell \cdot \ell\right)}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{t} \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \]
      3. associate-/l*N/A

        \[\leadsto \left(2 \cdot \ell\right) \cdot \color{blue}{\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(2 \cdot \ell\right), \color{blue}{\left(\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot \left(k \cdot k\right)\right)\right)\right)\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(k \cdot \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot k\right)}\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6478.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right)\right)\right) \]
    9. Applied egg-rr78.5%

      \[\leadsto \color{blue}{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    10. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot k\right)\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot k\right)}}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{\color{blue}{k \cdot k}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{k}}{k \cdot t}\right), \color{blue}{\left(k \cdot k\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{k}\right), \left(k \cdot t\right)\right), \left(\color{blue}{k} \cdot k\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \left(k \cdot t\right)\right), \left(k \cdot k\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6481.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    11. Applied egg-rr81.6%

      \[\leadsto \left(\ell \cdot 2\right) \cdot \color{blue}{\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}} \]

    if 5.1000000000000003e-6 < k

    1. Initial program 23.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 \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{{k}^{4} \cdot t}{{\ell}^{2}}\right)}\right) \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left({k}^{4} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left(\frac{t}{{\ell}^{2}}\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot {k}^{2}\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left({k}^{2}\right)\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(k \cdot k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f6442.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified42.6%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{t}{\ell \cdot \ell} \cdot \color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. associate-/r*N/A

        \[\leadsto \frac{\frac{2}{\frac{t}{\ell \cdot \ell}}}{\color{blue}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2}{\frac{t}{\ell \cdot \ell}}\right), \color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \left(\frac{t}{\ell \cdot \ell}\right)\right), \left(\color{blue}{\left(k \cdot k\right)} \cdot \left(k \cdot k\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right)\right), \left(\left(k \cdot \color{blue}{k}\right) \cdot \left(k \cdot k\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \left(k \cdot \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      10. *-lowering-*.f6442.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr42.6%

      \[\leadsto \color{blue}{\frac{\frac{2}{\frac{t}{\ell \cdot \ell}}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}} \]
    8. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\mathsf{neg}\left(2\right)}{\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)}\right), \mathsf{*.f64}\left(\color{blue}{k}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{neg}\left(2\right)\right), \left(\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{k}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-2, \left(\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right) \]
      4. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-2, \left(0 - \frac{t}{\ell \cdot \ell}\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{\_.f64}\left(0, \left(\frac{t}{\ell \cdot \ell}\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right) \]
      7. *-lowering-*.f6442.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(-2, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right) \]
    9. Applied egg-rr42.6%

      \[\leadsto \frac{\color{blue}{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)} \]
    10. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}}} \]
      2. frac-2negN/A

        \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\color{blue}{\mathsf{neg}\left(\frac{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}\right)}} \]
      3. metadata-evalN/A

        \[\leadsto \frac{-1}{\mathsf{neg}\left(\color{blue}{\frac{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}}\right)} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \color{blue}{\left(\mathsf{neg}\left(\frac{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}\right)\right)}\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \left(0 - \color{blue}{\frac{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}}\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \color{blue}{\left(\frac{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}\right)}\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \left(\frac{1}{\color{blue}{\frac{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}}}\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \left(\frac{1}{\frac{\frac{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}{k}}{\color{blue}{k \cdot \left(k \cdot k\right)}}}\right)\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \left(\frac{k \cdot \left(k \cdot k\right)}{\color{blue}{\frac{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}{k}}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\left(k \cdot \left(k \cdot k\right)\right), \color{blue}{\left(\frac{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}{k}\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \left(k \cdot k\right)\right), \left(\frac{\color{blue}{\frac{-2}{0 - \frac{t}{\ell \cdot \ell}}}}{k}\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{\frac{-2}{\color{blue}{0 - \frac{t}{\ell \cdot \ell}}}}{k}\right)\right)\right)\right) \]
      13. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{\frac{\mathsf{neg}\left(2\right)}{0 - \frac{t}{\ell \cdot \ell}}}{k}\right)\right)\right)\right) \]
      14. sub0-negN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{\frac{\mathsf{neg}\left(2\right)}{\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)}}{k}\right)\right)\right)\right) \]
      15. frac-2negN/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{\frac{2}{\frac{t}{\ell \cdot \ell}}}{k}\right)\right)\right)\right) \]
      16. associate-/l/N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{2}{\color{blue}{k \cdot \frac{t}{\ell \cdot \ell}}}\right)\right)\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(-1, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(2, \color{blue}{\left(k \cdot \frac{t}{\ell \cdot \ell}\right)}\right)\right)\right)\right) \]
    11. Applied egg-rr48.5%

      \[\leadsto \color{blue}{\frac{-1}{0 - \frac{k \cdot \left(k \cdot k\right)}{\frac{2}{\frac{k}{\frac{\ell}{\frac{t}{\ell}}}}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 5.1 \cdot 10^{-6}:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{k \cdot \left(k \cdot k\right)}{\frac{2}{\frac{k}{\frac{\ell}{\frac{t}{\ell}}}}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 72.0% accurate, 21.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 14.2:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{2}{k\_m}}{k\_m \cdot \left(k\_m \cdot k\_m\right)}}{\frac{t}{\ell \cdot \ell}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 14.2)
   (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m)))
   (/ (/ (/ 2.0 k_m) (* k_m (* k_m k_m))) (/ t (* l l)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 14.2) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = ((2.0 / k_m) / (k_m * (k_m * k_m))) / (t / (l * l));
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 14.2d0) then
        tmp = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
    else
        tmp = ((2.0d0 / k_m) / (k_m * (k_m * k_m))) / (t / (l * l))
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 14.2) {
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	} else {
		tmp = ((2.0 / k_m) / (k_m * (k_m * k_m))) / (t / (l * l));
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if k_m <= 14.2:
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
	else:
		tmp = ((2.0 / k_m) / (k_m * (k_m * k_m))) / (t / (l * l))
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 14.2)
		tmp = Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)));
	else
		tmp = Float64(Float64(Float64(2.0 / k_m) / Float64(k_m * Float64(k_m * k_m))) / Float64(t / Float64(l * l)));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (k_m <= 14.2)
		tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
	else
		tmp = ((2.0 / k_m) / (k_m * (k_m * k_m))) / (t / (l * l));
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 14.2], N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / k$95$m), $MachinePrecision] / N[(k$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 14.2:\\
\;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{k\_m}}{k\_m \cdot \left(k\_m \cdot k\_m\right)}}{\frac{t}{\ell \cdot \ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 14.199999999999999

    1. Initial program 37.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 \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{{k}^{4} \cdot t}{{\ell}^{2}}\right)}\right) \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left({k}^{4} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left(\frac{t}{{\ell}^{2}}\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot {k}^{2}\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left({k}^{2}\right)\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(k \cdot k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f6470.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified70.6%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\color{blue}{\ell \cdot \ell}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t} \cdot \color{blue}{\left(\ell \cdot \ell\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), \color{blue}{\left(\ell \cdot \ell\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right), \left(\color{blue}{\ell} \cdot \ell\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
      11. *-lowering-*.f6470.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right) \]
    7. Applied egg-rr70.7%

      \[\leadsto \color{blue}{\frac{2}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \cdot \left(\ell \cdot \ell\right)} \]
    8. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{2 \cdot \left(\ell \cdot \ell\right)}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{t} \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \]
      3. associate-/l*N/A

        \[\leadsto \left(2 \cdot \ell\right) \cdot \color{blue}{\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(2 \cdot \ell\right), \color{blue}{\left(\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)}\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)}\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot \left(k \cdot k\right)\right)\right)\right)\right) \]
      10. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(k \cdot \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot k\right)}\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6478.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right)\right)\right) \]
    9. Applied egg-rr78.5%

      \[\leadsto \color{blue}{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    10. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot k\right)\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot k\right)}}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)}\right)\right) \]
      4. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{\color{blue}{k \cdot k}}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{k}}{k \cdot t}\right), \color{blue}{\left(k \cdot k\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{k}\right), \left(k \cdot t\right)\right), \left(\color{blue}{k} \cdot k\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \left(k \cdot t\right)\right), \left(k \cdot k\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
      9. *-lowering-*.f6481.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    11. Applied egg-rr81.6%

      \[\leadsto \left(\ell \cdot 2\right) \cdot \color{blue}{\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}} \]

    if 14.199999999999999 < k

    1. Initial program 24.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 \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{{k}^{4} \cdot t}{{\ell}^{2}}\right)}\right) \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left({k}^{4} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left(\frac{t}{{\ell}^{2}}\right)}\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      4. pow-sqrN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot {k}^{2}\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left({k}^{2}\right)\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(k \cdot k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
      12. *-lowering-*.f6443.2%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    5. Simplified43.2%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}} \]
    6. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \frac{\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{\color{blue}{\frac{t}{\ell \cdot \ell}}} \]
      2. frac-2negN/A

        \[\leadsto \frac{\mathsf{neg}\left(\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right)}{\color{blue}{\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)}} \]
      3. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)}\right) \]
      4. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), \left(\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)\right)\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{2}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}\right), \left(\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)\right)\right)\right) \]
      7. associate-/r*N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{2}{k}}{k \cdot \left(k \cdot k\right)}\right), \left(\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{2}{k}\right), \left(k \cdot \left(k \cdot k\right)\right)\right), \left(\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, k\right), \left(k \cdot \left(k \cdot k\right)\right)\right), \left(\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, k\right), \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right), \left(\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, k\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \left(\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)\right)\right)\right) \]
      12. neg-sub0N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, k\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \left(0 - \frac{t}{\ell \cdot \ell}\right)\right)\right) \]
      13. --lowering--.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, k\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{\_.f64}\left(0, \left(\frac{t}{\ell \cdot \ell}\right)\right)\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, k\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right)\right)\right)\right) \]
      15. *-lowering-*.f6444.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(2, k\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right)\right) \]
    7. Applied egg-rr44.7%

      \[\leadsto \color{blue}{-\frac{\frac{\frac{2}{k}}{k \cdot \left(k \cdot k\right)}}{0 - \frac{t}{\ell \cdot \ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 14.2:\\ \;\;\;\;\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{2}{k}}{k \cdot \left(k \cdot k\right)}}{\frac{t}{\ell \cdot \ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 72.6% accurate, 21.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 4.9 \cdot 10^{+167}:\\ \;\;\;\;\frac{\frac{\frac{\ell \cdot \frac{\ell}{k\_m \cdot k\_m}}{k\_m}}{t}}{\frac{k\_m}{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell \cdot 2}{k\_m \cdot \left(k\_m \cdot \left(k\_m \cdot t\right)\right)}}{\frac{k\_m}{\ell}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= t 4.9e+167)
   (/ (/ (/ (* l (/ l (* k_m k_m))) k_m) t) (/ k_m 2.0))
   (/ (/ (* l 2.0) (* k_m (* k_m (* k_m t)))) (/ k_m l))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (t <= 4.9e+167) {
		tmp = (((l * (l / (k_m * k_m))) / k_m) / t) / (k_m / 2.0);
	} else {
		tmp = ((l * 2.0) / (k_m * (k_m * (k_m * t)))) / (k_m / l);
	}
	return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (t <= 4.9d+167) then
        tmp = (((l * (l / (k_m * k_m))) / k_m) / t) / (k_m / 2.0d0)
    else
        tmp = ((l * 2.0d0) / (k_m * (k_m * (k_m * t)))) / (k_m / l)
    end if
    code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (t <= 4.9e+167) {
		tmp = (((l * (l / (k_m * k_m))) / k_m) / t) / (k_m / 2.0);
	} else {
		tmp = ((l * 2.0) / (k_m * (k_m * (k_m * t)))) / (k_m / l);
	}
	return tmp;
}
k_m = math.fabs(k)
def code(t, l, k_m):
	tmp = 0
	if t <= 4.9e+167:
		tmp = (((l * (l / (k_m * k_m))) / k_m) / t) / (k_m / 2.0)
	else:
		tmp = ((l * 2.0) / (k_m * (k_m * (k_m * t)))) / (k_m / l)
	return tmp
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (t <= 4.9e+167)
		tmp = Float64(Float64(Float64(Float64(l * Float64(l / Float64(k_m * k_m))) / k_m) / t) / Float64(k_m / 2.0));
	else
		tmp = Float64(Float64(Float64(l * 2.0) / Float64(k_m * Float64(k_m * Float64(k_m * t)))) / Float64(k_m / l));
	end
	return tmp
end
k_m = abs(k);
function tmp_2 = code(t, l, k_m)
	tmp = 0.0;
	if (t <= 4.9e+167)
		tmp = (((l * (l / (k_m * k_m))) / k_m) / t) / (k_m / 2.0);
	else
		tmp = ((l * 2.0) / (k_m * (k_m * (k_m * t)))) / (k_m / l);
	end
	tmp_2 = tmp;
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[t, 4.9e+167], N[(N[(N[(N[(l * N[(l / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k$95$m), $MachinePrecision] / t), $MachinePrecision] / N[(k$95$m / 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * 2.0), $MachinePrecision] / N[(k$95$m * N[(k$95$m * N[(k$95$m * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k$95$m / l), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.9 \cdot 10^{+167}:\\
\;\;\;\;\frac{\frac{\frac{\ell \cdot \frac{\ell}{k\_m \cdot k\_m}}{k\_m}}{t}}{\frac{k\_m}{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell \cdot 2}{k\_m \cdot \left(k\_m \cdot \left(k\_m \cdot t\right)\right)}}{\frac{k\_m}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.9000000000000003e167

    1. Initial program 36.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\color{blue}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({\ell}^{2} \cdot \cos k\right)\right), \color{blue}{\left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2} \cdot \cos k\right)\right), \left(\color{blue}{{k}^{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \cos k\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      10. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(\left(k \cdot k\right) \cdot \left(\color{blue}{t} \cdot {\sin k}^{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \color{blue}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \left(\left(t \cdot {\sin k}^{2}\right) \cdot \color{blue}{k}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\left(t \cdot {\sin k}^{2}\right) \cdot k\right)}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left({\sin k}^{2}\right)}\right)\right)\right)\right) \]
      18. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\sin k, \color{blue}{2}\right)\right)\right)\right)\right) \]
      19. sin-lowering-sin.f6476.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    5. Simplified76.5%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
    6. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \frac{2}{k} \cdot \color{blue}{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \color{blue}{\frac{2}{k}} \]
      3. clear-numN/A

        \[\leadsto \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \frac{1}{\color{blue}{\frac{k}{2}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}}{\color{blue}{\frac{k}{2}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot \left(t \cdot {\sin k}^{2}\right)}\right), \color{blue}{\left(\frac{k}{2}\right)}\right) \]
    7. Applied egg-rr73.9%

      \[\leadsto \color{blue}{\frac{\frac{\frac{\ell \cdot \left(\ell \cdot \cos k\right)}{k \cdot t}}{0.5 + -0.5 \cdot \cos \left(2 \cdot k\right)}}{\frac{k}{2}}} \]
    8. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{{\ell}^{2}}{{k}^{3} \cdot t}\right)}, \mathsf{/.f64}\left(k, 2\right)\right) \]
    9. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{{\ell}^{2}}{{k}^{3}}}{t}\right), \mathsf{/.f64}\left(\color{blue}{k}, 2\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{{\ell}^{2}}{{k}^{3}}\right), t\right), \mathsf{/.f64}\left(\color{blue}{k}, 2\right)\right) \]
      3. unpow3N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{{\ell}^{2}}{\left(k \cdot k\right) \cdot k}\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{{\ell}^{2}}{{k}^{2} \cdot k}\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{{\ell}^{2}}{{k}^{2}}}{k}\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{{\ell}^{2}}{{k}^{2}}\right), k\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell \cdot \ell}{{k}^{2}}\right), k\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \frac{\ell}{{k}^{2}}\right), k\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{\ell}{{k}^{2}}\right)\right), k\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left({k}^{2}\right)\right)\right), k\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left(k \cdot k\right)\right)\right), k\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
      12. *-lowering-*.f6473.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, k\right)\right)\right), k\right), t\right), \mathsf{/.f64}\left(k, 2\right)\right) \]
    10. Simplified73.0%

      \[\leadsto \frac{\color{blue}{\frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{k}}{t}}}{\frac{k}{2}} \]

    if 4.9000000000000003e167 < t

    1. Initial program 13.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{\color{blue}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(2 \cdot \left({\ell}^{2} \cdot \cos k\right)\right), \color{blue}{\left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2} \cdot \cos k\right)\right), \left(\color{blue}{{k}^{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(\ell \cdot \ell\right) \cdot \cos k\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\cos k \cdot \ell\right)\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \left(\ell \cdot \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \cos k\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      10. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left({k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(\left(k \cdot k\right) \cdot \left(\color{blue}{t} \cdot {\sin k}^{2}\right)\right)\right) \]
      12. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \color{blue}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \left(k \cdot \left(\left(t \cdot {\sin k}^{2}\right) \cdot \color{blue}{k}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\left(t \cdot {\sin k}^{2}\right) \cdot k\right)}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \left(k \cdot \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left({\sin k}^{2}\right)}\right)\right)\right)\right) \]
      18. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\sin k, \color{blue}{2}\right)\right)\right)\right)\right) \]
      19. sin-lowering-sin.f6474.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    5. Simplified74.2%

      \[\leadsto \color{blue}{\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
    6. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(2 \cdot {\ell}^{2}\right)}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left({\ell}^{2}\right)\right), \mathsf{*.f64}\left(\color{blue}{k}, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\ell \cdot \ell\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f6470.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{pow.f64}\left(\mathsf{sin.f64}\left(k\right), 2\right)\right)\right)\right)\right) \]
    8. Simplified70.7%

      \[\leadsto \frac{\color{blue}{2 \cdot \left(\ell \cdot \ell\right)}}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{k} \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right) \cdot \color{blue}{k}} \]
      3. times-fracN/A

        \[\leadsto \frac{2 \cdot \ell}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \color{blue}{\frac{\ell}{k}} \]
      4. clear-numN/A

        \[\leadsto \frac{2 \cdot \ell}{k \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
      5. un-div-invN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot {\sin k}^{2}\right)}}{\color{blue}{\frac{k}{\ell}}} \]
      6. unpow2N/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\sin k \cdot \sin k\right)\right)}}{\frac{k}{\ell}} \]
      7. sqr-sin-aN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      8. cancel-sign-sub-invN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      9. metadata-evalN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot \left(t \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right)}}{\frac{k}{\ell}} \]
      10. associate-*l*N/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{\left(k \cdot t\right) \cdot \left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)}}{\frac{k}{\ell}} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\frac{2 \cdot \ell}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}}{\frac{k}{\ell}} \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2 \cdot \ell}{\left(\frac{1}{2} + \frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}\right), \color{blue}{\left(\frac{k}{\ell}\right)}\right) \]
    10. Applied egg-rr59.4%

      \[\leadsto \color{blue}{\frac{\frac{\ell \cdot 2}{\left(0.5 + -0.5 \cdot \cos \left(k \cdot 2\right)\right) \cdot \left(k \cdot t\right)}}{\frac{k}{\ell}}} \]
    11. Taylor expanded in k around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \color{blue}{\left({k}^{3} \cdot t\right)}\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
    12. Step-by-step derivation
      1. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\left(k \cdot \left(k \cdot k\right)\right) \cdot t\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\left(k \cdot {k}^{2}\right) \cdot t\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(k \cdot \left({k}^{2} \cdot t\right)\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{*.f64}\left(k, \left({k}^{2} \cdot t\right)\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{*.f64}\left(k, \left(\left(k \cdot k\right) \cdot t\right)\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot t\right)\right)\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot t\right)\right)\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
      8. *-lowering-*.f6478.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, t\right)\right)\right)\right), \mathsf{/.f64}\left(k, \ell\right)\right) \]
    13. Simplified78.8%

      \[\leadsto \frac{\frac{\ell \cdot 2}{\color{blue}{k \cdot \left(k \cdot \left(k \cdot t\right)\right)}}}{\frac{k}{\ell}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 15: 72.6% accurate, 28.1× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (* (* l 2.0) (/ (/ (/ l k_m) (* k_m t)) (* k_m k_m))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	return (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = (l * 2.0d0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	return (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
}
k_m = math.fabs(k)
def code(t, l, k_m):
	return (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m))
k_m = abs(k)
function code(t, l, k_m)
	return Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k_m) / Float64(k_m * t)) / Float64(k_m * k_m)))
end
k_m = abs(k);
function tmp = code(t, l, k_m)
	tmp = (l * 2.0) * (((l / k_m) / (k_m * t)) / (k_m * k_m));
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k$95$m), $MachinePrecision] / N[(k$95$m * t), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|

\\
\left(\ell \cdot 2\right) \cdot \frac{\frac{\frac{\ell}{k\_m}}{k\_m \cdot t}}{k\_m \cdot k\_m}
\end{array}
Derivation
  1. Initial program 33.9%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in k around 0

    \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{{k}^{4} \cdot t}{{\ell}^{2}}\right)}\right) \]
  4. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \mathsf{/.f64}\left(2, \left({k}^{4} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left(\frac{t}{{\ell}^{2}}\right)}\right)\right) \]
    3. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    4. pow-sqrN/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot {k}^{2}\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left({k}^{2}\right)\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
    6. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    8. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(k \cdot k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
    11. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
    12. *-lowering-*.f6463.8%

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
  5. Simplified63.8%

    \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}} \]
  6. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\color{blue}{\ell \cdot \ell}}} \]
    2. associate-/r/N/A

      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t} \cdot \color{blue}{\left(\ell \cdot \ell\right)} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), \color{blue}{\left(\ell \cdot \ell\right)}\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right), \left(\color{blue}{\ell} \cdot \ell\right)\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    7. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    11. *-lowering-*.f6463.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right) \]
  7. Applied egg-rr63.9%

    \[\leadsto \color{blue}{\frac{2}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \cdot \left(\ell \cdot \ell\right)} \]
  8. Step-by-step derivation
    1. associate-*l/N/A

      \[\leadsto \frac{2 \cdot \left(\ell \cdot \ell\right)}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    2. associate-*r*N/A

      \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{t} \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \]
    3. associate-/l*N/A

      \[\leadsto \left(2 \cdot \ell\right) \cdot \color{blue}{\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(2 \cdot \ell\right), \color{blue}{\left(\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)}\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)}\right)\right) \]
    8. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot \left(k \cdot k\right)\right)\right)\right)\right) \]
    10. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(k \cdot \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot k\right)}\right)\right)\right)\right)\right) \]
    14. *-lowering-*.f6470.3%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right)\right)\right) \]
  9. Applied egg-rr70.3%

    \[\leadsto \color{blue}{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
  10. Step-by-step derivation
    1. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot k\right)\right)}}\right)\right) \]
    2. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot k\right)}}\right)\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\ell}{k}}{\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)}\right)\right) \]
    4. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{\color{blue}{k \cdot k}}\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{k}}{k \cdot t}\right), \color{blue}{\left(k \cdot k\right)}\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{k}\right), \left(k \cdot t\right)\right), \left(\color{blue}{k} \cdot k\right)\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \left(k \cdot t\right)\right), \left(k \cdot k\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right)\right) \]
    9. *-lowering-*.f6472.7%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, k\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
  11. Applied egg-rr72.7%

    \[\leadsto \left(\ell \cdot 2\right) \cdot \color{blue}{\frac{\frac{\frac{\ell}{k}}{k \cdot t}}{k \cdot k}} \]
  12. Add Preprocessing

Alternative 16: 70.1% accurate, 28.1× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \left(\ell \cdot 2\right) \cdot \frac{\ell}{k\_m \cdot \left(k\_m \cdot \left(t \cdot \left(k\_m \cdot k\_m\right)\right)\right)} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (* (* l 2.0) (/ l (* k_m (* k_m (* t (* k_m k_m)))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	return (l * 2.0) * (l / (k_m * (k_m * (t * (k_m * k_m)))));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = (l * 2.0d0) * (l / (k_m * (k_m * (t * (k_m * k_m)))))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	return (l * 2.0) * (l / (k_m * (k_m * (t * (k_m * k_m)))));
}
k_m = math.fabs(k)
def code(t, l, k_m):
	return (l * 2.0) * (l / (k_m * (k_m * (t * (k_m * k_m)))))
k_m = abs(k)
function code(t, l, k_m)
	return Float64(Float64(l * 2.0) * Float64(l / Float64(k_m * Float64(k_m * Float64(t * Float64(k_m * k_m))))))
end
k_m = abs(k);
function tmp = code(t, l, k_m)
	tmp = (l * 2.0) * (l / (k_m * (k_m * (t * (k_m * k_m)))));
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := N[(N[(l * 2.0), $MachinePrecision] * N[(l / N[(k$95$m * N[(k$95$m * N[(t * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|

\\
\left(\ell \cdot 2\right) \cdot \frac{\ell}{k\_m \cdot \left(k\_m \cdot \left(t \cdot \left(k\_m \cdot k\_m\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 33.9%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in k around 0

    \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{{k}^{4} \cdot t}{{\ell}^{2}}\right)}\right) \]
  4. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \mathsf{/.f64}\left(2, \left({k}^{4} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left(\frac{t}{{\ell}^{2}}\right)}\right)\right) \]
    3. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    4. pow-sqrN/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot {k}^{2}\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left({k}^{2}\right)\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
    6. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    8. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(k \cdot k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
    11. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
    12. *-lowering-*.f6463.8%

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
  5. Simplified63.8%

    \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}} \]
  6. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\color{blue}{\ell \cdot \ell}}} \]
    2. associate-/r/N/A

      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t} \cdot \color{blue}{\left(\ell \cdot \ell\right)} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), \color{blue}{\left(\ell \cdot \ell\right)}\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right), \left(\color{blue}{\ell} \cdot \ell\right)\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    7. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    11. *-lowering-*.f6463.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right) \]
  7. Applied egg-rr63.9%

    \[\leadsto \color{blue}{\frac{2}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \cdot \left(\ell \cdot \ell\right)} \]
  8. Step-by-step derivation
    1. associate-*l/N/A

      \[\leadsto \frac{2 \cdot \left(\ell \cdot \ell\right)}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    2. associate-*r*N/A

      \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{t} \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \]
    3. associate-/l*N/A

      \[\leadsto \left(2 \cdot \ell\right) \cdot \color{blue}{\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(2 \cdot \ell\right), \color{blue}{\left(\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)}\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)}\right)\right) \]
    8. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot \left(k \cdot k\right)\right)\right)\right)\right) \]
    10. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(k \cdot \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot k\right)}\right)\right)\right)\right)\right) \]
    14. *-lowering-*.f6470.3%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right)\right)\right) \]
  9. Applied egg-rr70.3%

    \[\leadsto \color{blue}{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
  10. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \left(t \cdot \left(\left(k \cdot k\right) \cdot \color{blue}{k}\right)\right)\right)\right)\right) \]
    2. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \left(\left(t \cdot \left(k \cdot k\right)\right) \cdot \color{blue}{k}\right)\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(\left(t \cdot \left(k \cdot k\right)\right), \color{blue}{k}\right)\right)\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(k \cdot k\right)\right), k\right)\right)\right)\right) \]
    5. *-lowering-*.f6470.8%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, k\right)\right), k\right)\right)\right)\right) \]
  11. Applied egg-rr70.8%

    \[\leadsto \left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \color{blue}{\left(\left(t \cdot \left(k \cdot k\right)\right) \cdot k\right)}} \]
  12. Final simplification70.8%

    \[\leadsto \left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \left(k \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \]
  13. Add Preprocessing

Alternative 17: 69.4% accurate, 28.1× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \left(\ell \cdot 2\right) \cdot \frac{\ell}{k\_m \cdot \left(t \cdot \left(k\_m \cdot \left(k\_m \cdot k\_m\right)\right)\right)} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (* (* l 2.0) (/ l (* k_m (* t (* k_m (* k_m k_m)))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	return (l * 2.0) * (l / (k_m * (t * (k_m * (k_m * k_m)))));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = (l * 2.0d0) * (l / (k_m * (t * (k_m * (k_m * k_m)))))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	return (l * 2.0) * (l / (k_m * (t * (k_m * (k_m * k_m)))));
}
k_m = math.fabs(k)
def code(t, l, k_m):
	return (l * 2.0) * (l / (k_m * (t * (k_m * (k_m * k_m)))))
k_m = abs(k)
function code(t, l, k_m)
	return Float64(Float64(l * 2.0) * Float64(l / Float64(k_m * Float64(t * Float64(k_m * Float64(k_m * k_m))))))
end
k_m = abs(k);
function tmp = code(t, l, k_m)
	tmp = (l * 2.0) * (l / (k_m * (t * (k_m * (k_m * k_m)))));
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := N[(N[(l * 2.0), $MachinePrecision] * N[(l / N[(k$95$m * N[(t * N[(k$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|

\\
\left(\ell \cdot 2\right) \cdot \frac{\ell}{k\_m \cdot \left(t \cdot \left(k\_m \cdot \left(k\_m \cdot k\_m\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 33.9%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in k around 0

    \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left(\frac{{k}^{4} \cdot t}{{\ell}^{2}}\right)}\right) \]
  4. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto \mathsf{/.f64}\left(2, \left({k}^{4} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left(\frac{t}{{\ell}^{2}}\right)}\right)\right) \]
    3. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{\left(2 \cdot 2\right)}\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    4. pow-sqrN/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot {k}^{2}\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left({k}^{2}\right)\right), \left(\frac{\color{blue}{t}}{{\ell}^{2}}\right)\right)\right) \]
    6. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left({k}^{2}\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    8. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(k \cdot k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{t}{{\ell}^{2}}\right)\right)\right) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
    11. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
    12. *-lowering-*.f6463.8%

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
  5. Simplified63.8%

    \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}} \]
  6. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\color{blue}{\ell \cdot \ell}}} \]
    2. associate-/r/N/A

      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t} \cdot \color{blue}{\left(\ell \cdot \ell\right)} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{2}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), \color{blue}{\left(\ell \cdot \ell\right)}\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right), \left(\color{blue}{\ell} \cdot \ell\right)\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    7. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \left(\ell \cdot \ell\right)\right) \]
    11. *-lowering-*.f6463.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right) \]
  7. Applied egg-rr63.9%

    \[\leadsto \color{blue}{\frac{2}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \cdot \left(\ell \cdot \ell\right)} \]
  8. Step-by-step derivation
    1. associate-*l/N/A

      \[\leadsto \frac{2 \cdot \left(\ell \cdot \ell\right)}{\color{blue}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    2. associate-*r*N/A

      \[\leadsto \frac{\left(2 \cdot \ell\right) \cdot \ell}{\color{blue}{t} \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)} \]
    3. associate-/l*N/A

      \[\leadsto \left(2 \cdot \ell\right) \cdot \color{blue}{\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(2 \cdot \ell\right), \color{blue}{\left(\frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)}\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \left(\frac{\color{blue}{\ell}}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)}\right)\right) \]
    8. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(t \cdot k\right) \cdot \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(\left(k \cdot t\right) \cdot \left(\color{blue}{k} \cdot \left(k \cdot k\right)\right)\right)\right)\right) \]
    10. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \left(k \cdot \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \color{blue}{\left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \color{blue}{\left(k \cdot \left(k \cdot k\right)\right)}\right)\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot k\right)}\right)\right)\right)\right)\right) \]
    14. *-lowering-*.f6470.3%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, 2\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right)\right)\right) \]
  9. Applied egg-rr70.3%

    \[\leadsto \color{blue}{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k \cdot \left(t \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}} \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2024192 
(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))))