Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.4% → 98.8%
Time: 15.4s
Alternatives: 14
Speedup: 9.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 14 alternatives:

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

Initial Program: 35.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: 98.8% accurate, 1.8× speedup?

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

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

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

    \[\leadsto \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 rewrites89.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 rewrites95.1%

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

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

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

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

        Alternative 2: 87.7% accurate, 1.8× speedup?

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

          1. Initial program 31.1%

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

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

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

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

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

              if 8.0000000000000006e-18 < k

              1. Initial program 24.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 rewrites91.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 rewrites99.6%

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

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

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

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

                  Alternative 3: 85.9% accurate, 1.8× speedup?

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

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

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

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

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

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

                        if 2.70000000000000011e-13 < 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 rewrites91.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 rewrites99.6%

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

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

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

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

                            Alternative 4: 82.0% accurate, 1.8× speedup?

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

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

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

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

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

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

                                  if 2.70000000000000011e-13 < 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 rewrites91.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 rewrites99.6%

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

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

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

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

                                    Alternative 5: 82.0% accurate, 1.8× speedup?

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

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

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

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

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

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

                                          if 2.70000000000000011e-13 < 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 rewrites91.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 rewrites99.6%

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

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

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

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

                                            Alternative 6: 98.7% accurate, 1.8× speedup?

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

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

                                              \[\leadsto \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 rewrites89.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 rewrites95.1%

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

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

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

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

                                                  Alternative 7: 98.5% accurate, 1.8× speedup?

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

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

                                                    \[\leadsto \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 rewrites89.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 rewrites95.1%

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

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

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

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

                                                        Alternative 8: 75.0% accurate, 2.2× speedup?

                                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{k}{\ell} \cdot k\\ \mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{+94}:\\ \;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(\frac{t}{\ell} \cdot \mathsf{fma}\left(0.044444444444444446, k \cdot k, -0.3333333333333333\right), k \cdot k, \frac{t}{\ell}\right) \cdot \left(k \cdot k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\cos k}}{\ell}}\\ \end{array} \end{array} \]
                                                        (FPCore (t l k)
                                                         :precision binary64
                                                         (let* ((t_1 (* (/ k l) k)))
                                                           (if (<= (* l l) 5e+94)
                                                             (/ 2.0 (* (* t_1 t) t_1))
                                                             (/
                                                              2.0
                                                              (*
                                                               (*
                                                                (*
                                                                 (fma
                                                                  (* (/ t l) (fma 0.044444444444444446 (* k k) -0.3333333333333333))
                                                                  (* k k)
                                                                  (/ t l))
                                                                 (* k k))
                                                                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+94) {
                                                        		tmp = 2.0 / ((t_1 * t) * t_1);
                                                        	} else {
                                                        		tmp = 2.0 / (((fma(((t / l) * fma(0.044444444444444446, (k * k), -0.3333333333333333)), (k * k), (t / l)) * (k * k)) * k) * ((k / 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+94)
                                                        		tmp = Float64(2.0 / Float64(Float64(t_1 * t) * t_1));
                                                        	else
                                                        		tmp = Float64(2.0 / Float64(Float64(Float64(fma(Float64(Float64(t / l) * fma(0.044444444444444446, Float64(k * k), -0.3333333333333333)), Float64(k * k), Float64(t / l)) * Float64(k * k)) * k) * Float64(Float64(k / cos(k)) / l)));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        code[t_, l_, k_] := Block[{t$95$1 = N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 5e+94], N[(2.0 / N[(N[(t$95$1 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(t / l), $MachinePrecision] * N[(0.044444444444444446 * N[(k * k), $MachinePrecision] + -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(t / l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] / l), $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^{+94}:\\
                                                        \;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(\frac{t}{\ell} \cdot \mathsf{fma}\left(0.044444444444444446, k \cdot k, -0.3333333333333333\right), k \cdot k, \frac{t}{\ell}\right) \cdot \left(k \cdot k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\cos k}}{\ell}}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if (*.f64 l l) < 5.0000000000000001e94

                                                          1. Initial program 30.7%

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

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

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

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

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

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

                                                              if 5.0000000000000001e94 < (*.f64 l l)

                                                              1. Initial program 26.7%

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

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

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

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

                                                                  \[\leadsto \frac{2}{\frac{\frac{k}{\cos k}}{\ell} \cdot \left(\mathsf{fma}\left(\frac{t}{\ell} \cdot \mathsf{fma}\left(0.044444444444444446, k \cdot k, -0.3333333333333333\right), k \cdot k, \frac{t}{\ell}\right) \cdot \color{blue}{{k}^{3}}\right)} \]
                                                                2. Step-by-step derivation
                                                                  1. Applied rewrites49.3%

                                                                    \[\leadsto \frac{2}{\frac{\frac{k}{\cos k}}{\ell} \cdot \left(\left(\mathsf{fma}\left(\mathsf{fma}\left(0.044444444444444446, k \cdot k, -0.3333333333333333\right) \cdot \frac{t}{\ell}, k \cdot k, \frac{t}{\ell}\right) \cdot \left(k \cdot k\right)\right) \cdot k\right)} \]
                                                                3. Recombined 2 regimes into one program.
                                                                4. Final simplification71.6%

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

                                                                Alternative 9: 76.5% accurate, 2.7× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{k}{\ell} \cdot k\\ \mathbf{if}\;k \leq 34:\\ \;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(\left(k \cdot k\right) \cdot t\right) \cdot \frac{k}{\ell}\right) \cdot \frac{\frac{k}{\cos k}}{\ell}}\\ \end{array} \end{array} \]
                                                                (FPCore (t l k)
                                                                 :precision binary64
                                                                 (let* ((t_1 (* (/ k l) k)))
                                                                   (if (<= k 34.0)
                                                                     (/ 2.0 (* (* t_1 t) t_1))
                                                                     (/ 2.0 (* (* (* (* k k) t) (/ k l)) (/ (/ k (cos k)) l))))))
                                                                double code(double t, double l, double k) {
                                                                	double t_1 = (k / l) * k;
                                                                	double tmp;
                                                                	if (k <= 34.0) {
                                                                		tmp = 2.0 / ((t_1 * t) * t_1);
                                                                	} else {
                                                                		tmp = 2.0 / ((((k * k) * t) * (k / l)) * ((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 (k <= 34.0d0) then
                                                                        tmp = 2.0d0 / ((t_1 * t) * t_1)
                                                                    else
                                                                        tmp = 2.0d0 / ((((k * k) * t) * (k / l)) * ((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 (k <= 34.0) {
                                                                		tmp = 2.0 / ((t_1 * t) * t_1);
                                                                	} else {
                                                                		tmp = 2.0 / ((((k * k) * t) * (k / l)) * ((k / Math.cos(k)) / l));
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                def code(t, l, k):
                                                                	t_1 = (k / l) * k
                                                                	tmp = 0
                                                                	if k <= 34.0:
                                                                		tmp = 2.0 / ((t_1 * t) * t_1)
                                                                	else:
                                                                		tmp = 2.0 / ((((k * k) * t) * (k / l)) * ((k / math.cos(k)) / l))
                                                                	return tmp
                                                                
                                                                function code(t, l, k)
                                                                	t_1 = Float64(Float64(k / l) * k)
                                                                	tmp = 0.0
                                                                	if (k <= 34.0)
                                                                		tmp = Float64(2.0 / Float64(Float64(t_1 * t) * t_1));
                                                                	else
                                                                		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * t) * Float64(k / l)) * Float64(Float64(k / cos(k)) / l)));
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                function tmp_2 = code(t, l, k)
                                                                	t_1 = (k / l) * k;
                                                                	tmp = 0.0;
                                                                	if (k <= 34.0)
                                                                		tmp = 2.0 / ((t_1 * t) * t_1);
                                                                	else
                                                                		tmp = 2.0 / ((((k * k) * t) * (k / l)) * ((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[k, 34.0], N[(2.0 / N[(N[(t$95$1 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                t_1 := \frac{k}{\ell} \cdot k\\
                                                                \mathbf{if}\;k \leq 34:\\
                                                                \;\;\;\;\frac{2}{\left(t\_1 \cdot t\right) \cdot t\_1}\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;\frac{2}{\left(\left(\left(k \cdot k\right) \cdot t\right) \cdot \frac{k}{\ell}\right) \cdot \frac{\frac{k}{\cos k}}{\ell}}\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if k < 34

                                                                  1. Initial program 30.7%

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

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

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

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

                                                                      if 34 < k

                                                                      1. Initial program 25.0%

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

                                                                        \[\leadsto \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 rewrites91.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 rewrites99.6%

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

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

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

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

                                                                        Alternative 10: 76.5% accurate, 2.7× speedup?

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

                                                                          1. Initial program 30.7%

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

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

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

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

                                                                              if 34 < k

                                                                              1. Initial program 25.0%

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

                                                                                \[\leadsto \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 rewrites91.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 rewrites90.9%

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

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

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

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

                                                                                Alternative 11: 75.8% accurate, 8.6× speedup?

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

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

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

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

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

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

                                                                                    Alternative 12: 74.0% accurate, 8.6× speedup?

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

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

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

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

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

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

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

                                                                                          Alternative 13: 69.7% accurate, 8.6× speedup?

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

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

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

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

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

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

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

                                                                                                Alternative 14: 65.6% accurate, 9.6× speedup?

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

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

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

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

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

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

                                                                                                        \[\leadsto \frac{2}{\left(k \cdot t\right) \cdot \left(\left(k \cdot \frac{k}{\ell \cdot \ell}\right) \cdot k\right)} \]
                                                                                                      2. Final simplification58.6%

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

                                                                                                      Reproduce

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