Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.4% → 95.2%
Time: 15.2s
Alternatives: 13
Speedup: 8.6×

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 13 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.4% 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.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := {\sin k}^{2} \cdot t\\ t_2 := \frac{k}{\ell} \cdot k\\ \mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-268}:\\ \;\;\;\;\frac{2}{\left(t\_2 \cdot t\_2\right) \cdot t}\\ \mathbf{elif}\;\ell \cdot \ell \leq 10^{+265}:\\ \;\;\;\;\frac{2}{\frac{t\_1 \cdot k}{\ell} \cdot \frac{k}{\cos k \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{\frac{k}{\cos k}}{\ell}\right) \cdot t\_1}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (let* ((t_1 (* (pow (sin k) 2.0) t)) (t_2 (* (/ k l) k)))
   (if (<= (* l l) 5e-268)
     (/ 2.0 (* (* t_2 t_2) t))
     (if (<= (* l l) 1e+265)
       (/ 2.0 (* (/ (* t_1 k) l) (/ k (* (cos k) l))))
       (/ 2.0 (* (* (/ k l) (/ (/ k (cos k)) l)) t_1))))))
double code(double t, double l, double k) {
	double t_1 = pow(sin(k), 2.0) * t;
	double t_2 = (k / l) * k;
	double tmp;
	if ((l * l) <= 5e-268) {
		tmp = 2.0 / ((t_2 * t_2) * t);
	} else if ((l * l) <= 1e+265) {
		tmp = 2.0 / (((t_1 * k) / l) * (k / (cos(k) * l)));
	} else {
		tmp = 2.0 / (((k / l) * ((k / cos(k)) / l)) * t_1);
	}
	return tmp;
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (sin(k) ** 2.0d0) * t
    t_2 = (k / l) * k
    if ((l * l) <= 5d-268) then
        tmp = 2.0d0 / ((t_2 * t_2) * t)
    else if ((l * l) <= 1d+265) then
        tmp = 2.0d0 / (((t_1 * k) / l) * (k / (cos(k) * l)))
    else
        tmp = 2.0d0 / (((k / l) * ((k / cos(k)) / l)) * t_1)
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double t_1 = Math.pow(Math.sin(k), 2.0) * t;
	double t_2 = (k / l) * k;
	double tmp;
	if ((l * l) <= 5e-268) {
		tmp = 2.0 / ((t_2 * t_2) * t);
	} else if ((l * l) <= 1e+265) {
		tmp = 2.0 / (((t_1 * k) / l) * (k / (Math.cos(k) * l)));
	} else {
		tmp = 2.0 / (((k / l) * ((k / Math.cos(k)) / l)) * t_1);
	}
	return tmp;
}
def code(t, l, k):
	t_1 = math.pow(math.sin(k), 2.0) * t
	t_2 = (k / l) * k
	tmp = 0
	if (l * l) <= 5e-268:
		tmp = 2.0 / ((t_2 * t_2) * t)
	elif (l * l) <= 1e+265:
		tmp = 2.0 / (((t_1 * k) / l) * (k / (math.cos(k) * l)))
	else:
		tmp = 2.0 / (((k / l) * ((k / math.cos(k)) / l)) * t_1)
	return tmp
function code(t, l, k)
	t_1 = Float64((sin(k) ^ 2.0) * t)
	t_2 = Float64(Float64(k / l) * k)
	tmp = 0.0
	if (Float64(l * l) <= 5e-268)
		tmp = Float64(2.0 / Float64(Float64(t_2 * t_2) * t));
	elseif (Float64(l * l) <= 1e+265)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_1 * k) / l) * Float64(k / Float64(cos(k) * l))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(Float64(k / cos(k)) / l)) * t_1));
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	t_1 = (sin(k) ^ 2.0) * t;
	t_2 = (k / l) * k;
	tmp = 0.0;
	if ((l * l) <= 5e-268)
		tmp = 2.0 / ((t_2 * t_2) * t);
	elseif ((l * l) <= 1e+265)
		tmp = 2.0 / (((t_1 * k) / l) * (k / (cos(k) * l)));
	else
		tmp = 2.0 / (((k / l) * ((k / cos(k)) / l)) * t_1);
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 5e-268], N[(2.0 / N[(N[(t$95$2 * t$95$2), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+265], N[(2.0 / N[(N[(N[(t$95$1 * k), $MachinePrecision] / l), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := {\sin k}^{2} \cdot t\\
t_2 := \frac{k}{\ell} \cdot k\\
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-268}:\\
\;\;\;\;\frac{2}{\left(t\_2 \cdot t\_2\right) \cdot t}\\

\mathbf{elif}\;\ell \cdot \ell \leq 10^{+265}:\\
\;\;\;\;\frac{2}{\frac{t\_1 \cdot k}{\ell} \cdot \frac{k}{\cos k \cdot \ell}}\\

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


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

    1. Initial program 30.4%

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
      5. unpow2N/A

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

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

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

        \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
      9. lower-pow.f6477.3

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
    5. Applied rewrites77.3%

      \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
    6. Step-by-step derivation
      1. Applied rewrites62.7%

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
      2. Step-by-step derivation
        1. Applied rewrites92.4%

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

        if 4.9999999999999999e-268 < (*.f64 l l) < 1.00000000000000007e265

        1. Initial program 30.3%

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

            \[\leadsto \frac{2}{\color{blue}{\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. *-commutativeN/A

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\left({\left(\frac{k}{t}\right)}^{2} + \color{blue}{0}\right) \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)} \]
          11. +-rgt-identityN/A

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

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

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

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

            \[\leadsto \frac{2}{{\left(\frac{k}{t}\right)}^{2} \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}}} \]
        4. Applied rewrites40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\frac{k}{\cos k \cdot \ell} \cdot \frac{\left(\color{blue}{{\sin k}^{2}} \cdot t\right) \cdot k}{\ell}} \]
          19. lower-sin.f6497.7

            \[\leadsto \frac{2}{\frac{k}{\cos k \cdot \ell} \cdot \frac{\left({\color{blue}{\sin k}}^{2} \cdot t\right) \cdot k}{\ell}} \]
        7. Applied rewrites97.7%

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

        if 1.00000000000000007e265 < (*.f64 l l)

        1. Initial program 30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\frac{\frac{k}{\cos k}}{\ell} \cdot \color{blue}{\frac{\left(t \cdot {\sin k}^{2}\right) \cdot k}{\ell}}} \]
        5. Applied rewrites90.3%

          \[\leadsto \frac{2}{\color{blue}{\frac{\frac{k}{\cos k}}{\ell} \cdot \frac{\left({\sin k}^{2} \cdot t\right) \cdot k}{\ell}}} \]
        6. Step-by-step derivation
          1. Applied rewrites99.5%

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

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

        Alternative 2: 95.4% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\frac{k}{\cos k}}{\ell}\\ t_2 := {\sin k}^{2}\\ \mathbf{if}\;t \leq 10^{+54}:\\ \;\;\;\;\frac{2}{\left(\frac{k \cdot t}{\ell} \cdot t\_2\right) \cdot t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{t\_2 \cdot t}{\ell} \cdot k\right) \cdot t\_1}\\ \end{array} \end{array} \]
        (FPCore (t l k)
         :precision binary64
         (let* ((t_1 (/ (/ k (cos k)) l)) (t_2 (pow (sin k) 2.0)))
           (if (<= t 1e+54)
             (/ 2.0 (* (* (/ (* k t) l) t_2) t_1))
             (/ 2.0 (* (* (/ (* t_2 t) l) k) t_1)))))
        double code(double t, double l, double k) {
        	double t_1 = (k / cos(k)) / l;
        	double t_2 = pow(sin(k), 2.0);
        	double tmp;
        	if (t <= 1e+54) {
        		tmp = 2.0 / ((((k * t) / l) * t_2) * t_1);
        	} else {
        		tmp = 2.0 / ((((t_2 * t) / l) * k) * t_1);
        	}
        	return tmp;
        }
        
        real(8) function code(t, l, k)
            real(8), intent (in) :: t
            real(8), intent (in) :: l
            real(8), intent (in) :: k
            real(8) :: t_1
            real(8) :: t_2
            real(8) :: tmp
            t_1 = (k / cos(k)) / l
            t_2 = sin(k) ** 2.0d0
            if (t <= 1d+54) then
                tmp = 2.0d0 / ((((k * t) / l) * t_2) * t_1)
            else
                tmp = 2.0d0 / ((((t_2 * t) / l) * k) * t_1)
            end if
            code = tmp
        end function
        
        public static double code(double t, double l, double k) {
        	double t_1 = (k / Math.cos(k)) / l;
        	double t_2 = Math.pow(Math.sin(k), 2.0);
        	double tmp;
        	if (t <= 1e+54) {
        		tmp = 2.0 / ((((k * t) / l) * t_2) * t_1);
        	} else {
        		tmp = 2.0 / ((((t_2 * t) / l) * k) * t_1);
        	}
        	return tmp;
        }
        
        def code(t, l, k):
        	t_1 = (k / math.cos(k)) / l
        	t_2 = math.pow(math.sin(k), 2.0)
        	tmp = 0
        	if t <= 1e+54:
        		tmp = 2.0 / ((((k * t) / l) * t_2) * t_1)
        	else:
        		tmp = 2.0 / ((((t_2 * t) / l) * k) * t_1)
        	return tmp
        
        function code(t, l, k)
        	t_1 = Float64(Float64(k / cos(k)) / l)
        	t_2 = sin(k) ^ 2.0
        	tmp = 0.0
        	if (t <= 1e+54)
        		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * t) / l) * t_2) * t_1));
        	else
        		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_2 * t) / l) * k) * t_1));
        	end
        	return tmp
        end
        
        function tmp_2 = code(t, l, k)
        	t_1 = (k / cos(k)) / l;
        	t_2 = sin(k) ^ 2.0;
        	tmp = 0.0;
        	if (t <= 1e+54)
        		tmp = 2.0 / ((((k * t) / l) * t_2) * t_1);
        	else
        		tmp = 2.0 / ((((t_2 * t) / l) * k) * t_1);
        	end
        	tmp_2 = tmp;
        end
        
        code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t, 1e+54], N[(2.0 / N[(N[(N[(N[(k * t), $MachinePrecision] / l), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$2 * t), $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{\frac{k}{\cos k}}{\ell}\\
        t_2 := {\sin k}^{2}\\
        \mathbf{if}\;t \leq 10^{+54}:\\
        \;\;\;\;\frac{2}{\left(\frac{k \cdot t}{\ell} \cdot t\_2\right) \cdot t\_1}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{2}{\left(\frac{t\_2 \cdot t}{\ell} \cdot k\right) \cdot t\_1}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < 1.0000000000000001e54

          1. Initial program 33.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{2}{\frac{\frac{k}{\cos k}}{\ell} \cdot \color{blue}{\frac{\left(t \cdot {\sin k}^{2}\right) \cdot k}{\ell}}} \]
          5. Applied rewrites93.5%

            \[\leadsto \frac{2}{\color{blue}{\frac{\frac{k}{\cos k}}{\ell} \cdot \frac{\left({\sin k}^{2} \cdot t\right) \cdot k}{\ell}}} \]
          6. Step-by-step derivation
            1. Applied rewrites95.4%

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

            if 1.0000000000000001e54 < t

            1. Initial program 16.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\frac{\frac{k}{\cos k}}{\ell} \cdot \color{blue}{\frac{\left(t \cdot {\sin k}^{2}\right) \cdot k}{\ell}}} \]
            5. Applied rewrites81.0%

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

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

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

            Alternative 3: 84.3% accurate, 1.8× speedup?

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

              1. Initial program 34.0%

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

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

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

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

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

                  \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                5. unpow2N/A

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

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

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

                  \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                9. lower-pow.f6471.1

                  \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
              5. Applied rewrites71.1%

                \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
              6. Step-by-step derivation
                1. Applied rewrites65.9%

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                2. Step-by-step derivation
                  1. Applied rewrites78.2%

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

                  if 3.0000000000000001e-112 < k

                  1. Initial program 23.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 \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                  4. Step-by-step derivation
                    1. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{2}{\frac{\frac{k}{\cos k}}{\ell} \cdot \color{blue}{\frac{\left(t \cdot {\sin k}^{2}\right) \cdot k}{\ell}}} \]
                  5. Applied rewrites92.0%

                    \[\leadsto \frac{2}{\color{blue}{\frac{\frac{k}{\cos k}}{\ell} \cdot \frac{\left({\sin k}^{2} \cdot t\right) \cdot k}{\ell}}} \]
                  6. Step-by-step derivation
                    1. Applied rewrites86.5%

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

                        \[\leadsto \frac{2}{\frac{k \cdot 1}{\frac{\ell \cdot \cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\frac{\ell}{k}}}} \]
                      2. Step-by-step derivation
                        1. Applied rewrites93.4%

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

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

                      Alternative 4: 84.0% accurate, 1.8× speedup?

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

                        1. Initial program 33.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 \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

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

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

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

                            \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                          5. unpow2N/A

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

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

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

                            \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                          9. lower-pow.f6471.5

                            \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                        5. Applied rewrites71.5%

                          \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                        6. Step-by-step derivation
                          1. Applied rewrites66.7%

                            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                          2. Step-by-step derivation
                            1. Applied rewrites76.8%

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

                            if 5.0999999999999999e-163 < k

                            1. Initial program 25.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{2}{\frac{\frac{k}{\cos k}}{\ell} \cdot \color{blue}{\frac{\left(t \cdot {\sin k}^{2}\right) \cdot k}{\ell}}} \]
                            5. Applied rewrites90.7%

                              \[\leadsto \frac{2}{\color{blue}{\frac{\frac{k}{\cos k}}{\ell} \cdot \frac{\left({\sin k}^{2} \cdot t\right) \cdot k}{\ell}}} \]
                            6. Step-by-step derivation
                              1. Applied rewrites85.7%

                                \[\leadsto \frac{2}{\frac{k \cdot 1}{\color{blue}{\left(\cos k \cdot \ell\right) \cdot \frac{\ell}{\left({\sin k}^{2} \cdot t\right) \cdot k}}}} \]
                              2. Step-by-step derivation
                                1. Applied rewrites90.5%

                                  \[\leadsto \frac{2}{\frac{k \cdot 1}{\frac{\ell \cdot \cos k}{t \cdot {\sin k}^{2}} \cdot \color{blue}{\frac{\ell}{k}}}} \]
                                2. Step-by-step derivation
                                  1. Applied rewrites92.9%

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

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

                                Alternative 5: 74.9% accurate, 1.8× speedup?

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

                                  1. Initial program 34.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 \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
                                  4. Step-by-step derivation
                                    1. *-commutativeN/A

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

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

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

                                      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                    5. unpow2N/A

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

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

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

                                      \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                    9. lower-pow.f6471.6

                                      \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                  5. Applied rewrites71.6%

                                    \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites66.3%

                                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites78.1%

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

                                      if 6.2e-114 < k

                                      1. Initial program 23.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{2}{\frac{\frac{k}{\cos k}}{\ell} \cdot \color{blue}{\frac{\left(t \cdot {\sin k}^{2}\right) \cdot k}{\ell}}} \]
                                      5. Applied rewrites92.1%

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

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

                                          \[\leadsto \frac{2}{\frac{k}{\ell} \cdot \left(\color{blue}{{\sin k}^{2}} \cdot \frac{k \cdot t}{\ell}\right)} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites63.4%

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

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

                                        Alternative 6: 76.1% accurate, 2.7× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{k}{\ell} \cdot k\\ \mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-306}:\\ \;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{k}{\frac{\ell}{\left(\left(k \cdot t\right) \cdot k\right) \cdot k} \cdot \left(\cos k \cdot \ell\right)}}\\ \end{array} \end{array} \]
                                        (FPCore (t l k)
                                         :precision binary64
                                         (let* ((t_1 (* (/ k l) k)))
                                           (if (<= (* l l) 5e-306)
                                             (/ 2.0 (* (* t_1 t_1) t))
                                             (/ 2.0 (/ k (* (/ l (* (* (* k t) k) k)) (* (cos k) l)))))))
                                        double code(double t, double l, double k) {
                                        	double t_1 = (k / l) * k;
                                        	double tmp;
                                        	if ((l * l) <= 5e-306) {
                                        		tmp = 2.0 / ((t_1 * t_1) * t);
                                        	} else {
                                        		tmp = 2.0 / (k / ((l / (((k * t) * k) * k)) * (cos(k) * l)));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        real(8) function code(t, l, k)
                                            real(8), intent (in) :: t
                                            real(8), intent (in) :: l
                                            real(8), intent (in) :: k
                                            real(8) :: t_1
                                            real(8) :: tmp
                                            t_1 = (k / l) * k
                                            if ((l * l) <= 5d-306) then
                                                tmp = 2.0d0 / ((t_1 * t_1) * t)
                                            else
                                                tmp = 2.0d0 / (k / ((l / (((k * t) * k) * k)) * (cos(k) * l)))
                                            end if
                                            code = tmp
                                        end function
                                        
                                        public static double code(double t, double l, double k) {
                                        	double t_1 = (k / l) * k;
                                        	double tmp;
                                        	if ((l * l) <= 5e-306) {
                                        		tmp = 2.0 / ((t_1 * t_1) * t);
                                        	} else {
                                        		tmp = 2.0 / (k / ((l / (((k * t) * k) * k)) * (Math.cos(k) * l)));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(t, l, k):
                                        	t_1 = (k / l) * k
                                        	tmp = 0
                                        	if (l * l) <= 5e-306:
                                        		tmp = 2.0 / ((t_1 * t_1) * t)
                                        	else:
                                        		tmp = 2.0 / (k / ((l / (((k * t) * k) * k)) * (math.cos(k) * l)))
                                        	return tmp
                                        
                                        function code(t, l, k)
                                        	t_1 = Float64(Float64(k / l) * k)
                                        	tmp = 0.0
                                        	if (Float64(l * l) <= 5e-306)
                                        		tmp = Float64(2.0 / Float64(Float64(t_1 * t_1) * t));
                                        	else
                                        		tmp = Float64(2.0 / Float64(k / Float64(Float64(l / Float64(Float64(Float64(k * t) * k) * k)) * Float64(cos(k) * l))));
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(t, l, k)
                                        	t_1 = (k / l) * k;
                                        	tmp = 0.0;
                                        	if ((l * l) <= 5e-306)
                                        		tmp = 2.0 / ((t_1 * t_1) * t);
                                        	else
                                        		tmp = 2.0 / (k / ((l / (((k * t) * k) * k)) * (cos(k) * l)));
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 5e-306], N[(2.0 / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(k / N[(N[(l / N[(N[(N[(k * t), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := \frac{k}{\ell} \cdot k\\
                                        \mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-306}:\\
                                        \;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\frac{2}{\frac{k}{\frac{\ell}{\left(\left(k \cdot t\right) \cdot k\right) \cdot k} \cdot \left(\cos k \cdot \ell\right)}}\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if (*.f64 l l) < 4.99999999999999998e-306

                                          1. Initial program 27.5%

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

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

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

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

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

                                              \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                            5. unpow2N/A

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

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

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

                                              \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                            9. lower-pow.f6475.7

                                              \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                          5. Applied rewrites75.7%

                                            \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                          6. Step-by-step derivation
                                            1. Applied rewrites59.0%

                                              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites93.0%

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

                                              if 4.99999999999999998e-306 < (*.f64 l l)

                                              1. Initial program 31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \frac{2}{\frac{\frac{k}{\cos k}}{\ell} \cdot \color{blue}{\frac{\left(t \cdot {\sin k}^{2}\right) \cdot k}{\ell}}} \]
                                              5. Applied rewrites94.6%

                                                \[\leadsto \frac{2}{\color{blue}{\frac{\frac{k}{\cos k}}{\ell} \cdot \frac{\left({\sin k}^{2} \cdot t\right) \cdot k}{\ell}}} \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites90.5%

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

                                                  \[\leadsto \frac{2}{\frac{k \cdot 1}{\left(\cos k \cdot \ell\right) \cdot \frac{\ell}{\left({k}^{2} \cdot t\right) \cdot k}}} \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites68.5%

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

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

                                                Alternative 7: 74.3% accurate, 3.1× speedup?

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

                                                  1. Initial program 33.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 \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
                                                  4. Step-by-step derivation
                                                    1. *-commutativeN/A

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

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

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

                                                      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                                    5. unpow2N/A

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

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

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

                                                      \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                                    9. lower-pow.f6471.5

                                                      \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                                  5. Applied rewrites71.5%

                                                    \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites66.7%

                                                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                                                    2. Step-by-step derivation
                                                      1. Applied rewrites76.8%

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

                                                      if 5.0999999999999999e-163 < k

                                                      1. Initial program 25.8%

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

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

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

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

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

                                                          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                                        5. unpow2N/A

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

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

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

                                                          \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                                        9. lower-pow.f6455.0

                                                          \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                                      5. Applied rewrites55.0%

                                                        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                                      6. Step-by-step derivation
                                                        1. Applied rewrites53.6%

                                                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                                                        2. Step-by-step derivation
                                                          1. Applied rewrites60.5%

                                                            \[\leadsto \frac{2}{\left({\left(\frac{k}{\ell}\right)}^{2} \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                          2. Step-by-step derivation
                                                            1. Applied rewrites62.6%

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

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

                                                          Alternative 8: 74.0% accurate, 3.2× speedup?

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

                                                            1. Initial program 33.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 \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
                                                            4. Step-by-step derivation
                                                              1. *-commutativeN/A

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

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

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

                                                                \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                                              5. unpow2N/A

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

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

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

                                                                \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                                              9. lower-pow.f6471.5

                                                                \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                                            5. Applied rewrites71.5%

                                                              \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                                            6. Step-by-step derivation
                                                              1. Applied rewrites66.7%

                                                                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites77.1%

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

                                                                if 5.0999999999999999e-163 < k

                                                                1. Initial program 25.8%

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

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

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

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

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

                                                                    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                                                  5. unpow2N/A

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

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

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

                                                                    \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                                                  9. lower-pow.f6455.0

                                                                    \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                                                5. Applied rewrites55.0%

                                                                  \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                                                6. Step-by-step derivation
                                                                  1. Applied rewrites53.6%

                                                                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                                                                  2. Step-by-step derivation
                                                                    1. Applied rewrites60.5%

                                                                      \[\leadsto \frac{2}{\left({\left(\frac{k}{\ell}\right)}^{2} \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                    2. Step-by-step derivation
                                                                      1. Applied rewrites62.6%

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

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

                                                                    Alternative 9: 74.8% accurate, 7.1× speedup?

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

                                                                      1. Initial program 28.4%

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

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

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

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

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

                                                                          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                                                        5. unpow2N/A

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

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

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

                                                                          \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                                                        9. lower-pow.f6476.8

                                                                          \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                                                      5. Applied rewrites76.8%

                                                                        \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                                                      6. Step-by-step derivation
                                                                        1. Applied rewrites69.7%

                                                                          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                                                                        2. Step-by-step derivation
                                                                          1. Applied rewrites85.8%

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

                                                                          if 2e10 < (*.f64 l l)

                                                                          1. Initial program 32.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 \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
                                                                          4. Step-by-step derivation
                                                                            1. *-commutativeN/A

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

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

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

                                                                              \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                                                            5. unpow2N/A

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

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

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

                                                                              \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                                                            9. lower-pow.f6455.4

                                                                              \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                                                          5. Applied rewrites55.4%

                                                                            \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                                                          6. Step-by-step derivation
                                                                            1. Applied rewrites54.9%

                                                                              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                                                                            2. Step-by-step derivation
                                                                              1. Applied rewrites59.0%

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

                                                                                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \left(\color{blue}{k} \cdot k\right)} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites60.7%

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

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

                                                                              Alternative 10: 65.2% accurate, 8.6× speedup?

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

                                                                                1. Initial program 32.3%

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

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

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

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

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

                                                                                    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                                                                  5. unpow2N/A

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

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

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

                                                                                    \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                                                                  9. lower-pow.f6469.9

                                                                                    \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                                                                5. Applied rewrites69.9%

                                                                                  \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                                                                6. Step-by-step derivation
                                                                                  1. Applied rewrites65.6%

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

                                                                                  if 4.5999999999999997e67 < k

                                                                                  1. Initial program 23.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. lift-*.f64N/A

                                                                                      \[\leadsto \frac{2}{\color{blue}{\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. *-commutativeN/A

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \frac{2}{\left({\left(\frac{k}{t}\right)}^{2} + \color{blue}{0}\right) \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)} \]
                                                                                    11. +-rgt-identityN/A

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

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

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

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

                                                                                      \[\leadsto \frac{2}{{\left(\frac{k}{t}\right)}^{2} \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}}} \]
                                                                                  4. Applied rewrites41.8%

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

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

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

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

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

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

                                                                                      \[\leadsto \color{blue}{\frac{{k}^{2} \cdot \left(\frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right) + 2 \cdot \frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
                                                                                  7. Applied rewrites34.3%

                                                                                    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(\frac{\ell \cdot \ell}{t} \cdot -0.3333333333333333\right) \cdot k, k, \frac{\ell \cdot \ell}{t} \cdot 2\right)}{{k}^{4}}} \]
                                                                                  8. Taylor expanded in k around inf

                                                                                    \[\leadsto \frac{-1}{3} \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot t}} \]
                                                                                  9. Step-by-step derivation
                                                                                    1. Applied rewrites52.9%

                                                                                      \[\leadsto \left(\ell \cdot \frac{\ell}{t \cdot \left(k \cdot k\right)}\right) \cdot \color{blue}{-0.3333333333333333} \]
                                                                                  10. Recombined 2 regimes into one program.
                                                                                  11. Final simplification62.8%

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

                                                                                  Alternative 11: 73.1% accurate, 8.6× speedup?

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

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

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

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

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

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

                                                                                      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                                                                    5. unpow2N/A

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

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

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

                                                                                      \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                                                                    9. lower-pow.f6465.2

                                                                                      \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                                                                  5. Applied rewrites65.2%

                                                                                    \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                                                                  6. Step-by-step derivation
                                                                                    1. Applied rewrites61.7%

                                                                                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                                                                                    2. Step-by-step derivation
                                                                                      1. Applied rewrites68.9%

                                                                                        \[\leadsto \frac{2}{\left({\left(\frac{k}{\ell}\right)}^{2} \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                      2. Step-by-step derivation
                                                                                        1. Applied rewrites71.0%

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

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

                                                                                        Alternative 12: 72.7% accurate, 8.6× speedup?

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

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

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

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

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

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

                                                                                            \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4}}{{\ell}^{2}} \cdot t}} \]
                                                                                          5. unpow2N/A

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

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

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

                                                                                            \[\leadsto \frac{2}{\frac{\color{blue}{\frac{{k}^{4}}{\ell}}}{\ell} \cdot t} \]
                                                                                          9. lower-pow.f6465.2

                                                                                            \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4}}}{\ell}}{\ell} \cdot t} \]
                                                                                        5. Applied rewrites65.2%

                                                                                          \[\leadsto \frac{2}{\color{blue}{\frac{\frac{{k}^{4}}{\ell}}{\ell} \cdot t}} \]
                                                                                        6. Step-by-step derivation
                                                                                          1. Applied rewrites61.7%

                                                                                            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t} \]
                                                                                          2. Step-by-step derivation
                                                                                            1. Applied rewrites68.9%

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

                                                                                              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \left(\color{blue}{k} \cdot k\right)} \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites69.8%

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

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

                                                                                              Alternative 13: 30.4% accurate, 14.4× speedup?

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

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

                                                                                                  \[\leadsto \frac{2}{\color{blue}{\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. *-commutativeN/A

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

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

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

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

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

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

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

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

                                                                                                  \[\leadsto \frac{2}{\left({\left(\frac{k}{t}\right)}^{2} + \color{blue}{0}\right) \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \tan k\right)\right)} \]
                                                                                                11. +-rgt-identityN/A

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

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

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

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

                                                                                                  \[\leadsto \frac{2}{{\left(\frac{k}{t}\right)}^{2} \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}}} \]
                                                                                              4. Applied rewrites43.3%

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

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

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

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

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

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

                                                                                                  \[\leadsto \color{blue}{\frac{{k}^{2} \cdot \left(\frac{-1}{3} \cdot \frac{{\ell}^{2}}{t}\right) + 2 \cdot \frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
                                                                                              7. Applied rewrites35.7%

                                                                                                \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\left(\frac{\ell \cdot \ell}{t} \cdot -0.3333333333333333\right) \cdot k, k, \frac{\ell \cdot \ell}{t} \cdot 2\right)}{{k}^{4}}} \]
                                                                                              8. Taylor expanded in k around inf

                                                                                                \[\leadsto \frac{-1}{3} \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot t}} \]
                                                                                              9. Step-by-step derivation
                                                                                                1. Applied rewrites26.5%

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

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

                                                                                                Reproduce

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