Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.9% → 95.8%
Time: 18.3s
Alternatives: 14
Speedup: 11.0×

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 14 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.9% 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: 95.8% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, t\right), \tan \color{blue}{k}\right)\right)\right) \]
    15. tan-lowering-tan.f6494.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 95.8% accurate, 1.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 80.9% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 43.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, t\right), \tan \color{blue}{k}\right)\right)\right) \]
      15. tan-lowering-tan.f6494.5%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(k, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \color{blue}{\ell}\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, t\right), \mathsf{tan.f64}\left(k\right)\right)\right)\right) \]
    12. Simplified82.3%

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

    if 2.0000000000000001e-27 < k

    1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, t\right), \tan \color{blue}{k}\right)\right)\right) \]
      15. tan-lowering-tan.f6496.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 92.0% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\ell}{\sin k \cdot \left(\frac{k}{\ell} \cdot \left(\left(k \cdot t\right) \cdot \tan k\right)\right)} \cdot 2} \]
  10. Final simplification93.8%

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

Alternative 5: 91.9% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{2}{\sin k \cdot \left(\frac{k}{\ell} \cdot \left(\left(k \cdot t\right) \cdot \tan k\right)\right)} \cdot \ell} \]
  10. Final simplification93.5%

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

Alternative 6: 67.4% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 4.6:\\ \;\;\;\;\frac{\frac{\ell \cdot \mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right)}{k}}{\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left(\ell \cdot \ell\right)}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= k 4.6)
   (/
    (/ (* l (fma (* k k) 0.3333333333333333 2.0)) k)
    (* (/ k l) (* (tan k) (* k t))))
   (/ (* 2.0 (* l l)) (* k (* k (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
	double tmp;
	if (k <= 4.6) {
		tmp = ((l * fma((k * k), 0.3333333333333333, 2.0)) / k) / ((k / l) * (tan(k) * (k * t)));
	} else {
		tmp = (2.0 * (l * l)) / (k * (k * (t * pow(sin(k), 2.0))));
	}
	return tmp;
}
function code(t, l, k)
	tmp = 0.0
	if (k <= 4.6)
		tmp = Float64(Float64(Float64(l * fma(Float64(k * k), 0.3333333333333333, 2.0)) / k) / Float64(Float64(k / l) * Float64(tan(k) * Float64(k * t))));
	else
		tmp = Float64(Float64(2.0 * Float64(l * l)) / Float64(k * Float64(k * Float64(t * (sin(k) ^ 2.0)))));
	end
	return tmp
end
code[t_, l_, k_] := If[LessEqual[k, 4.6], N[(N[(N[(l * N[(N[(k * k), $MachinePrecision] * 0.3333333333333333 + 2.0), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.6:\\
\;\;\;\;\frac{\frac{\ell \cdot \mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right)}{k}}{\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)}\\

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


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

    1. Initial program 43.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(k, k\right), \frac{1}{3}, 2\right)\right), k\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, t\right), \mathsf{tan.f64}\left(k\right)\right)\right)\right) \]
    12. Simplified71.3%

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

    if 4.5999999999999996 < k

    1. Initial program 38.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.3% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 28:\\ \;\;\;\;\frac{\frac{\ell \cdot \mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right)}{k}}{\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(k \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= k 28.0)
   (/
    (/ (* l (fma (* k k) 0.3333333333333333 2.0)) k)
    (* (/ k l) (* (tan k) (* k t))))
   (/ (* 2.0 (* l (* l (cos k)))) (* k (* k (* t (* k k)))))))
double code(double t, double l, double k) {
	double tmp;
	if (k <= 28.0) {
		tmp = ((l * fma((k * k), 0.3333333333333333, 2.0)) / k) / ((k / l) * (tan(k) * (k * t)));
	} else {
		tmp = (2.0 * (l * (l * cos(k)))) / (k * (k * (t * (k * k))));
	}
	return tmp;
}
function code(t, l, k)
	tmp = 0.0
	if (k <= 28.0)
		tmp = Float64(Float64(Float64(l * fma(Float64(k * k), 0.3333333333333333, 2.0)) / k) / Float64(Float64(k / l) * Float64(tan(k) * Float64(k * t))));
	else
		tmp = Float64(Float64(2.0 * Float64(l * Float64(l * cos(k)))) / Float64(k * Float64(k * Float64(t * Float64(k * k)))));
	end
	return tmp
end
code[t_, l_, k_] := If[LessEqual[k, 28.0], N[(N[(N[(l * N[(N[(k * k), $MachinePrecision] * 0.3333333333333333 + 2.0), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / N[(N[(k / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq 28:\\
\;\;\;\;\frac{\frac{\ell \cdot \mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right)}{k}}{\frac{k}{\ell} \cdot \left(\tan k \cdot \left(k \cdot t\right)\right)}\\

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


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

    1. Initial program 43.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(k, k\right), \frac{1}{3}, 2\right)\right), k\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, t\right), \mathsf{tan.f64}\left(k\right)\right)\right)\right) \]
    12. Simplified71.3%

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

    if 28 < k

    1. Initial program 38.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{cos.f64}\left(k\right)\right)\right)\right), \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right)\right)\right)\right) \]
    8. Simplified65.3%

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

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

Alternative 8: 75.1% accurate, 2.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, t\right), \tan \color{blue}{k}\right)\right)\right) \]
    15. tan-lowering-tan.f6494.9%

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

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

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

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

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

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

Alternative 9: 75.1% accurate, 3.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, \color{blue}{k}\right), \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, t\right), \mathsf{tan.f64}\left(k\right)\right)\right)\right)\right) \]
  11. Step-by-step derivation
    1. Simplified78.5%

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

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

    Alternative 10: 70.7% accurate, 7.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 0:\\ \;\;\;\;\left(2 \cdot \ell\right) \cdot \frac{\ell}{k \cdot \left(k \cdot \left(k \cdot \left(k \cdot t\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot \left(k \cdot k\right)} \cdot \frac{\ell \cdot \ell}{k \cdot k}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (if (<= (* l l) 0.0)
       (* (* 2.0 l) (/ l (* k (* k (* k (* k t))))))
       (* (/ 2.0 (* t (* k k))) (/ (* l l) (* k k)))))
    double code(double t, double l, double k) {
    	double tmp;
    	if ((l * l) <= 0.0) {
    		tmp = (2.0 * l) * (l / (k * (k * (k * (k * t)))));
    	} 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 * l) <= 0.0d0) then
            tmp = (2.0d0 * l) * (l / (k * (k * (k * (k * t)))))
        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 * l) <= 0.0) {
    		tmp = (2.0 * l) * (l / (k * (k * (k * (k * t)))));
    	} else {
    		tmp = (2.0 / (t * (k * k))) * ((l * l) / (k * k));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	tmp = 0
    	if (l * l) <= 0.0:
    		tmp = (2.0 * l) * (l / (k * (k * (k * (k * t)))))
    	else:
    		tmp = (2.0 / (t * (k * k))) * ((l * l) / (k * k))
    	return tmp
    
    function code(t, l, k)
    	tmp = 0.0
    	if (Float64(l * l) <= 0.0)
    		tmp = Float64(Float64(2.0 * l) * Float64(l / Float64(k * Float64(k * Float64(k * Float64(k * t))))));
    	else
    		tmp = Float64(Float64(2.0 / Float64(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 * l) <= 0.0)
    		tmp = (2.0 * l) * (l / (k * (k * (k * (k * t)))));
    	else
    		tmp = (2.0 / (t * (k * k))) * ((l * l) / (k * k));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(N[(2.0 * l), $MachinePrecision] * N[(l / N[(k * N[(k * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\ell \cdot \ell \leq 0:\\
    \;\;\;\;\left(2 \cdot \ell\right) \cdot \frac{\ell}{k \cdot \left(k \cdot \left(k \cdot \left(k \cdot t\right)\right)\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{t \cdot \left(k \cdot k\right)} \cdot \frac{\ell \cdot \ell}{k \cdot k}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 l l) < 0.0

      1. Initial program 26.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 0.0 < (*.f64 l l)

      1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 73.0% accurate, 9.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 72.4% accurate, 9.6× speedup?

    \[\begin{array}{l} \\ \frac{\ell}{k} \cdot \frac{2 \cdot \ell}{k \cdot \left(k \cdot \left(k \cdot t\right)\right)} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (* (/ l k) (/ (* 2.0 l) (* k (* k (* k t))))))
    double code(double t, double l, double k) {
    	return (l / k) * ((2.0 * l) / (k * (k * (k * t))));
    }
    
    real(8) function code(t, l, k)
        real(8), intent (in) :: t
        real(8), intent (in) :: l
        real(8), intent (in) :: k
        code = (l / k) * ((2.0d0 * l) / (k * (k * (k * t))))
    end function
    
    public static double code(double t, double l, double k) {
    	return (l / k) * ((2.0 * l) / (k * (k * (k * t))));
    }
    
    def code(t, l, k):
    	return (l / k) * ((2.0 * l) / (k * (k * (k * t))))
    
    function code(t, l, k)
    	return Float64(Float64(l / k) * Float64(Float64(2.0 * l) / Float64(k * Float64(k * Float64(k * t)))))
    end
    
    function tmp = code(t, l, k)
    	tmp = (l / k) * ((2.0 * l) / (k * (k * (k * t))));
    end
    
    code[t_, l_, k_] := N[(N[(l / k), $MachinePrecision] * N[(N[(2.0 * l), $MachinePrecision] / N[(k * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \frac{\ell}{k} \cdot \frac{2 \cdot \ell}{k \cdot \left(k \cdot \left(k \cdot t\right)\right)}
    \end{array}
    
    Derivation
    1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{2 \cdot \ell}{k \cdot \left(k \cdot \left(k \cdot t\right)\right)} \cdot \frac{\ell}{k}} \]
    10. Final simplification76.7%

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

    Alternative 13: 70.3% accurate, 11.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 14: 69.5% accurate, 11.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Reproduce

    ?
    herbie shell --seed 2024193 
    (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))))