Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.5% → 94.2%
Time: 18.1s
Alternatives: 17
Speedup: 28.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 35.5% accurate, 1.0× speedup?

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

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

Alternative 1: 94.2% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \frac{2}{\frac{\left(k \cdot \frac{k \cdot t}{\ell}\right) \cdot \left(\sin k \cdot \left(\sin k \cdot \frac{1}{\ell}\right)\right)}{\cos k}} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/ 2.0 (/ (* (* k (/ (* k t) l)) (* (sin k) (* (sin k) (/ 1.0 l)))) (cos k))))
double code(double t, double l, double k) {
	return 2.0 / (((k * ((k * t) / l)) * (sin(k) * (sin(k) * (1.0 / l)))) / cos(k));
}
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 / (((k * ((k * t) / l)) * (sin(k) * (sin(k) * (1.0d0 / l)))) / cos(k))
end function
public static double code(double t, double l, double k) {
	return 2.0 / (((k * ((k * t) / l)) * (Math.sin(k) * (Math.sin(k) * (1.0 / l)))) / Math.cos(k));
}
def code(t, l, k):
	return 2.0 / (((k * ((k * t) / l)) * (math.sin(k) * (math.sin(k) * (1.0 / l)))) / math.cos(k))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(k * Float64(Float64(k * t) / l)) * Float64(sin(k) * Float64(sin(k) * Float64(1.0 / l)))) / cos(k)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((k * ((k * t) / l)) * (sin(k) * (sin(k) * (1.0 / l)))) / cos(k));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(k * N[(N[(k * t), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\frac{\left(k \cdot \frac{k \cdot t}{\ell}\right) \cdot \left(\sin k \cdot \left(\sin k \cdot \frac{1}{\ell}\right)\right)}{\cos k}}
\end{array}
Derivation
  1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 94.2% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \frac{2}{\frac{\left(k \cdot \frac{k \cdot t}{\ell}\right) \cdot \frac{\sin k}{\frac{\ell}{\sin k}}}{\cos k}} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/ 2.0 (/ (* (* k (/ (* k t) l)) (/ (sin k) (/ l (sin k)))) (cos k))))
double code(double t, double l, double k) {
	return 2.0 / (((k * ((k * t) / l)) * (sin(k) / (l / sin(k)))) / cos(k));
}
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 / (((k * ((k * t) / l)) * (sin(k) / (l / sin(k)))) / cos(k))
end function
public static double code(double t, double l, double k) {
	return 2.0 / (((k * ((k * t) / l)) * (Math.sin(k) / (l / Math.sin(k)))) / Math.cos(k));
}
def code(t, l, k):
	return 2.0 / (((k * ((k * t) / l)) * (math.sin(k) / (l / math.sin(k)))) / math.cos(k))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(k * Float64(Float64(k * t) / l)) * Float64(sin(k) / Float64(l / sin(k)))) / cos(k)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((k * ((k * t) / l)) * (sin(k) / (l / sin(k)))) / cos(k));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(k * N[(N[(k * t), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\frac{\left(k \cdot \frac{k \cdot t}{\ell}\right) \cdot \frac{\sin k}{\frac{\ell}{\sin k}}}{\cos k}}
\end{array}
Derivation
  1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 94.2% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \frac{2}{\frac{\left(k \cdot \frac{k \cdot t}{\ell}\right) \cdot \left(\sin k \cdot \frac{\sin k}{\ell}\right)}{\cos k}} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/ 2.0 (/ (* (* k (/ (* k t) l)) (* (sin k) (/ (sin k) l))) (cos k))))
double code(double t, double l, double k) {
	return 2.0 / (((k * ((k * t) / l)) * (sin(k) * (sin(k) / l))) / cos(k));
}
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 / (((k * ((k * t) / l)) * (sin(k) * (sin(k) / l))) / cos(k))
end function
public static double code(double t, double l, double k) {
	return 2.0 / (((k * ((k * t) / l)) * (Math.sin(k) * (Math.sin(k) / l))) / Math.cos(k));
}
def code(t, l, k):
	return 2.0 / (((k * ((k * t) / l)) * (math.sin(k) * (math.sin(k) / l))) / math.cos(k))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(k * Float64(Float64(k * t) / l)) * Float64(sin(k) * Float64(sin(k) / l))) / cos(k)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((k * ((k * t) / l)) * (sin(k) * (sin(k) / l))) / cos(k));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(k * N[(N[(k * t), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\frac{\left(k \cdot \frac{k \cdot t}{\ell}\right) \cdot \left(\sin k \cdot \frac{\sin k}{\ell}\right)}{\cos k}}
\end{array}
Derivation
  1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 83.5% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 4 \cdot 10^{-116}:\\ \;\;\;\;\frac{\frac{2}{\frac{t \cdot \left(k \cdot k\right)}{\ell}}}{k \cdot \left(k \cdot \left(\frac{1}{\ell} + \frac{\left(k \cdot k\right) \cdot 0.16666666666666666}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{k}{\frac{\ell}{t}} \cdot \left(k \cdot \left(\frac{\sin k}{\ell} \cdot \tan k\right)\right)}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= k 4e-116)
   (/
    (/ 2.0 (/ (* t (* k k)) l))
    (* k (* k (+ (/ 1.0 l) (/ (* (* k k) 0.16666666666666666) l)))))
   (/ 2.0 (* (/ k (/ l t)) (* k (* (/ (sin k) l) (tan k)))))))
double code(double t, double l, double k) {
	double tmp;
	if (k <= 4e-116) {
		tmp = (2.0 / ((t * (k * k)) / l)) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))));
	} else {
		tmp = 2.0 / ((k / (l / t)) * (k * ((sin(k) / l) * tan(k))));
	}
	return tmp;
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 4d-116) then
        tmp = (2.0d0 / ((t * (k * k)) / l)) / (k * (k * ((1.0d0 / l) + (((k * k) * 0.16666666666666666d0) / l))))
    else
        tmp = 2.0d0 / ((k / (l / t)) * (k * ((sin(k) / l) * tan(k))))
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double tmp;
	if (k <= 4e-116) {
		tmp = (2.0 / ((t * (k * k)) / l)) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))));
	} else {
		tmp = 2.0 / ((k / (l / t)) * (k * ((Math.sin(k) / l) * Math.tan(k))));
	}
	return tmp;
}
def code(t, l, k):
	tmp = 0
	if k <= 4e-116:
		tmp = (2.0 / ((t * (k * k)) / l)) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))))
	else:
		tmp = 2.0 / ((k / (l / t)) * (k * ((math.sin(k) / l) * math.tan(k))))
	return tmp
function code(t, l, k)
	tmp = 0.0
	if (k <= 4e-116)
		tmp = Float64(Float64(2.0 / Float64(Float64(t * Float64(k * k)) / l)) / Float64(k * Float64(k * Float64(Float64(1.0 / l) + Float64(Float64(Float64(k * k) * 0.16666666666666666) / l)))));
	else
		tmp = Float64(2.0 / Float64(Float64(k / Float64(l / t)) * Float64(k * Float64(Float64(sin(k) / l) * tan(k)))));
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	tmp = 0.0;
	if (k <= 4e-116)
		tmp = (2.0 / ((t * (k * k)) / l)) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))));
	else
		tmp = 2.0 / ((k / (l / t)) * (k * ((sin(k) / l) * tan(k))));
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := If[LessEqual[k, 4e-116], N[(N[(2.0 / N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * N[(N[(1.0 / l), $MachinePrecision] + N[(N[(N[(k * k), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k / N[(l / t), $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{-116}:\\
\;\;\;\;\frac{\frac{2}{\frac{t \cdot \left(k \cdot k\right)}{\ell}}}{k \cdot \left(k \cdot \left(\frac{1}{\ell} + \frac{\left(k \cdot k\right) \cdot 0.16666666666666666}{\ell}\right)\right)}\\

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


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

    1. Initial program 39.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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}{\cos k} \cdot \ell\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      14. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k, \color{blue}{\ell}\right)\right)\right) \]
      17. cos-lowering-cos.f6476.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e-116 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 83.1% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 2.2 \cdot 10^{-116}:\\ \;\;\;\;\frac{\frac{2}{\frac{t \cdot \left(k \cdot k\right)}{\ell}}}{k \cdot \left(k \cdot \left(\frac{1}{\ell} + \frac{\left(k \cdot k\right) \cdot 0.16666666666666666}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{k \cdot \left(\frac{k}{\frac{\ell}{t}} \cdot \left(\frac{\sin k}{\ell} \cdot \tan k\right)\right)}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= k 2.2e-116)
   (/
    (/ 2.0 (/ (* t (* k k)) l))
    (* k (* k (+ (/ 1.0 l) (/ (* (* k k) 0.16666666666666666) l)))))
   (/ 2.0 (* k (* (/ k (/ l t)) (* (/ (sin k) l) (tan k)))))))
double code(double t, double l, double k) {
	double tmp;
	if (k <= 2.2e-116) {
		tmp = (2.0 / ((t * (k * k)) / l)) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))));
	} else {
		tmp = 2.0 / (k * ((k / (l / t)) * ((sin(k) / l) * tan(k))));
	}
	return tmp;
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 2.2d-116) then
        tmp = (2.0d0 / ((t * (k * k)) / l)) / (k * (k * ((1.0d0 / l) + (((k * k) * 0.16666666666666666d0) / l))))
    else
        tmp = 2.0d0 / (k * ((k / (l / t)) * ((sin(k) / l) * tan(k))))
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double tmp;
	if (k <= 2.2e-116) {
		tmp = (2.0 / ((t * (k * k)) / l)) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))));
	} else {
		tmp = 2.0 / (k * ((k / (l / t)) * ((Math.sin(k) / l) * Math.tan(k))));
	}
	return tmp;
}
def code(t, l, k):
	tmp = 0
	if k <= 2.2e-116:
		tmp = (2.0 / ((t * (k * k)) / l)) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))))
	else:
		tmp = 2.0 / (k * ((k / (l / t)) * ((math.sin(k) / l) * math.tan(k))))
	return tmp
function code(t, l, k)
	tmp = 0.0
	if (k <= 2.2e-116)
		tmp = Float64(Float64(2.0 / Float64(Float64(t * Float64(k * k)) / l)) / Float64(k * Float64(k * Float64(Float64(1.0 / l) + Float64(Float64(Float64(k * k) * 0.16666666666666666) / l)))));
	else
		tmp = Float64(2.0 / Float64(k * Float64(Float64(k / Float64(l / t)) * Float64(Float64(sin(k) / l) * tan(k)))));
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	tmp = 0.0;
	if (k <= 2.2e-116)
		tmp = (2.0 / ((t * (k * k)) / l)) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))));
	else
		tmp = 2.0 / (k * ((k / (l / t)) * ((sin(k) / l) * tan(k))));
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := If[LessEqual[k, 2.2e-116], N[(N[(2.0 / N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * N[(N[(1.0 / l), $MachinePrecision] + N[(N[(N[(k * k), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(k * N[(N[(k / N[(l / t), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-116}:\\
\;\;\;\;\frac{\frac{2}{\frac{t \cdot \left(k \cdot k\right)}{\ell}}}{k \cdot \left(k \cdot \left(\frac{1}{\ell} + \frac{\left(k \cdot k\right) \cdot 0.16666666666666666}{\ell}\right)\right)}\\

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


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

    1. Initial program 39.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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}{\cos k} \cdot \ell\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      14. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k, \color{blue}{\ell}\right)\right)\right) \]
      17. cos-lowering-cos.f6476.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2000000000000001e-116 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 85.0% accurate, 2.0× speedup?

\[\begin{array}{l} \\ 2 \cdot \frac{\frac{\ell}{t \cdot \left(k \cdot k\right)}}{\frac{\sin k}{\ell} \cdot \tan k} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (* 2.0 (/ (/ l (* t (* k k))) (* (/ (sin k) l) (tan k)))))
double code(double t, double l, double k) {
	return 2.0 * ((l / (t * (k * k))) / ((sin(k) / l) * tan(k)));
}
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 * ((l / (t * (k * k))) / ((sin(k) / l) * tan(k)))
end function
public static double code(double t, double l, double k) {
	return 2.0 * ((l / (t * (k * k))) / ((Math.sin(k) / l) * Math.tan(k)));
}
def code(t, l, k):
	return 2.0 * ((l / (t * (k * k))) / ((math.sin(k) / l) * math.tan(k)))
function code(t, l, k)
	return Float64(2.0 * Float64(Float64(l / Float64(t * Float64(k * k))) / Float64(Float64(sin(k) / l) * tan(k))))
end
function tmp = code(t, l, k)
	tmp = 2.0 * ((l / (t * (k * k))) / ((sin(k) / l) * tan(k)));
end
code[t_, l_, k_] := N[(2.0 * N[(N[(l / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
2 \cdot \frac{\frac{\ell}{t \cdot \left(k \cdot k\right)}}{\frac{\sin k}{\ell} \cdot \tan k}
\end{array}
Derivation
  1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{\ell}{t \cdot \left(k \cdot k\right)}}{\frac{\sin k}{\ell} \cdot \tan k} \cdot 2} \]
  12. Final simplification85.7%

    \[\leadsto 2 \cdot \frac{\frac{\ell}{t \cdot \left(k \cdot k\right)}}{\frac{\sin k}{\ell} \cdot \tan k} \]
  13. Add Preprocessing

Alternative 7: 75.6% accurate, 3.6× speedup?

\[\begin{array}{l} \\ \frac{2}{\frac{\left(k \cdot \frac{k \cdot t}{\ell}\right) \cdot \frac{k \cdot k}{\ell}}{\cos k}} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/ 2.0 (/ (* (* k (/ (* k t) l)) (/ (* k k) l)) (cos k))))
double code(double t, double l, double k) {
	return 2.0 / (((k * ((k * t) / l)) * ((k * k) / l)) / cos(k));
}
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 / (((k * ((k * t) / l)) * ((k * k) / l)) / cos(k))
end function
public static double code(double t, double l, double k) {
	return 2.0 / (((k * ((k * t) / l)) * ((k * k) / l)) / Math.cos(k));
}
def code(t, l, k):
	return 2.0 / (((k * ((k * t) / l)) * ((k * k) / l)) / math.cos(k))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(k * Float64(Float64(k * t) / l)) * Float64(Float64(k * k) / l)) / cos(k)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((k * ((k * t) / l)) * ((k * k) / l)) / cos(k));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(k * N[(N[(k * t), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\frac{\left(k \cdot \frac{k \cdot t}{\ell}\right) \cdot \frac{k \cdot k}{\ell}}{\cos k}}
\end{array}
Derivation
  1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 73.9% accurate, 8.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t \cdot \left(k \cdot k\right)}{\ell}\\ \mathbf{if}\;\ell \cdot \ell \leq 10^{-22}:\\ \;\;\;\;\frac{\frac{2}{t\_1}}{\left(k \cdot k\right) \cdot \left(\frac{1}{\ell} + \left(k \cdot k\right) \cdot \left(\frac{0.16666666666666666}{\ell} + \left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{\ell} \cdot 0.03432539682539683 + \frac{0.08611111111111111}{\ell}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \frac{t\_1}{\ell}}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (let* ((t_1 (/ (* t (* k k)) l)))
   (if (<= (* l l) 1e-22)
     (/
      (/ 2.0 t_1)
      (*
       (* k k)
       (+
        (/ 1.0 l)
        (*
         (* k k)
         (+
          (/ 0.16666666666666666 l)
          (*
           (* k k)
           (+
            (* (/ (* k k) l) 0.03432539682539683)
            (/ 0.08611111111111111 l))))))))
     (/ 2.0 (* (* k k) (/ t_1 l))))))
double code(double t, double l, double k) {
	double t_1 = (t * (k * k)) / l;
	double tmp;
	if ((l * l) <= 1e-22) {
		tmp = (2.0 / t_1) / ((k * k) * ((1.0 / l) + ((k * k) * ((0.16666666666666666 / l) + ((k * k) * ((((k * k) / l) * 0.03432539682539683) + (0.08611111111111111 / l)))))));
	} else {
		tmp = 2.0 / ((k * k) * (t_1 / l));
	}
	return tmp;
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (t * (k * k)) / l
    if ((l * l) <= 1d-22) then
        tmp = (2.0d0 / t_1) / ((k * k) * ((1.0d0 / l) + ((k * k) * ((0.16666666666666666d0 / l) + ((k * k) * ((((k * k) / l) * 0.03432539682539683d0) + (0.08611111111111111d0 / l)))))))
    else
        tmp = 2.0d0 / ((k * k) * (t_1 / l))
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double t_1 = (t * (k * k)) / l;
	double tmp;
	if ((l * l) <= 1e-22) {
		tmp = (2.0 / t_1) / ((k * k) * ((1.0 / l) + ((k * k) * ((0.16666666666666666 / l) + ((k * k) * ((((k * k) / l) * 0.03432539682539683) + (0.08611111111111111 / l)))))));
	} else {
		tmp = 2.0 / ((k * k) * (t_1 / l));
	}
	return tmp;
}
def code(t, l, k):
	t_1 = (t * (k * k)) / l
	tmp = 0
	if (l * l) <= 1e-22:
		tmp = (2.0 / t_1) / ((k * k) * ((1.0 / l) + ((k * k) * ((0.16666666666666666 / l) + ((k * k) * ((((k * k) / l) * 0.03432539682539683) + (0.08611111111111111 / l)))))))
	else:
		tmp = 2.0 / ((k * k) * (t_1 / l))
	return tmp
function code(t, l, k)
	t_1 = Float64(Float64(t * Float64(k * k)) / l)
	tmp = 0.0
	if (Float64(l * l) <= 1e-22)
		tmp = Float64(Float64(2.0 / t_1) / Float64(Float64(k * k) * Float64(Float64(1.0 / l) + Float64(Float64(k * k) * Float64(Float64(0.16666666666666666 / l) + Float64(Float64(k * k) * Float64(Float64(Float64(Float64(k * k) / l) * 0.03432539682539683) + Float64(0.08611111111111111 / l))))))));
	else
		tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(t_1 / l)));
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	t_1 = (t * (k * k)) / l;
	tmp = 0.0;
	if ((l * l) <= 1e-22)
		tmp = (2.0 / t_1) / ((k * k) * ((1.0 / l) + ((k * k) * ((0.16666666666666666 / l) + ((k * k) * ((((k * k) / l) * 0.03432539682539683) + (0.08611111111111111 / l)))))));
	else
		tmp = 2.0 / ((k * k) * (t_1 / l));
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 1e-22], N[(N[(2.0 / t$95$1), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(N[(1.0 / l), $MachinePrecision] + N[(N[(k * k), $MachinePrecision] * N[(N[(0.16666666666666666 / l), $MachinePrecision] + N[(N[(k * k), $MachinePrecision] * N[(N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * 0.03432539682539683), $MachinePrecision] + N[(0.08611111111111111 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(t$95$1 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(k \cdot k\right)}{\ell}\\
\mathbf{if}\;\ell \cdot \ell \leq 10^{-22}:\\
\;\;\;\;\frac{\frac{2}{t\_1}}{\left(k \cdot k\right) \cdot \left(\frac{1}{\ell} + \left(k \cdot k\right) \cdot \left(\frac{0.16666666666666666}{\ell} + \left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{\ell} \cdot 0.03432539682539683 + \frac{0.08611111111111111}{\ell}\right)\right)\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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}{\cos k} \cdot \ell\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      14. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k, \color{blue}{\ell}\right)\right)\right) \]
      17. cos-lowering-cos.f6472.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\mathsf{cos.f64}\left(k\right), \ell\right)\right)\right) \]
    7. Applied egg-rr72.6%

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\right)\right), \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{\left({k}^{2} \cdot \left({k}^{2} \cdot \left(\frac{173}{5040} \cdot \frac{{k}^{2}}{\ell} + \frac{31}{360} \cdot \frac{1}{\ell}\right) + \frac{1}{6} \cdot \frac{1}{\ell}\right) + \frac{1}{\ell}\right)}\right)\right) \]
      2. unpow2N/A

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \ell\right), \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{\left({k}^{2} \cdot \left(\frac{173}{5040} \cdot \frac{{k}^{2}}{\ell} + \frac{31}{360} \cdot \frac{1}{\ell}\right) + \frac{1}{6} \cdot \frac{1}{\ell}\right)}\right)\right)\right)\right) \]
      8. unpow2N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{6} \cdot 1}{\ell}\right), \left(\color{blue}{{k}^{2}} \cdot \left(\frac{173}{5040} \cdot \frac{{k}^{2}}{\ell} + \frac{31}{360} \cdot \frac{1}{\ell}\right)\right)\right)\right)\right)\right)\right) \]
      13. metadata-evalN/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(1, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{6}, \ell\right), \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{\left(\frac{173}{5040} \cdot \frac{{k}^{2}}{\ell} + \frac{31}{360} \cdot \frac{1}{\ell}\right)}\right)\right)\right)\right)\right)\right) \]
    10. Simplified83.6%

      \[\leadsto \frac{\frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell}}}{\color{blue}{\left(k \cdot k\right) \cdot \left(\frac{1}{\ell} + \left(k \cdot k\right) \cdot \left(\frac{0.16666666666666666}{\ell} + \left(k \cdot k\right) \cdot \left(\frac{k \cdot k}{\ell} \cdot 0.03432539682539683 + \frac{0.08611111111111111}{\ell}\right)\right)\right)}} \]

    if 1e-22 < (*.f64 l l)

    1. Initial program 40.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 73.8% accurate, 13.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t \cdot \left(k \cdot k\right)}{\ell}\\ \mathbf{if}\;\ell \cdot \ell \leq 10^{-22}:\\ \;\;\;\;\frac{\frac{2}{t\_1}}{k \cdot \left(k \cdot \left(\frac{1}{\ell} + \frac{\left(k \cdot k\right) \cdot 0.16666666666666666}{\ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \frac{t\_1}{\ell}}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (let* ((t_1 (/ (* t (* k k)) l)))
   (if (<= (* l l) 1e-22)
     (/
      (/ 2.0 t_1)
      (* k (* k (+ (/ 1.0 l) (/ (* (* k k) 0.16666666666666666) l)))))
     (/ 2.0 (* (* k k) (/ t_1 l))))))
double code(double t, double l, double k) {
	double t_1 = (t * (k * k)) / l;
	double tmp;
	if ((l * l) <= 1e-22) {
		tmp = (2.0 / t_1) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))));
	} else {
		tmp = 2.0 / ((k * k) * (t_1 / l));
	}
	return tmp;
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (t * (k * k)) / l
    if ((l * l) <= 1d-22) then
        tmp = (2.0d0 / t_1) / (k * (k * ((1.0d0 / l) + (((k * k) * 0.16666666666666666d0) / l))))
    else
        tmp = 2.0d0 / ((k * k) * (t_1 / l))
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double t_1 = (t * (k * k)) / l;
	double tmp;
	if ((l * l) <= 1e-22) {
		tmp = (2.0 / t_1) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))));
	} else {
		tmp = 2.0 / ((k * k) * (t_1 / l));
	}
	return tmp;
}
def code(t, l, k):
	t_1 = (t * (k * k)) / l
	tmp = 0
	if (l * l) <= 1e-22:
		tmp = (2.0 / t_1) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))))
	else:
		tmp = 2.0 / ((k * k) * (t_1 / l))
	return tmp
function code(t, l, k)
	t_1 = Float64(Float64(t * Float64(k * k)) / l)
	tmp = 0.0
	if (Float64(l * l) <= 1e-22)
		tmp = Float64(Float64(2.0 / t_1) / Float64(k * Float64(k * Float64(Float64(1.0 / l) + Float64(Float64(Float64(k * k) * 0.16666666666666666) / l)))));
	else
		tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(t_1 / l)));
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	t_1 = (t * (k * k)) / l;
	tmp = 0.0;
	if ((l * l) <= 1e-22)
		tmp = (2.0 / t_1) / (k * (k * ((1.0 / l) + (((k * k) * 0.16666666666666666) / l))));
	else
		tmp = 2.0 / ((k * k) * (t_1 / l));
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 1e-22], N[(N[(2.0 / t$95$1), $MachinePrecision] / N[(k * N[(k * N[(N[(1.0 / l), $MachinePrecision] + N[(N[(N[(k * k), $MachinePrecision] * 0.16666666666666666), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(t$95$1 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(k \cdot k\right)}{\ell}\\
\mathbf{if}\;\ell \cdot \ell \leq 10^{-22}:\\
\;\;\;\;\frac{\frac{2}{t\_1}}{k \cdot \left(k \cdot \left(\frac{1}{\ell} + \frac{\left(k \cdot k\right) \cdot 0.16666666666666666}{\ell}\right)\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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}{\cos k} \cdot \ell\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      14. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k, \color{blue}{\ell}\right)\right)\right) \]
      17. cos-lowering-cos.f6472.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\mathsf{cos.f64}\left(k\right), \ell\right)\right)\right) \]
    7. Applied egg-rr72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e-22 < (*.f64 l l)

    1. Initial program 40.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 68.5% accurate, 21.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2 \cdot 10^{-161}:\\ \;\;\;\;\ell \cdot \frac{\frac{2}{k \cdot \left(k \cdot \left(k \cdot k\right)\right)}}{\frac{t}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{2}{t}}{k \cdot k} \cdot \frac{\ell \cdot \ell}{k \cdot k}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= l 2e-161)
   (* l (/ (/ 2.0 (* k (* k (* k k)))) (/ t l)))
   (* (/ (/ 2.0 t) (* k k)) (/ (* l l) (* k k)))))
double code(double t, double l, double k) {
	double tmp;
	if (l <= 2e-161) {
		tmp = l * ((2.0 / (k * (k * (k * k)))) / (t / l));
	} else {
		tmp = ((2.0 / t) / (k * k)) * ((l * l) / (k * k));
	}
	return tmp;
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (l <= 2d-161) then
        tmp = l * ((2.0d0 / (k * (k * (k * k)))) / (t / l))
    else
        tmp = ((2.0d0 / t) / (k * k)) * ((l * l) / (k * k))
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double tmp;
	if (l <= 2e-161) {
		tmp = l * ((2.0 / (k * (k * (k * k)))) / (t / l));
	} else {
		tmp = ((2.0 / t) / (k * k)) * ((l * l) / (k * k));
	}
	return tmp;
}
def code(t, l, k):
	tmp = 0
	if l <= 2e-161:
		tmp = l * ((2.0 / (k * (k * (k * k)))) / (t / l))
	else:
		tmp = ((2.0 / t) / (k * k)) * ((l * l) / (k * k))
	return tmp
function code(t, l, k)
	tmp = 0.0
	if (l <= 2e-161)
		tmp = Float64(l * Float64(Float64(2.0 / Float64(k * Float64(k * Float64(k * k)))) / Float64(t / l)));
	else
		tmp = Float64(Float64(Float64(2.0 / t) / Float64(k * k)) * Float64(Float64(l * l) / Float64(k * k)));
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	tmp = 0.0;
	if (l <= 2e-161)
		tmp = l * ((2.0 / (k * (k * (k * k)))) / (t / l));
	else
		tmp = ((2.0 / t) / (k * k)) * ((l * l) / (k * k));
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := If[LessEqual[l, 2e-161], N[(l * N[(N[(2.0 / N[(k * N[(k * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / t), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.00000000000000006e-161

    1. Initial program 34.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000006e-161 < l

    1. Initial program 37.9%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. 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-*.f6456.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{2}{t}}{k \cdot k} \cdot \frac{\ell \cdot \ell}{k \cdot k}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification66.4%

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

Alternative 11: 73.3% accurate, 28.1× speedup?

\[\begin{array}{l} \\ \frac{\frac{2}{\frac{t \cdot \left(k \cdot k\right)}{\ell}}}{\frac{k \cdot k}{\ell}} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/ (/ 2.0 (/ (* t (* k k)) l)) (/ (* k k) l)))
double code(double t, double l, double k) {
	return (2.0 / ((t * (k * k)) / l)) / ((k * k) / l);
}
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 * (k * k)) / l)) / ((k * k) / l)
end function
public static double code(double t, double l, double k) {
	return (2.0 / ((t * (k * k)) / l)) / ((k * k) / l);
}
def code(t, l, k):
	return (2.0 / ((t * (k * k)) / l)) / ((k * k) / l)
function code(t, l, k)
	return Float64(Float64(2.0 / Float64(Float64(t * Float64(k * k)) / l)) / Float64(Float64(k * k) / l))
end
function tmp = code(t, l, k)
	tmp = (2.0 / ((t * (k * k)) / l)) / ((k * k) / l);
end
code[t_, l_, k_] := N[(N[(2.0 / N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{2}{\frac{t \cdot \left(k \cdot k\right)}{\ell}}}{\frac{k \cdot k}{\ell}}
\end{array}
Derivation
  1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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}{\cos k} \cdot \ell\right)\right)\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
    14. cos-lowering-cos.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
    15. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k \cdot \ell\right)\right)\right) \]
    16. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \ell\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(\cos k, \color{blue}{\ell}\right)\right)\right) \]
    17. cos-lowering-cos.f6473.4%

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

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

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

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

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

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

    \[\leadsto \frac{\frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell}}}{\color{blue}{\frac{k \cdot k}{\ell}}} \]
  11. Final simplification73.0%

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

Alternative 12: 72.1% accurate, 28.1× speedup?

\[\begin{array}{l} \\ \frac{2}{\left(k \cdot k\right) \cdot \frac{\frac{t \cdot \left(k \cdot k\right)}{\ell}}{\ell}} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/ 2.0 (* (* k k) (/ (/ (* t (* k k)) l) l))))
double code(double t, double l, double k) {
	return 2.0 / ((k * k) * (((t * (k * k)) / l) / l));
}
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 / ((k * k) * (((t * (k * k)) / l) / l))
end function
public static double code(double t, double l, double k) {
	return 2.0 / ((k * k) * (((t * (k * k)) / l) / l));
}
def code(t, l, k):
	return 2.0 / ((k * k) * (((t * (k * k)) / l) / l))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(Float64(t * Float64(k * k)) / l) / l)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / ((k * k) * (((t * (k * k)) / l) / l));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\left(k \cdot k\right) \cdot \frac{\frac{t \cdot \left(k \cdot k\right)}{\ell}}{\ell}}
\end{array}
Derivation
  1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\color{blue}{\frac{\frac{\left(k \cdot k\right) \cdot t}{\ell}}{\ell} \cdot \left(k \cdot k\right)}} \]
  8. Final simplification73.0%

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

Alternative 13: 64.8% accurate, 28.1× speedup?

\[\begin{array}{l} \\ \frac{\frac{2}{t}}{k \cdot k} \cdot \frac{\ell \cdot \ell}{k \cdot k} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (* (/ (/ 2.0 t) (* k k)) (/ (* l l) (* k k))))
double code(double t, double l, double k) {
	return ((2.0 / t) / (k * k)) * ((l * l) / (k * k));
}
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) / (k * k)) * ((l * l) / (k * k))
end function
public static double code(double t, double l, double k) {
	return ((2.0 / t) / (k * k)) * ((l * l) / (k * k));
}
def code(t, l, k):
	return ((2.0 / t) / (k * k)) * ((l * l) / (k * k))
function code(t, l, k)
	return Float64(Float64(Float64(2.0 / t) / Float64(k * k)) * Float64(Float64(l * l) / Float64(k * k)))
end
function tmp = code(t, l, k)
	tmp = ((2.0 / t) / (k * k)) * ((l * l) / (k * k));
end
code[t_, l_, k_] := N[(N[(N[(2.0 / t), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{2}{t}}{k \cdot k} \cdot \frac{\ell \cdot \ell}{k \cdot k}
\end{array}
Derivation
  1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\frac{2}{t}}{k \cdot k} \cdot \frac{\ell \cdot \ell}{k \cdot k}} \]
  10. Add Preprocessing

Alternative 14: 63.5% accurate, 28.1× speedup?

\[\begin{array}{l} \\ \frac{\frac{2}{t}}{k} \cdot \frac{\ell \cdot \ell}{k \cdot \left(k \cdot k\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (* (/ (/ 2.0 t) k) (/ (* l l) (* k (* k k)))))
double code(double t, double l, double k) {
	return ((2.0 / t) / k) * ((l * l) / (k * (k * k)));
}
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) / k) * ((l * l) / (k * (k * k)))
end function
public static double code(double t, double l, double k) {
	return ((2.0 / t) / k) * ((l * l) / (k * (k * k)));
}
def code(t, l, k):
	return ((2.0 / t) / k) * ((l * l) / (k * (k * k)))
function code(t, l, k)
	return Float64(Float64(Float64(2.0 / t) / k) * Float64(Float64(l * l) / Float64(k * Float64(k * k))))
end
function tmp = code(t, l, k)
	tmp = ((2.0 / t) / k) * ((l * l) / (k * (k * k)));
end
code[t_, l_, k_] := N[(N[(N[(2.0 / t), $MachinePrecision] / k), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(k * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{2}{t}}{k} \cdot \frac{\ell \cdot \ell}{k \cdot \left(k \cdot k\right)}
\end{array}
Derivation
  1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 20.0% accurate, 46.8× speedup?

\[\begin{array}{l} \\ \frac{0 - 0.11666666666666667}{\frac{t}{\ell \cdot \ell}} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/ (- 0.0 0.11666666666666667) (/ t (* l l))))
double code(double t, double l, double k) {
	return (0.0 - 0.11666666666666667) / (t / (l * l));
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = (0.0d0 - 0.11666666666666667d0) / (t / (l * l))
end function
public static double code(double t, double l, double k) {
	return (0.0 - 0.11666666666666667) / (t / (l * l));
}
def code(t, l, k):
	return (0.0 - 0.11666666666666667) / (t / (l * l))
function code(t, l, k)
	return Float64(Float64(0.0 - 0.11666666666666667) / Float64(t / Float64(l * l)))
end
function tmp = code(t, l, k)
	tmp = (0.0 - 0.11666666666666667) / (t / (l * l));
end
code[t_, l_, k_] := N[(N[(0.0 - 0.11666666666666667), $MachinePrecision] / N[(t / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{0 - 0.11666666666666667}{\frac{t}{\ell \cdot \ell}}
\end{array}
Derivation
  1. Initial program 35.4%

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

    \[\leadsto \color{blue}{\frac{2 \cdot \frac{{\ell}^{2}}{t} + {k}^{2} \cdot \left(-2 \cdot \left({k}^{2} \cdot \left(\frac{-1}{36} \cdot \frac{{\ell}^{2}}{t} + \frac{31}{360} \cdot \frac{{\ell}^{2}}{t}\right)\right) + \frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right)}{{k}^{4}}} \]
  4. Simplified34.5%

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

    \[\leadsto \color{blue}{\frac{-7}{60} \cdot \frac{{\ell}^{2}}{t}} \]
  6. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\frac{-7}{60} \cdot {\ell}^{2}}{\color{blue}{t}} \]
    2. /-lowering-/.f64N/A

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{-7}{60}\right), t\right) \]
    6. *-lowering-*.f6420.5%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{-7}{60}\right), t\right) \]
  7. Simplified20.5%

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

      \[\leadsto \frac{\frac{-7}{60} \cdot \left(\ell \cdot \ell\right)}{t} \]
    2. associate-/l*N/A

      \[\leadsto \frac{-7}{60} \cdot \color{blue}{\frac{\ell \cdot \ell}{t}} \]
    3. *-lowering-*.f64N/A

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

      \[\leadsto \mathsf{*.f64}\left(\frac{-7}{60}, \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \color{blue}{t}\right)\right) \]
    5. *-lowering-*.f6420.5%

      \[\leadsto \mathsf{*.f64}\left(\frac{-7}{60}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right)\right) \]
  9. Applied egg-rr20.5%

    \[\leadsto \color{blue}{-0.11666666666666667 \cdot \frac{\ell \cdot \ell}{t}} \]
  10. Step-by-step derivation
    1. clear-numN/A

      \[\leadsto \frac{-7}{60} \cdot \frac{1}{\color{blue}{\frac{t}{\ell \cdot \ell}}} \]
    2. un-div-invN/A

      \[\leadsto \frac{\frac{-7}{60}}{\color{blue}{\frac{t}{\ell \cdot \ell}}} \]
    3. frac-2negN/A

      \[\leadsto \frac{\mathsf{neg}\left(\frac{-7}{60}\right)}{\color{blue}{\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)}} \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\frac{-7}{60}\right)\right), \color{blue}{\left(\mathsf{neg}\left(\frac{t}{\ell \cdot \ell}\right)\right)}\right) \]
    5. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\frac{7}{60}, \left(\mathsf{neg}\left(\color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)\right) \]
    6. neg-sub0N/A

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

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

      \[\leadsto \mathsf{/.f64}\left(\frac{7}{60}, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(t, \color{blue}{\left(\ell \cdot \ell\right)}\right)\right)\right) \]
    9. *-lowering-*.f6428.8%

      \[\leadsto \mathsf{/.f64}\left(\frac{7}{60}, \mathsf{\_.f64}\left(0, \mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
  11. Applied egg-rr28.8%

    \[\leadsto \color{blue}{\frac{0.11666666666666667}{0 - \frac{t}{\ell \cdot \ell}}} \]
  12. Final simplification20.5%

    \[\leadsto \frac{0 - 0.11666666666666667}{\frac{t}{\ell \cdot \ell}} \]
  13. Add Preprocessing

Alternative 16: 19.9% accurate, 60.1× speedup?

\[\begin{array}{l} \\ -0.11666666666666667 \cdot \frac{\ell \cdot \ell}{t} \end{array} \]
(FPCore (t l k) :precision binary64 (* -0.11666666666666667 (/ (* l l) t)))
double code(double t, double l, double k) {
	return -0.11666666666666667 * ((l * l) / t);
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = (-0.11666666666666667d0) * ((l * l) / t)
end function
public static double code(double t, double l, double k) {
	return -0.11666666666666667 * ((l * l) / t);
}
def code(t, l, k):
	return -0.11666666666666667 * ((l * l) / t)
function code(t, l, k)
	return Float64(-0.11666666666666667 * Float64(Float64(l * l) / t))
end
function tmp = code(t, l, k)
	tmp = -0.11666666666666667 * ((l * l) / t);
end
code[t_, l_, k_] := N[(-0.11666666666666667 * N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
-0.11666666666666667 \cdot \frac{\ell \cdot \ell}{t}
\end{array}
Derivation
  1. Initial program 35.4%

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

    \[\leadsto \color{blue}{\frac{2 \cdot \frac{{\ell}^{2}}{t} + {k}^{2} \cdot \left(-2 \cdot \left({k}^{2} \cdot \left(\frac{-1}{36} \cdot \frac{{\ell}^{2}}{t} + \frac{31}{360} \cdot \frac{{\ell}^{2}}{t}\right)\right) + \frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right)}{{k}^{4}}} \]
  4. Simplified34.5%

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

    \[\leadsto \color{blue}{\frac{-7}{60} \cdot \frac{{\ell}^{2}}{t}} \]
  6. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\frac{-7}{60} \cdot {\ell}^{2}}{\color{blue}{t}} \]
    2. /-lowering-/.f64N/A

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{-7}{60}\right), t\right) \]
    6. *-lowering-*.f6420.5%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{-7}{60}\right), t\right) \]
  7. Simplified20.5%

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

      \[\leadsto \frac{\frac{-7}{60} \cdot \left(\ell \cdot \ell\right)}{t} \]
    2. associate-/l*N/A

      \[\leadsto \frac{-7}{60} \cdot \color{blue}{\frac{\ell \cdot \ell}{t}} \]
    3. *-lowering-*.f64N/A

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

      \[\leadsto \mathsf{*.f64}\left(\frac{-7}{60}, \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \color{blue}{t}\right)\right) \]
    5. *-lowering-*.f6420.5%

      \[\leadsto \mathsf{*.f64}\left(\frac{-7}{60}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right)\right) \]
  9. Applied egg-rr20.5%

    \[\leadsto \color{blue}{-0.11666666666666667 \cdot \frac{\ell \cdot \ell}{t}} \]
  10. Add Preprocessing

Alternative 17: 17.7% accurate, 60.1× speedup?

\[\begin{array}{l} \\ -0.11666666666666667 \cdot \frac{\ell}{\frac{t}{\ell}} \end{array} \]
(FPCore (t l k) :precision binary64 (* -0.11666666666666667 (/ l (/ t l))))
double code(double t, double l, double k) {
	return -0.11666666666666667 * (l / (t / l));
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = (-0.11666666666666667d0) * (l / (t / l))
end function
public static double code(double t, double l, double k) {
	return -0.11666666666666667 * (l / (t / l));
}
def code(t, l, k):
	return -0.11666666666666667 * (l / (t / l))
function code(t, l, k)
	return Float64(-0.11666666666666667 * Float64(l / Float64(t / l)))
end
function tmp = code(t, l, k)
	tmp = -0.11666666666666667 * (l / (t / l));
end
code[t_, l_, k_] := N[(-0.11666666666666667 * N[(l / N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
-0.11666666666666667 \cdot \frac{\ell}{\frac{t}{\ell}}
\end{array}
Derivation
  1. Initial program 35.4%

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

    \[\leadsto \color{blue}{\frac{2 \cdot \frac{{\ell}^{2}}{t} + {k}^{2} \cdot \left(-2 \cdot \left({k}^{2} \cdot \left(\frac{-1}{36} \cdot \frac{{\ell}^{2}}{t} + \frac{31}{360} \cdot \frac{{\ell}^{2}}{t}\right)\right) + \frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right)}{{k}^{4}}} \]
  4. Simplified34.5%

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

    \[\leadsto \color{blue}{\frac{-7}{60} \cdot \frac{{\ell}^{2}}{t}} \]
  6. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\frac{-7}{60} \cdot {\ell}^{2}}{\color{blue}{t}} \]
    2. /-lowering-/.f64N/A

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \ell\right), \frac{-7}{60}\right), t\right) \]
    6. *-lowering-*.f6420.5%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \frac{-7}{60}\right), t\right) \]
  7. Simplified20.5%

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

      \[\leadsto \frac{\frac{-7}{60} \cdot \left(\ell \cdot \ell\right)}{t} \]
    2. associate-/l*N/A

      \[\leadsto \frac{-7}{60} \cdot \color{blue}{\frac{\ell \cdot \ell}{t}} \]
    3. *-lowering-*.f64N/A

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

      \[\leadsto \mathsf{*.f64}\left(\frac{-7}{60}, \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \color{blue}{t}\right)\right) \]
    5. *-lowering-*.f6420.5%

      \[\leadsto \mathsf{*.f64}\left(\frac{-7}{60}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), t\right)\right) \]
  9. Applied egg-rr20.5%

    \[\leadsto \color{blue}{-0.11666666666666667 \cdot \frac{\ell \cdot \ell}{t}} \]
  10. Step-by-step derivation
    1. clear-numN/A

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

      \[\leadsto \mathsf{*.f64}\left(\frac{-7}{60}, \left(\frac{1}{\frac{\frac{t}{\ell}}{\color{blue}{\ell}}}\right)\right) \]
    3. clear-numN/A

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

      \[\leadsto \mathsf{*.f64}\left(\frac{-7}{60}, \mathsf{/.f64}\left(\ell, \color{blue}{\left(\frac{t}{\ell}\right)}\right)\right) \]
    5. /-lowering-/.f6417.2%

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

    \[\leadsto -0.11666666666666667 \cdot \color{blue}{\frac{\ell}{\frac{t}{\ell}}} \]
  12. Add Preprocessing

Reproduce

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