Toniolo and Linder, Equation (10-)

Percentage Accurate: 36.2% → 98.9%
Time: 20.1s
Alternatives: 25
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 25 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: 36.2% 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: 98.9% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\left({\left(t\_m \cdot \frac{k\_m}{2 \cdot l\_m}\right)}^{-0.5} \cdot \frac{1}{\sin k\_m}\right) \cdot \frac{{\left(\frac{t\_m}{\frac{2}{\frac{k\_m}{l\_m}}}\right)}^{-0.5}}{\frac{\sin k\_m}{\frac{l\_m}{\frac{k\_m}{\cos k\_m}}}}\right) \end{array} \]
l_m = (fabs.f64 l)
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k_m)
 :precision binary64
 (*
  t_s
  (*
   (* (pow (* t_m (/ k_m (* 2.0 l_m))) -0.5) (/ 1.0 (sin k_m)))
   (/
    (pow (/ t_m (/ 2.0 (/ k_m l_m))) -0.5)
    (/ (sin k_m) (/ l_m (/ k_m (cos k_m))))))))
l_m = fabs(l);
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * ((pow((t_m * (k_m / (2.0 * l_m))), -0.5) * (1.0 / sin(k_m))) * (pow((t_m / (2.0 / (k_m / l_m))), -0.5) / (sin(k_m) / (l_m / (k_m / cos(k_m))))));
}
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k_m
    code = t_s * ((((t_m * (k_m / (2.0d0 * l_m))) ** (-0.5d0)) * (1.0d0 / sin(k_m))) * (((t_m / (2.0d0 / (k_m / l_m))) ** (-0.5d0)) / (sin(k_m) / (l_m / (k_m / cos(k_m))))))
end function
l_m = Math.abs(l);
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * ((Math.pow((t_m * (k_m / (2.0 * l_m))), -0.5) * (1.0 / Math.sin(k_m))) * (Math.pow((t_m / (2.0 / (k_m / l_m))), -0.5) / (Math.sin(k_m) / (l_m / (k_m / Math.cos(k_m))))));
}
l_m = math.fabs(l)
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k_m):
	return t_s * ((math.pow((t_m * (k_m / (2.0 * l_m))), -0.5) * (1.0 / math.sin(k_m))) * (math.pow((t_m / (2.0 / (k_m / l_m))), -0.5) / (math.sin(k_m) / (l_m / (k_m / math.cos(k_m))))))
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k_m)
	return Float64(t_s * Float64(Float64((Float64(t_m * Float64(k_m / Float64(2.0 * l_m))) ^ -0.5) * Float64(1.0 / sin(k_m))) * Float64((Float64(t_m / Float64(2.0 / Float64(k_m / l_m))) ^ -0.5) / Float64(sin(k_m) / Float64(l_m / Float64(k_m / cos(k_m)))))))
end
l_m = abs(l);
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l_m, k_m)
	tmp = t_s * ((((t_m * (k_m / (2.0 * l_m))) ^ -0.5) * (1.0 / sin(k_m))) * (((t_m / (2.0 / (k_m / l_m))) ^ -0.5) / (sin(k_m) / (l_m / (k_m / cos(k_m))))));
end
l_m = N[Abs[l], $MachinePrecision]
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k$95$m_] := N[(t$95$s * N[(N[(N[Power[N[(t$95$m * N[(k$95$m / N[(2.0 * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(1.0 / N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(t$95$m / N[(2.0 / N[(k$95$m / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[(N[Sin[k$95$m], $MachinePrecision] / N[(l$95$m / N[(k$95$m / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\left({\left(t\_m \cdot \frac{k\_m}{2 \cdot l\_m}\right)}^{-0.5} \cdot \frac{1}{\sin k\_m}\right) \cdot \frac{{\left(\frac{t\_m}{\frac{2}{\frac{k\_m}{l\_m}}}\right)}^{-0.5}}{\frac{\sin k\_m}{\frac{l\_m}{\frac{k\_m}{\cos k\_m}}}}\right)
\end{array}
Derivation
  1. Initial program 30.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.f6473.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. Simplified73.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. clear-numN/A

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

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

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

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

      \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
    6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left({\left(t \cdot \frac{k}{2 \cdot \ell}\right)}^{-0.5} \cdot \frac{1}{\sin k}\right) \cdot \color{blue}{\frac{{\left(\frac{t}{\frac{2}{\frac{k}{\ell}}}\right)}^{-0.5}}{\frac{\sin k}{\frac{\ell}{\frac{k}{\cos k}}}}} \]
  12. Add Preprocessing

Alternative 2: 98.2% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left({\left({\left(t\_m \cdot \frac{k\_m}{2 \cdot l\_m}\right)}^{-0.5} \cdot \frac{1}{\sin k\_m}\right)}^{2} \cdot {\left(\frac{k\_m}{l\_m \cdot \cos k\_m}\right)}^{-1}\right) \end{array} \]
l_m = (fabs.f64 l)
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k_m)
 :precision binary64
 (*
  t_s
  (*
   (pow (* (pow (* t_m (/ k_m (* 2.0 l_m))) -0.5) (/ 1.0 (sin k_m))) 2.0)
   (pow (/ k_m (* l_m (cos k_m))) -1.0))))
l_m = fabs(l);
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * (pow((pow((t_m * (k_m / (2.0 * l_m))), -0.5) * (1.0 / sin(k_m))), 2.0) * pow((k_m / (l_m * cos(k_m))), -1.0));
}
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k_m
    code = t_s * (((((t_m * (k_m / (2.0d0 * l_m))) ** (-0.5d0)) * (1.0d0 / sin(k_m))) ** 2.0d0) * ((k_m / (l_m * cos(k_m))) ** (-1.0d0)))
end function
l_m = Math.abs(l);
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * (Math.pow((Math.pow((t_m * (k_m / (2.0 * l_m))), -0.5) * (1.0 / Math.sin(k_m))), 2.0) * Math.pow((k_m / (l_m * Math.cos(k_m))), -1.0));
}
l_m = math.fabs(l)
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k_m):
	return t_s * (math.pow((math.pow((t_m * (k_m / (2.0 * l_m))), -0.5) * (1.0 / math.sin(k_m))), 2.0) * math.pow((k_m / (l_m * math.cos(k_m))), -1.0))
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k_m)
	return Float64(t_s * Float64((Float64((Float64(t_m * Float64(k_m / Float64(2.0 * l_m))) ^ -0.5) * Float64(1.0 / sin(k_m))) ^ 2.0) * (Float64(k_m / Float64(l_m * cos(k_m))) ^ -1.0)))
end
l_m = abs(l);
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l_m, k_m)
	tmp = t_s * (((((t_m * (k_m / (2.0 * l_m))) ^ -0.5) * (1.0 / sin(k_m))) ^ 2.0) * ((k_m / (l_m * cos(k_m))) ^ -1.0));
end
l_m = N[Abs[l], $MachinePrecision]
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k$95$m_] := N[(t$95$s * N[(N[Power[N[(N[Power[N[(t$95$m * N[(k$95$m / N[(2.0 * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(1.0 / N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(k$95$m / N[(l$95$m * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left({\left({\left(t\_m \cdot \frac{k\_m}{2 \cdot l\_m}\right)}^{-0.5} \cdot \frac{1}{\sin k\_m}\right)}^{2} \cdot {\left(\frac{k\_m}{l\_m \cdot \cos k\_m}\right)}^{-1}\right)
\end{array}
Derivation
  1. Initial program 30.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.f6473.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. Simplified73.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. clear-numN/A

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

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

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

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

      \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
    6. unpow-prod-downN/A

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left({\left(t \cdot \frac{k}{2 \cdot \ell}\right)}^{-0.5} \cdot \frac{1}{\sin k}\right)}^{2}} \cdot {\left(\frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
  10. Add Preprocessing

Alternative 3: 98.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_2 := {\left(t\_m \cdot \frac{k\_m}{2 \cdot l\_m}\right)}^{-0.5} \cdot \frac{1}{\sin k\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 6.5 \cdot 10^{-5}:\\
\;\;\;\;t\_2 \cdot \left(t\_2 \cdot \frac{l\_m}{k\_m}\right)\\

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


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

    1. Initial program 31.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.f6472.7%

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

      \[\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. clear-numN/A

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

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

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

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

        \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
      6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(t, \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(2, \ell\right)\right)\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(t, \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(2, \ell\right)\right)\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(k\right)\right)\right), \color{blue}{\left(\frac{\ell}{k}\right)}\right)\right) \]
    11. Step-by-step derivation
      1. /-lowering-/.f6446.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(t, \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(2, \ell\right)\right)\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(k\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(t, \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(2, \ell\right)\right)\right), \frac{-1}{2}\right), \mathsf{/.f64}\left(1, \mathsf{sin.f64}\left(k\right)\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{k}\right)\right)\right) \]
    12. Simplified46.2%

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

    if 6.49999999999999943e-5 < k

    1. Initial program 29.5%

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

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

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

      \[\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. clear-numN/A

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

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

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

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

        \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
      6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \cos k\right), k\right), \left(\frac{\color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)} \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
      9. 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{\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot k\right)}\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
      10. 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(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \color{blue}{\frac{k \cdot t}{2 \cdot \ell}}\right)\right) \]
      11. *-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(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right), \color{blue}{\left(\frac{k \cdot t}{2 \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr99.3%

      \[\leadsto \color{blue}{\frac{\frac{\ell \cdot \cos k}{k}}{\left(0.5 + \cos \left(2 \cdot k\right) \cdot -0.5\right) \cdot \left(t \cdot \frac{k}{2 \cdot \ell}\right)}} \]
    10. 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(\left(\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right) \cdot \left(\frac{k}{2 \cdot \ell} \cdot \color{blue}{t}\right)\right)\right) \]
      2. 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(\left(\left(\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right) \cdot \frac{k}{2 \cdot \ell}\right) \cdot \color{blue}{t}\right)\right) \]
      3. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right), k\right), \left(\frac{\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}}{\frac{2 \cdot \ell}{k}} \cdot t\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(\frac{\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}}{\frac{2 \cdot \ell}{k}}\right), \color{blue}{t}\right)\right) \]
      6. /-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(\left(\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      7. +-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(\mathsf{+.f64}\left(\frac{1}{2}, \left(\cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      8. *-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(\mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\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(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \cos \left(2 \cdot k\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      10. 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), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\left(2 \cdot k\right)\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      11. *-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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\left(k \cdot 2\right)\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), 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), k\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      13. associate-/l*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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(2 \cdot \frac{\ell}{k}\right)\right), t\right)\right) \]
      14. clear-numN/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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(2 \cdot \frac{1}{\frac{k}{\ell}}\right)\right), t\right)\right) \]
      15. un-div-invN/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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(\frac{2}{\frac{k}{\ell}}\right)\right), t\right)\right) \]
      16. /-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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \mathsf{/.f64}\left(2, \left(\frac{k}{\ell}\right)\right)\right), t\right)\right) \]
      17. /-lowering-/.f6499.4%

        \[\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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(k, \ell\right)\right)\right), t\right)\right) \]
    11. Applied egg-rr99.4%

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

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

Alternative 4: 98.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_2 := \frac{2}{\frac{k\_m}{l\_m}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 6.5 \cdot 10^{-5}:\\
\;\;\;\;{\left(\frac{{\left(\frac{t\_m}{t\_2}\right)}^{-0.5}}{\sin k\_m}\right)}^{2} \cdot \frac{1}{\frac{k\_m}{l\_m}}\\

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


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

    1. Initial program 31.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.f6472.7%

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

      \[\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-*.f6465.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. Simplified65.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. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
      10. unpow-prod-downN/A

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
      11. unpow-1N/A

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

        \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
      13. inv-powN/A

        \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
    10. Applied egg-rr66.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{t \cdot \frac{k}{2 \cdot \ell}}}{\sin k \cdot \sin k}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
      8. inv-powN/A

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

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

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

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

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

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

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

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

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

    if 6.49999999999999943e-5 < k

    1. Initial program 29.5%

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

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

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

      \[\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. clear-numN/A

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

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

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

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

        \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
      6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \cos k\right), k\right), \left(\frac{\color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)} \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
      9. 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{\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot k\right)}\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
      10. 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(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \color{blue}{\frac{k \cdot t}{2 \cdot \ell}}\right)\right) \]
      11. *-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(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right), \color{blue}{\left(\frac{k \cdot t}{2 \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr99.3%

      \[\leadsto \color{blue}{\frac{\frac{\ell \cdot \cos k}{k}}{\left(0.5 + \cos \left(2 \cdot k\right) \cdot -0.5\right) \cdot \left(t \cdot \frac{k}{2 \cdot \ell}\right)}} \]
    10. 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(\left(\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right) \cdot \left(\frac{k}{2 \cdot \ell} \cdot \color{blue}{t}\right)\right)\right) \]
      2. 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(\left(\left(\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right) \cdot \frac{k}{2 \cdot \ell}\right) \cdot \color{blue}{t}\right)\right) \]
      3. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right), k\right), \left(\frac{\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}}{\frac{2 \cdot \ell}{k}} \cdot t\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(\frac{\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}}{\frac{2 \cdot \ell}{k}}\right), \color{blue}{t}\right)\right) \]
      6. /-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(\left(\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      7. +-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(\mathsf{+.f64}\left(\frac{1}{2}, \left(\cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      8. *-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(\mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\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(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \cos \left(2 \cdot k\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      10. 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), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\left(2 \cdot k\right)\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      11. *-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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\left(k \cdot 2\right)\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), 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), k\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      13. associate-/l*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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(2 \cdot \frac{\ell}{k}\right)\right), t\right)\right) \]
      14. clear-numN/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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(2 \cdot \frac{1}{\frac{k}{\ell}}\right)\right), t\right)\right) \]
      15. un-div-invN/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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(\frac{2}{\frac{k}{\ell}}\right)\right), t\right)\right) \]
      16. /-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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \mathsf{/.f64}\left(2, \left(\frac{k}{\ell}\right)\right)\right), t\right)\right) \]
      17. /-lowering-/.f6499.4%

        \[\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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(k, \ell\right)\right)\right), t\right)\right) \]
    11. Applied egg-rr99.4%

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

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

Alternative 5: 96.5% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 8.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot k\_m}\\

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


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

    1. Initial program 31.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.f6472.7%

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

      \[\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-*.f6465.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. Simplified65.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. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
      10. unpow-prod-downN/A

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
      11. unpow-1N/A

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

        \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
      13. inv-powN/A

        \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
    10. Applied egg-rr66.7%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
    13. Simplified79.3%

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

    if 8.500000000000001e-5 < k

    1. Initial program 29.5%

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

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

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

      \[\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. clear-numN/A

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

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

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

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

        \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
      6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \cos k\right), k\right), \left(\frac{\color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)} \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
      9. 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{\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot k\right)}\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
      10. 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(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \color{blue}{\frac{k \cdot t}{2 \cdot \ell}}\right)\right) \]
      11. *-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(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right), \color{blue}{\left(\frac{k \cdot t}{2 \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr99.3%

      \[\leadsto \color{blue}{\frac{\frac{\ell \cdot \cos k}{k}}{\left(0.5 + \cos \left(2 \cdot k\right) \cdot -0.5\right) \cdot \left(t \cdot \frac{k}{2 \cdot \ell}\right)}} \]
    10. 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(\left(\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right) \cdot \left(\frac{k}{2 \cdot \ell} \cdot \color{blue}{t}\right)\right)\right) \]
      2. 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(\left(\left(\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right) \cdot \frac{k}{2 \cdot \ell}\right) \cdot \color{blue}{t}\right)\right) \]
      3. clear-numN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right), k\right), \left(\frac{\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}}{\frac{2 \cdot \ell}{k}} \cdot t\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(\frac{\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}}{\frac{2 \cdot \ell}{k}}\right), \color{blue}{t}\right)\right) \]
      6. /-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(\left(\frac{1}{2} + \cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      7. +-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(\mathsf{+.f64}\left(\frac{1}{2}, \left(\cos \left(2 \cdot k\right) \cdot \frac{-1}{2}\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      8. *-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(\mathsf{+.f64}\left(\frac{1}{2}, \left(\frac{-1}{2} \cdot \cos \left(2 \cdot k\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\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(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \cos \left(2 \cdot k\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      10. 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), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\left(2 \cdot k\right)\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      11. *-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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\left(k \cdot 2\right)\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), 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), k\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(\frac{2 \cdot \ell}{k}\right)\right), t\right)\right) \]
      13. associate-/l*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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(2 \cdot \frac{\ell}{k}\right)\right), t\right)\right) \]
      14. clear-numN/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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(2 \cdot \frac{1}{\frac{k}{\ell}}\right)\right), t\right)\right) \]
      15. un-div-invN/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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \left(\frac{2}{\frac{k}{\ell}}\right)\right), t\right)\right) \]
      16. /-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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \mathsf{/.f64}\left(2, \left(\frac{k}{\ell}\right)\right)\right), t\right)\right) \]
      17. /-lowering-/.f6499.4%

        \[\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(\mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(k, 2\right)\right)\right)\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(k, \ell\right)\right)\right), t\right)\right) \]
    11. Applied egg-rr99.4%

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

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

Alternative 6: 96.5% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 8.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot k\_m}\\

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


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

    1. Initial program 31.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.f6472.7%

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

      \[\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-*.f6465.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. Simplified65.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. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
      10. unpow-prod-downN/A

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
      11. unpow-1N/A

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

        \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
      13. inv-powN/A

        \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
    10. Applied egg-rr66.7%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
    13. Simplified79.3%

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

    if 8.20000000000000009e-5 < k

    1. Initial program 29.5%

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

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

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

      \[\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. clear-numN/A

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

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

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

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

        \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
      6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \cos k\right), k\right), \left(\frac{\color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)} \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
      9. 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{\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot k\right)}\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
      10. 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(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \color{blue}{\frac{k \cdot t}{2 \cdot \ell}}\right)\right) \]
      11. *-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(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right), \color{blue}{\left(\frac{k \cdot t}{2 \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr99.3%

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

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

Alternative 7: 93.7% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 8.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot k\_m}\\

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


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

    1. Initial program 31.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.f6472.7%

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

      \[\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-*.f6465.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. Simplified65.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. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
      10. unpow-prod-downN/A

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
      11. unpow-1N/A

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

        \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
      13. inv-powN/A

        \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
    10. Applied egg-rr66.7%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
    13. Simplified79.3%

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

    if 8.500000000000001e-5 < k

    1. Initial program 29.5%

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

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

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

      \[\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. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 93.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
t_2 := \frac{2 \cdot l\_m}{t\_m \cdot k\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 8.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{t\_2}{k\_m \cdot k\_m}\\

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


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

    1. Initial program 31.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.f6472.7%

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

      \[\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-*.f6465.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. Simplified65.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. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
      10. unpow-prod-downN/A

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
      11. unpow-1N/A

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

        \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
      13. inv-powN/A

        \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
    10. Applied egg-rr66.7%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
    13. Simplified79.3%

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

    if 8.500000000000001e-5 < k

    1. Initial program 29.5%

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

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

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

      \[\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. clear-numN/A

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

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

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

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

        \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
      6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left({\left(t \cdot \frac{k}{2 \cdot \ell}\right)}^{-0.5} \cdot \frac{1}{\sin k}\right) \cdot \left(\left({\left(t \cdot \frac{k}{2 \cdot \ell}\right)}^{-0.5} \cdot \frac{1}{\sin k}\right) \cdot \frac{\ell \cdot \cos k}{k}\right)} \]
    10. Applied egg-rr97.9%

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

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

Alternative 9: 93.5% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 8.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot k\_m}\\

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


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

    1. Initial program 31.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.f6472.7%

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

      \[\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-*.f6465.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. Simplified65.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. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
      10. unpow-prod-downN/A

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
      11. unpow-1N/A

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

        \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
      13. inv-powN/A

        \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
    10. Applied egg-rr66.7%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
    13. Simplified79.3%

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

    if 8.500000000000001e-5 < k

    1. Initial program 29.5%

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

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

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

      \[\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. clear-numN/A

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

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

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

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

        \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
      6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left({\left(t \cdot \frac{k}{2 \cdot \ell}\right)}^{-0.5} \cdot \frac{1}{\sin k}\right) \cdot \left(\left({\left(t \cdot \frac{k}{2 \cdot \ell}\right)}^{-0.5} \cdot \frac{1}{\sin k}\right) \cdot \frac{\ell \cdot \cos k}{k}\right)} \]
    10. Applied egg-rr86.9%

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

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

Alternative 10: 91.2% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 8.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot k\_m}\\

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


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

    1. Initial program 31.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.f6472.7%

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

      \[\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-*.f6465.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. Simplified65.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. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
      10. unpow-prod-downN/A

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
      11. unpow-1N/A

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

        \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
      13. inv-powN/A

        \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
    10. Applied egg-rr66.7%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
    13. Simplified79.3%

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

    if 8.500000000000001e-5 < k

    1. Initial program 29.5%

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

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

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

      \[\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. clear-numN/A

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

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

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

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

        \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
      6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left({\left(t \cdot \frac{k}{2 \cdot \ell}\right)}^{-0.5} \cdot \frac{1}{\sin k}\right) \cdot \left(\left({\left(t \cdot \frac{k}{2 \cdot \ell}\right)}^{-0.5} \cdot \frac{1}{\sin k}\right) \cdot \frac{\ell \cdot \cos k}{k}\right)} \]
    10. Applied egg-rr83.7%

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

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

Alternative 11: 85.2% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 8.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot k\_m}\\

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


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

    1. Initial program 31.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.f6472.7%

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

      \[\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-*.f6465.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. Simplified65.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. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
      10. unpow-prod-downN/A

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
      11. unpow-1N/A

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

        \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
      13. inv-powN/A

        \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
    10. Applied egg-rr66.7%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
    13. Simplified79.3%

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

    if 8.500000000000001e-5 < k

    1. Initial program 29.5%

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

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

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

      \[\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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(2, k\right)\right)\right)\right)\right)\right)\right) \]
    7. Applied egg-rr83.0%

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

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

Alternative 12: 76.1% accurate, 1.9× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{{\sin k\_m}^{2}}\right) \end{array} \]
l_m = (fabs.f64 l)
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k_m)
 :precision binary64
 (*
  t_s
  (* (/ 1.0 (/ k_m l_m)) (/ (/ (* 2.0 l_m) (* t_m k_m)) (pow (sin k_m) 2.0)))))
l_m = fabs(l);
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / pow(sin(k_m), 2.0)));
}
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k_m
    code = t_s * ((1.0d0 / (k_m / l_m)) * (((2.0d0 * l_m) / (t_m * k_m)) / (sin(k_m) ** 2.0d0)))
end function
l_m = Math.abs(l);
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / Math.pow(Math.sin(k_m), 2.0)));
}
l_m = math.fabs(l)
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k_m):
	return t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / math.pow(math.sin(k_m), 2.0)))
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k_m)
	return Float64(t_s * Float64(Float64(1.0 / Float64(k_m / l_m)) * Float64(Float64(Float64(2.0 * l_m) / Float64(t_m * k_m)) / (sin(k_m) ^ 2.0))))
end
l_m = abs(l);
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l_m, k_m)
	tmp = t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / (sin(k_m) ^ 2.0)));
end
l_m = N[Abs[l], $MachinePrecision]
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k$95$m_] := N[(t$95$s * N[(N[(1.0 / N[(k$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * l$95$m), $MachinePrecision] / N[(t$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{{\sin k\_m}^{2}}\right)
\end{array}
Derivation
  1. Initial program 30.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.f6473.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. Simplified73.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. 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-*.f6462.4%

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

    \[\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. clear-numN/A

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

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

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

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

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

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

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

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

      \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
    10. unpow-prod-downN/A

      \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
    11. unpow-1N/A

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

      \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
    13. inv-powN/A

      \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
  10. Applied egg-rr63.7%

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot t}}{\color{blue}{{\sin k}^{2}}} \cdot \frac{1}{\frac{k}{\ell}} \]
  13. Final simplification74.7%

    \[\leadsto \frac{1}{\frac{k}{\ell}} \cdot \frac{\frac{2 \cdot \ell}{t \cdot k}}{{\sin k}^{2}} \]
  14. Add Preprocessing

Alternative 13: 76.8% accurate, 3.3× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 5.5 \cdot 10^{+27}:\\
\;\;\;\;\frac{\frac{l\_m \cdot \cos k\_m}{k\_m}}{\left(t\_m \cdot \frac{k\_m}{2 \cdot l\_m}\right) \cdot \left(k\_m \cdot k\_m\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 5.49999999999999966e27

    1. Initial program 31.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.f6473.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. Simplified73.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. Step-by-step derivation
      1. clear-numN/A

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

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

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

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

        \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
      6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \cos k\right), k\right), \left(\frac{\color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)} \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
      9. 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{\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot k\right)}\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
      10. 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(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \color{blue}{\frac{k \cdot t}{2 \cdot \ell}}\right)\right) \]
      11. *-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(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right), \color{blue}{\left(\frac{k \cdot t}{2 \cdot \ell}\right)}\right)\right) \]
    9. Applied egg-rr83.0%

      \[\leadsto \color{blue}{\frac{\frac{\ell \cdot \cos k}{k}}{\left(0.5 + \cos \left(2 \cdot k\right) \cdot -0.5\right) \cdot \left(t \cdot \frac{k}{2 \cdot \ell}\right)}} \]
    10. 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), \mathsf{*.f64}\left(\color{blue}{\left({k}^{2}\right)}, \mathsf{*.f64}\left(t, \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(2, \ell\right)\right)\right)\right)\right) \]
    11. Step-by-step derivation
      1. unpow2N/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 \cdot k\right), \mathsf{*.f64}\left(\color{blue}{t}, \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(2, \ell\right)\right)\right)\right)\right) \]
      2. *-lowering-*.f6480.3%

        \[\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(k, k\right), \mathsf{*.f64}\left(\color{blue}{t}, \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(2, \ell\right)\right)\right)\right)\right) \]
    12. Simplified80.3%

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

    if 5.49999999999999966e27 < k

    1. Initial program 29.6%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in 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.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. Simplified74.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. 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.0%

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

      \[\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. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
      10. unpow-prod-downN/A

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
      11. unpow-1N/A

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

        \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
      13. inv-powN/A

        \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
    10. Applied egg-rr54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 74.9% accurate, 3.5× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 52:\\
\;\;\;\;\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot k\_m}\\

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


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

    1. Initial program 31.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.f6472.7%

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

      \[\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-*.f6465.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. Simplified65.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. clear-numN/A

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
      10. unpow-prod-downN/A

        \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
      11. unpow-1N/A

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

        \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
      13. inv-powN/A

        \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
    10. Applied egg-rr66.7%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
    13. Simplified79.3%

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

    if 52 < k

    1. Initial program 29.5%

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

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

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

      \[\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(\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({k}^{2} \cdot t\right)}\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-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(\left({k}^{2}\right), \color{blue}{t}\right)\right)\right)\right) \]
      2. 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), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(\left(k \cdot k\right), t\right)\right)\right)\right) \]
      3. *-lowering-*.f6453.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(\mathsf{*.f64}\left(k, k\right), t\right)\right)\right)\right) \]
    8. Simplified53.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 52:\\ \;\;\;\;\frac{1}{\frac{k}{\ell}} \cdot \frac{\frac{2 \cdot \ell}{t \cdot k}}{k \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 75.8% accurate, 3.6× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{\frac{l\_m \cdot \cos k\_m}{k\_m}}{\left(t\_m \cdot \frac{k\_m}{2 \cdot l\_m}\right) \cdot \left(k\_m \cdot k\_m\right)} \end{array} \]
l_m = (fabs.f64 l)
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k_m)
 :precision binary64
 (*
  t_s
  (/ (/ (* l_m (cos k_m)) k_m) (* (* t_m (/ k_m (* 2.0 l_m))) (* k_m k_m)))))
l_m = fabs(l);
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * (((l_m * cos(k_m)) / k_m) / ((t_m * (k_m / (2.0 * l_m))) * (k_m * k_m)));
}
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k_m
    code = t_s * (((l_m * cos(k_m)) / k_m) / ((t_m * (k_m / (2.0d0 * l_m))) * (k_m * k_m)))
end function
l_m = Math.abs(l);
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * (((l_m * Math.cos(k_m)) / k_m) / ((t_m * (k_m / (2.0 * l_m))) * (k_m * k_m)));
}
l_m = math.fabs(l)
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k_m):
	return t_s * (((l_m * math.cos(k_m)) / k_m) / ((t_m * (k_m / (2.0 * l_m))) * (k_m * k_m)))
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k_m)
	return Float64(t_s * Float64(Float64(Float64(l_m * cos(k_m)) / k_m) / Float64(Float64(t_m * Float64(k_m / Float64(2.0 * l_m))) * Float64(k_m * k_m))))
end
l_m = abs(l);
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l_m, k_m)
	tmp = t_s * (((l_m * cos(k_m)) / k_m) / ((t_m * (k_m / (2.0 * l_m))) * (k_m * k_m)));
end
l_m = N[Abs[l], $MachinePrecision]
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k$95$m_] := N[(t$95$s * N[(N[(N[(l$95$m * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / k$95$m), $MachinePrecision] / N[(N[(t$95$m * N[(k$95$m / N[(2.0 * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{\frac{l\_m \cdot \cos k\_m}{k\_m}}{\left(t\_m \cdot \frac{k\_m}{2 \cdot l\_m}\right) \cdot \left(k\_m \cdot k\_m\right)}
\end{array}
Derivation
  1. Initial program 30.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.f6473.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. Simplified73.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. clear-numN/A

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

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

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

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

      \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell \cdot \cos k}\right)}^{-1} \]
    6. unpow-prod-downN/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \cos k\right), k\right), \left(\frac{\color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)} \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
    9. 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{\left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot k\right)}\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)\right) \]
    10. 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(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \color{blue}{\frac{k \cdot t}{2 \cdot \ell}}\right)\right) \]
    11. *-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(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right), \color{blue}{\left(\frac{k \cdot t}{2 \cdot \ell}\right)}\right)\right) \]
  9. Applied egg-rr86.3%

    \[\leadsto \color{blue}{\frac{\frac{\ell \cdot \cos k}{k}}{\left(0.5 + \cos \left(2 \cdot k\right) \cdot -0.5\right) \cdot \left(t \cdot \frac{k}{2 \cdot \ell}\right)}} \]
  10. 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), \mathsf{*.f64}\left(\color{blue}{\left({k}^{2}\right)}, \mathsf{*.f64}\left(t, \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(2, \ell\right)\right)\right)\right)\right) \]
  11. Step-by-step derivation
    1. unpow2N/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 \cdot k\right), \mathsf{*.f64}\left(\color{blue}{t}, \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(2, \ell\right)\right)\right)\right)\right) \]
    2. *-lowering-*.f6474.5%

      \[\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(k, k\right), \mathsf{*.f64}\left(\color{blue}{t}, \mathsf{/.f64}\left(k, \mathsf{*.f64}\left(2, \ell\right)\right)\right)\right)\right) \]
  12. Simplified74.5%

    \[\leadsto \frac{\frac{\ell \cdot \cos k}{k}}{\color{blue}{\left(k \cdot k\right)} \cdot \left(t \cdot \frac{k}{2 \cdot \ell}\right)} \]
  13. Final simplification74.5%

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

Alternative 16: 73.5% accurate, 16.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot \left(k\_m \cdot \left(1 + \left(k\_m \cdot k\_m\right) \cdot -0.3333333333333333\right)\right)}\right) \end{array} \]
l_m = (fabs.f64 l)
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k_m)
 :precision binary64
 (*
  t_s
  (*
   (/ 1.0 (/ k_m l_m))
   (/
    (/ (* 2.0 l_m) (* t_m k_m))
    (* k_m (* k_m (+ 1.0 (* (* k_m k_m) -0.3333333333333333))))))))
l_m = fabs(l);
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / (k_m * (k_m * (1.0 + ((k_m * k_m) * -0.3333333333333333))))));
}
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k_m
    code = t_s * ((1.0d0 / (k_m / l_m)) * (((2.0d0 * l_m) / (t_m * k_m)) / (k_m * (k_m * (1.0d0 + ((k_m * k_m) * (-0.3333333333333333d0)))))))
end function
l_m = Math.abs(l);
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / (k_m * (k_m * (1.0 + ((k_m * k_m) * -0.3333333333333333))))));
}
l_m = math.fabs(l)
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k_m):
	return t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / (k_m * (k_m * (1.0 + ((k_m * k_m) * -0.3333333333333333))))))
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k_m)
	return Float64(t_s * Float64(Float64(1.0 / Float64(k_m / l_m)) * Float64(Float64(Float64(2.0 * l_m) / Float64(t_m * k_m)) / Float64(k_m * Float64(k_m * Float64(1.0 + Float64(Float64(k_m * k_m) * -0.3333333333333333)))))))
end
l_m = abs(l);
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l_m, k_m)
	tmp = t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / (k_m * (k_m * (1.0 + ((k_m * k_m) * -0.3333333333333333))))));
end
l_m = N[Abs[l], $MachinePrecision]
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k$95$m_] := N[(t$95$s * N[(N[(1.0 / N[(k$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * l$95$m), $MachinePrecision] / N[(t$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * N[(k$95$m * N[(1.0 + N[(N[(k$95$m * k$95$m), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot \left(k\_m \cdot \left(1 + \left(k\_m \cdot k\_m\right) \cdot -0.3333333333333333\right)\right)}\right)
\end{array}
Derivation
  1. Initial program 30.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.f6473.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. Simplified73.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. 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-*.f6462.4%

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

    \[\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. clear-numN/A

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

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

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

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

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

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

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

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

      \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
    10. unpow-prod-downN/A

      \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
    11. unpow-1N/A

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

      \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
    13. inv-powN/A

      \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
  10. Applied egg-rr63.7%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \frac{-1}{3}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
  13. Simplified72.7%

    \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot t}}{\color{blue}{k \cdot \left(k \cdot \left(1 + \left(k \cdot k\right) \cdot -0.3333333333333333\right)\right)}} \cdot \frac{1}{\frac{k}{\ell}} \]
  14. Final simplification72.7%

    \[\leadsto \frac{1}{\frac{k}{\ell}} \cdot \frac{\frac{2 \cdot \ell}{t \cdot k}}{k \cdot \left(k \cdot \left(1 + \left(k \cdot k\right) \cdot -0.3333333333333333\right)\right)} \]
  15. Add Preprocessing

Alternative 17: 72.9% accurate, 19.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.0000000000000001e69

    1. Initial program 34.6%

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

      \[\leadsto \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-*.f6457.4%

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

      \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e69 < 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 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-*.f6457.4%

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

      \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), \ell\right)\right), 2\right) \]
    11. Applied egg-rr79.3%

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

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

Alternative 18: 72.7% accurate, 21.0× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.3 \cdot 10^{+68}:\\
\;\;\;\;2 \cdot \left(\frac{l\_m}{k\_m \cdot k\_m} \cdot \frac{\frac{l\_m}{t\_m}}{k\_m \cdot k\_m}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.2999999999999999e68

    1. Initial program 34.6%

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

      \[\leadsto \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-*.f6457.4%

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

      \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2999999999999999e68 < 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 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-*.f6457.4%

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

      \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)} \]
      2. associate-*r*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)}} \]
      3. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 72.9% accurate, 21.0× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.15 \cdot 10^{+68}:\\
\;\;\;\;2 \cdot \left(\frac{l\_m}{k\_m \cdot k\_m} \cdot \frac{\frac{l\_m}{t\_m}}{k\_m \cdot k\_m}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.15e68

    1. Initial program 34.6%

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

      \[\leadsto \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-*.f6457.4%

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

      \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e68 < 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 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-*.f6457.4%

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

      \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 71.4% accurate, 21.0× speedup?

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

\\
\begin{array}{l}
t_2 := k\_m \cdot \left(k\_m \cdot k\_m\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5 \cdot 10^{+68}:\\
\;\;\;\;2 \cdot \left(\frac{l\_m}{k\_m} \cdot \frac{\frac{l\_m}{t\_m}}{t\_2}\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 5.0000000000000004e68

    1. Initial program 34.6%

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

      \[\leadsto \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-*.f6457.4%

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

      \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000004e68 < 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 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-*.f6457.4%

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

      \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 71.0% accurate, 21.0× speedup?

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

\\
\begin{array}{l}
t_2 := k\_m \cdot \left(k\_m \cdot k\_m\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.3 \cdot 10^{+68}:\\
\;\;\;\;2 \cdot \left(l\_m \cdot \frac{\frac{\frac{l\_m}{t\_m}}{k\_m}}{t\_2}\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.3e68

    1. Initial program 34.6%

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

      \[\leadsto \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-*.f6457.4%

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

      \[\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. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\left(\frac{\ell}{k \cdot t}\right), \left(k \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\left(\frac{\ell}{t \cdot k}\right), \left(k \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{t}}{k}\right), \left(k \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), k\right), \left(k \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), k\right), \left(k \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), k\right), \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      10. *-lowering-*.f6466.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), k\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right), 2\right) \]
    11. Applied egg-rr66.9%

      \[\leadsto \left(\ell \cdot \color{blue}{\frac{\frac{\frac{\ell}{t}}{k}}{k \cdot \left(k \cdot k\right)}}\right) \cdot 2 \]

    if 2.3e68 < 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 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-*.f6457.4%

        \[\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. Simplified57.4%

      \[\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. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}{2}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{1}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}} \cdot \color{blue}{2} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}\right), \color{blue}{2}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\frac{t}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)}\right), 2\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{\frac{t}{\ell \cdot \ell}}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell \cdot \ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell \cdot \ell}{t}\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \ell\right), t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(\left(\left(k \cdot k\right) \cdot k\right) \cdot k\right)\right), 2\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(k \cdot \left(\left(k \cdot k\right) \cdot k\right)\right)\right), 2\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \left(\left(k \cdot k\right) \cdot k\right)\right)\right), 2\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      15. *-lowering-*.f6457.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right), 2\right) \]
    7. Applied egg-rr57.4%

      \[\leadsto \color{blue}{\frac{\frac{\ell \cdot \ell}{t}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)} \cdot 2} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell \cdot \ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
      2. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell \cdot \ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), 2\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot \frac{\ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), 2\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{\ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right)\right), 2\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right)\right), 2\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
      11. *-lowering-*.f6479.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right)\right), 2\right) \]
    9. Applied egg-rr79.3%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)} \cdot 2 \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.3 \cdot 10^{+68}:\\ \;\;\;\;2 \cdot \left(\ell \cdot \frac{\frac{\frac{\ell}{t}}{k}}{k \cdot \left(k \cdot k\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\ell \cdot \frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 70.1% accurate, 21.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := k\_m \cdot \left(k\_m \cdot \left(k\_m \cdot k\_m\right)\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 10^{-128}:\\ \;\;\;\;2 \cdot \left(l\_m \cdot \frac{\frac{l\_m}{t\_m}}{t\_2}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(l\_m \cdot \frac{l\_m}{t\_m \cdot t\_2}\right)\\ \end{array} \end{array} \end{array} \]
l_m = (fabs.f64 l)
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k_m)
 :precision binary64
 (let* ((t_2 (* k_m (* k_m (* k_m k_m)))))
   (*
    t_s
    (if (<= t_m 1e-128)
      (* 2.0 (* l_m (/ (/ l_m t_m) t_2)))
      (* 2.0 (* l_m (/ l_m (* t_m t_2))))))))
l_m = fabs(l);
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k_m) {
	double t_2 = k_m * (k_m * (k_m * k_m));
	double tmp;
	if (t_m <= 1e-128) {
		tmp = 2.0 * (l_m * ((l_m / t_m) / t_2));
	} else {
		tmp = 2.0 * (l_m * (l_m / (t_m * t_2)));
	}
	return t_s * tmp;
}
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k_m
    real(8) :: t_2
    real(8) :: tmp
    t_2 = k_m * (k_m * (k_m * k_m))
    if (t_m <= 1d-128) then
        tmp = 2.0d0 * (l_m * ((l_m / t_m) / t_2))
    else
        tmp = 2.0d0 * (l_m * (l_m / (t_m * t_2)))
    end if
    code = t_s * tmp
end function
l_m = Math.abs(l);
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k_m) {
	double t_2 = k_m * (k_m * (k_m * k_m));
	double tmp;
	if (t_m <= 1e-128) {
		tmp = 2.0 * (l_m * ((l_m / t_m) / t_2));
	} else {
		tmp = 2.0 * (l_m * (l_m / (t_m * t_2)));
	}
	return t_s * tmp;
}
l_m = math.fabs(l)
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k_m):
	t_2 = k_m * (k_m * (k_m * k_m))
	tmp = 0
	if t_m <= 1e-128:
		tmp = 2.0 * (l_m * ((l_m / t_m) / t_2))
	else:
		tmp = 2.0 * (l_m * (l_m / (t_m * t_2)))
	return t_s * tmp
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k_m)
	t_2 = Float64(k_m * Float64(k_m * Float64(k_m * k_m)))
	tmp = 0.0
	if (t_m <= 1e-128)
		tmp = Float64(2.0 * Float64(l_m * Float64(Float64(l_m / t_m) / t_2)));
	else
		tmp = Float64(2.0 * Float64(l_m * Float64(l_m / Float64(t_m * t_2))));
	end
	return Float64(t_s * tmp)
end
l_m = abs(l);
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l_m, k_m)
	t_2 = k_m * (k_m * (k_m * k_m));
	tmp = 0.0;
	if (t_m <= 1e-128)
		tmp = 2.0 * (l_m * ((l_m / t_m) / t_2));
	else
		tmp = 2.0 * (l_m * (l_m / (t_m * t_2)));
	end
	tmp_2 = t_s * tmp;
end
l_m = N[Abs[l], $MachinePrecision]
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k$95$m_] := Block[{t$95$2 = N[(k$95$m * N[(k$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1e-128], N[(2.0 * N[(l$95$m * N[(N[(l$95$m / t$95$m), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(l$95$m * N[(l$95$m / N[(t$95$m * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := k\_m \cdot \left(k\_m \cdot \left(k\_m \cdot k\_m\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 10^{-128}:\\
\;\;\;\;2 \cdot \left(l\_m \cdot \frac{\frac{l\_m}{t\_m}}{t\_2}\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(l\_m \cdot \frac{l\_m}{t\_m \cdot t\_2}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.00000000000000005e-128

    1. Initial program 29.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-*.f6457.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. Simplified57.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. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}{2}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{1}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}} \cdot \color{blue}{2} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}\right), \color{blue}{2}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\frac{t}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)}\right), 2\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{\frac{t}{\ell \cdot \ell}}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell \cdot \ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell \cdot \ell}{t}\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \ell\right), t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(\left(\left(k \cdot k\right) \cdot k\right) \cdot k\right)\right), 2\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(k \cdot \left(\left(k \cdot k\right) \cdot k\right)\right)\right), 2\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \left(\left(k \cdot k\right) \cdot k\right)\right)\right), 2\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      15. *-lowering-*.f6457.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right), 2\right) \]
    7. Applied egg-rr57.2%

      \[\leadsto \color{blue}{\frac{\frac{\ell \cdot \ell}{t}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)} \cdot 2} \]
    8. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell \cdot \frac{\ell}{t}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}\right), 2\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell \cdot \frac{\ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot \frac{\frac{\ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{\frac{\ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right)\right), 2\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      7. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
      10. *-lowering-*.f6464.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right), 2\right) \]
    9. Applied egg-rr64.7%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{\frac{\ell}{t}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}\right)} \cdot 2 \]

    if 1.00000000000000005e-128 < t

    1. Initial program 32.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-*.f6457.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. Simplified57.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. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}{2}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{1}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}} \cdot \color{blue}{2} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}\right), \color{blue}{2}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\frac{t}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)}\right), 2\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{\frac{t}{\ell \cdot \ell}}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
      6. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell \cdot \ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell \cdot \ell}{t}\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \ell\right), t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(\left(\left(k \cdot k\right) \cdot k\right) \cdot k\right)\right), 2\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(k \cdot \left(\left(k \cdot k\right) \cdot k\right)\right)\right), 2\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \left(\left(k \cdot k\right) \cdot k\right)\right)\right), 2\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right), 2\right) \]
      15. *-lowering-*.f6457.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right), 2\right) \]
    7. Applied egg-rr57.9%

      \[\leadsto \color{blue}{\frac{\frac{\ell \cdot \ell}{t}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)} \cdot 2} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell \cdot \ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
      2. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell \cdot \ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), 2\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot \frac{\ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), 2\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{\ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right)\right), 2\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right)\right), 2\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
      11. *-lowering-*.f6472.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right)\right), 2\right) \]
    9. Applied egg-rr72.1%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)} \cdot 2 \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 10^{-128}:\\ \;\;\;\;2 \cdot \left(\ell \cdot \frac{\frac{\ell}{t}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\ell \cdot \frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 74.1% accurate, 24.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot k\_m}\right) \end{array} \]
l_m = (fabs.f64 l)
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k_m)
 :precision binary64
 (* t_s (* (/ 1.0 (/ k_m l_m)) (/ (/ (* 2.0 l_m) (* t_m k_m)) (* k_m k_m)))))
l_m = fabs(l);
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / (k_m * k_m)));
}
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k_m
    code = t_s * ((1.0d0 / (k_m / l_m)) * (((2.0d0 * l_m) / (t_m * k_m)) / (k_m * k_m)))
end function
l_m = Math.abs(l);
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / (k_m * k_m)));
}
l_m = math.fabs(l)
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k_m):
	return t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / (k_m * k_m)))
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k_m)
	return Float64(t_s * Float64(Float64(1.0 / Float64(k_m / l_m)) * Float64(Float64(Float64(2.0 * l_m) / Float64(t_m * k_m)) / Float64(k_m * k_m))))
end
l_m = abs(l);
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l_m, k_m)
	tmp = t_s * ((1.0 / (k_m / l_m)) * (((2.0 * l_m) / (t_m * k_m)) / (k_m * k_m)));
end
l_m = N[Abs[l], $MachinePrecision]
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k$95$m_] := N[(t$95$s * N[(N[(1.0 / N[(k$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * l$95$m), $MachinePrecision] / N[(t$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] / N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(\frac{1}{\frac{k\_m}{l\_m}} \cdot \frac{\frac{2 \cdot l\_m}{t\_m \cdot k\_m}}{k\_m \cdot k\_m}\right)
\end{array}
Derivation
  1. Initial program 30.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.f6473.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. Simplified73.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. 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-*.f6462.4%

      \[\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. Simplified62.4%

    \[\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. clear-numN/A

      \[\leadsto \frac{1}{\color{blue}{\frac{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}{2 \cdot \left(\ell \cdot \ell\right)}}} \]
    2. inv-powN/A

      \[\leadsto {\left(\frac{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}{2 \cdot \left(\ell \cdot \ell\right)}\right)}^{\color{blue}{-1}} \]
    3. *-commutativeN/A

      \[\leadsto {\left(\frac{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right) \cdot k}{2 \cdot \left(\ell \cdot \ell\right)}\right)}^{-1} \]
    4. associate-*r*N/A

      \[\leadsto {\left(\frac{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right) \cdot k}{\left(2 \cdot \ell\right) \cdot \ell}\right)}^{-1} \]
    5. times-fracN/A

      \[\leadsto {\left(\frac{k \cdot \left(t \cdot {\sin k}^{2}\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
    6. associate-*r*N/A

      \[\leadsto {\left(\frac{\left(k \cdot t\right) \cdot {\sin k}^{2}}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
    7. unpow2N/A

      \[\leadsto {\left(\frac{\left(k \cdot t\right) \cdot \left(\sin k \cdot \sin k\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
    8. sqr-sin-aN/A

      \[\leadsto {\left(\frac{\left(k \cdot t\right) \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
    9. *-commutativeN/A

      \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell} \cdot \frac{k}{\ell}\right)}^{-1} \]
    10. unpow-prod-downN/A

      \[\leadsto {\left(\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}\right)}^{-1} \cdot \color{blue}{{\left(\frac{k}{\ell}\right)}^{-1}} \]
    11. unpow-1N/A

      \[\leadsto \frac{1}{\frac{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot \left(k \cdot t\right)}{2 \cdot \ell}} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
    12. clear-numN/A

      \[\leadsto \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)} \cdot {\color{blue}{\left(\frac{k}{\ell}\right)}}^{-1} \]
    13. inv-powN/A

      \[\leadsto \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)} \cdot \frac{1}{\color{blue}{\frac{k}{\ell}}} \]
  10. Applied egg-rr63.7%

    \[\leadsto \color{blue}{\frac{\frac{2 \cdot \ell}{k \cdot t}}{0.5 + \cos \left(2 \cdot k\right) \cdot -0.5} \cdot \frac{1}{\frac{k}{\ell}}} \]
  11. Taylor expanded in k around 0

    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \color{blue}{\left({k}^{2}\right)}\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
  12. Step-by-step derivation
    1. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \left(k \cdot k\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
    2. *-lowering-*.f6472.7%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \ell\right), \mathsf{*.f64}\left(k, t\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(k, \ell\right)\right)\right) \]
  13. Simplified72.7%

    \[\leadsto \frac{\frac{2 \cdot \ell}{k \cdot t}}{\color{blue}{k \cdot k}} \cdot \frac{1}{\frac{k}{\ell}} \]
  14. Final simplification72.7%

    \[\leadsto \frac{1}{\frac{k}{\ell}} \cdot \frac{\frac{2 \cdot \ell}{t \cdot k}}{k \cdot k} \]
  15. Add Preprocessing

Alternative 24: 70.0% accurate, 28.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \left(l\_m \cdot \frac{\frac{l\_m}{k\_m \cdot \left(k\_m \cdot \left(k\_m \cdot k\_m\right)\right)}}{t\_m}\right)\right) \end{array} \]
l_m = (fabs.f64 l)
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k_m)
 :precision binary64
 (* t_s (* 2.0 (* l_m (/ (/ l_m (* k_m (* k_m (* k_m k_m)))) t_m)))))
l_m = fabs(l);
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * (2.0 * (l_m * ((l_m / (k_m * (k_m * (k_m * k_m)))) / t_m)));
}
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k_m
    code = t_s * (2.0d0 * (l_m * ((l_m / (k_m * (k_m * (k_m * k_m)))) / t_m)))
end function
l_m = Math.abs(l);
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * (2.0 * (l_m * ((l_m / (k_m * (k_m * (k_m * k_m)))) / t_m)));
}
l_m = math.fabs(l)
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k_m):
	return t_s * (2.0 * (l_m * ((l_m / (k_m * (k_m * (k_m * k_m)))) / t_m)))
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k_m)
	return Float64(t_s * Float64(2.0 * Float64(l_m * Float64(Float64(l_m / Float64(k_m * Float64(k_m * Float64(k_m * k_m)))) / t_m))))
end
l_m = abs(l);
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l_m, k_m)
	tmp = t_s * (2.0 * (l_m * ((l_m / (k_m * (k_m * (k_m * k_m)))) / t_m)));
end
l_m = N[Abs[l], $MachinePrecision]
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k$95$m_] := N[(t$95$s * N[(2.0 * N[(l$95$m * N[(N[(l$95$m / N[(k$95$m * N[(k$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot \left(l\_m \cdot \frac{\frac{l\_m}{k\_m \cdot \left(k\_m \cdot \left(k\_m \cdot k\_m\right)\right)}}{t\_m}\right)\right)
\end{array}
Derivation
  1. Initial program 30.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-*.f6457.4%

      \[\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. Simplified57.4%

    \[\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. clear-numN/A

      \[\leadsto \frac{1}{\color{blue}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}{2}}} \]
    2. associate-/r/N/A

      \[\leadsto \frac{1}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}} \cdot \color{blue}{2} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}\right), \color{blue}{2}\right) \]
    4. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\frac{t}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)}\right), 2\right) \]
    5. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{\frac{t}{\ell \cdot \ell}}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
    6. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell \cdot \ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell \cdot \ell}{t}\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \ell\right), t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
    10. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(\left(\left(k \cdot k\right) \cdot k\right) \cdot k\right)\right), 2\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(k \cdot \left(\left(k \cdot k\right) \cdot k\right)\right)\right), 2\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \left(\left(k \cdot k\right) \cdot k\right)\right)\right), 2\right) \]
    13. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right), 2\right) \]
    15. *-lowering-*.f6457.4%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right), 2\right) \]
  7. Applied egg-rr57.4%

    \[\leadsto \color{blue}{\frac{\frac{\ell \cdot \ell}{t}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)} \cdot 2} \]
  8. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell \cdot \ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
    2. associate-/l/N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell \cdot \ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), 2\right) \]
    3. associate-/l*N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot \frac{\ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), 2\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{\ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right)\right), 2\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right)\right), 2\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
    8. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
    11. *-lowering-*.f6467.4%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right)\right), 2\right) \]
  9. Applied egg-rr67.4%

    \[\leadsto \color{blue}{\left(\ell \cdot \frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)} \cdot 2 \]
  10. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)}\right)\right), 2\right) \]
    2. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{\ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right)\right), 2\right) \]
    3. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{\frac{\ell}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{t}\right)\right), 2\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\left(\frac{\ell}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), t\right)\right), 2\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), t\right)\right), 2\right) \]
    6. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right), t\right)\right), 2\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right), t\right)\right), 2\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right), t\right)\right), 2\right) \]
    9. *-lowering-*.f6469.0%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right), t\right)\right), 2\right) \]
  11. Applied egg-rr69.0%

    \[\leadsto \left(\ell \cdot \color{blue}{\frac{\frac{\ell}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}}{t}}\right) \cdot 2 \]
  12. Final simplification69.0%

    \[\leadsto 2 \cdot \left(\ell \cdot \frac{\frac{\ell}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}}{t}\right) \]
  13. Add Preprocessing

Alternative 25: 69.2% accurate, 28.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \left(l\_m \cdot \frac{l\_m}{t\_m \cdot \left(k\_m \cdot \left(k\_m \cdot \left(k\_m \cdot k\_m\right)\right)\right)}\right)\right) \end{array} \]
l_m = (fabs.f64 l)
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l_m k_m)
 :precision binary64
 (* t_s (* 2.0 (* l_m (/ l_m (* t_m (* k_m (* k_m (* k_m k_m)))))))))
l_m = fabs(l);
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * (2.0 * (l_m * (l_m / (t_m * (k_m * (k_m * (k_m * k_m)))))));
}
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k_m
    code = t_s * (2.0d0 * (l_m * (l_m / (t_m * (k_m * (k_m * (k_m * k_m)))))))
end function
l_m = Math.abs(l);
k_m = Math.abs(k);
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k_m) {
	return t_s * (2.0 * (l_m * (l_m / (t_m * (k_m * (k_m * (k_m * k_m)))))));
}
l_m = math.fabs(l)
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l_m, k_m):
	return t_s * (2.0 * (l_m * (l_m / (t_m * (k_m * (k_m * (k_m * k_m)))))))
l_m = abs(l)
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l_m, k_m)
	return Float64(t_s * Float64(2.0 * Float64(l_m * Float64(l_m / Float64(t_m * Float64(k_m * Float64(k_m * Float64(k_m * k_m))))))))
end
l_m = abs(l);
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l_m, k_m)
	tmp = t_s * (2.0 * (l_m * (l_m / (t_m * (k_m * (k_m * (k_m * k_m)))))));
end
l_m = N[Abs[l], $MachinePrecision]
k_m = N[Abs[k], $MachinePrecision]
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k$95$m_] := N[(t$95$s * N[(2.0 * N[(l$95$m * N[(l$95$m / N[(t$95$m * N[(k$95$m * N[(k$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot \left(l\_m \cdot \frac{l\_m}{t\_m \cdot \left(k\_m \cdot \left(k\_m \cdot \left(k\_m \cdot k\_m\right)\right)\right)}\right)\right)
\end{array}
Derivation
  1. Initial program 30.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-*.f6457.4%

      \[\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. Simplified57.4%

    \[\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. clear-numN/A

      \[\leadsto \frac{1}{\color{blue}{\frac{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}{2}}} \]
    2. associate-/r/N/A

      \[\leadsto \frac{1}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}} \cdot \color{blue}{2} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell \cdot \ell}}\right), \color{blue}{2}\right) \]
    4. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{\frac{t}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)}\right), 2\right) \]
    5. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{\frac{t}{\ell \cdot \ell}}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
    6. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell \cdot \ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell \cdot \ell}{t}\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \ell\right), t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right), 2\right) \]
    10. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(\left(\left(k \cdot k\right) \cdot k\right) \cdot k\right)\right), 2\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \left(k \cdot \left(\left(k \cdot k\right) \cdot k\right)\right)\right), 2\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \left(\left(k \cdot k\right) \cdot k\right)\right)\right), 2\right) \]
    13. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right), 2\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right), 2\right) \]
    15. *-lowering-*.f6457.4%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right), 2\right) \]
  7. Applied egg-rr57.4%

    \[\leadsto \color{blue}{\frac{\frac{\ell \cdot \ell}{t}}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)} \cdot 2} \]
  8. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell \cdot \ell}{t}}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}\right), 2\right) \]
    2. associate-/l/N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell \cdot \ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), 2\right) \]
    3. associate-/l*N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\ell \cdot \frac{\ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right), 2\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{\ell}{\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t}\right)\right), 2\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left(\left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot t\right)\right)\right), 2\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \left(t \cdot \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot \left(k \cdot k\right)\right)\right)\right)\right), 2\right) \]
    8. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \left(k \cdot \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(k \cdot k\right)\right)\right)\right)\right)\right), 2\right) \]
    11. *-lowering-*.f6467.4%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, k\right)\right)\right)\right)\right)\right), 2\right) \]
  9. Applied egg-rr67.4%

    \[\leadsto \color{blue}{\left(\ell \cdot \frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right)} \cdot 2 \]
  10. Final simplification67.4%

    \[\leadsto 2 \cdot \left(\ell \cdot \frac{\ell}{t \cdot \left(k \cdot \left(k \cdot \left(k \cdot k\right)\right)\right)}\right) \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2024185 
(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))))