Toniolo and Linder, Equation (10-)

Percentage Accurate: 36.7% → 97.0%
Time: 12.2s
Alternatives: 19
Speedup: 11.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 36.7% 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: 97.0% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 73.4% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := k \cdot \frac{k}{\ell}\\ \mathbf{if}\;\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)} \leq -1 \cdot 10^{-198}:\\ \;\;\;\;\frac{\left(\ell \cdot \frac{\ell}{t}\right) \cdot \mathsf{fma}\left(-0.3333333333333333 \cdot k, k, 2\right)}{{k}^{4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\ \end{array} \end{array} \]
      (FPCore (t l k)
       :precision binary64
       (let* ((t_1 (* k (/ k l))))
         (if (<=
              (/
               2.0
               (*
                (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
                (- (+ 1.0 (pow (/ k t) 2.0)) 1.0)))
              -1e-198)
           (/ (* (* l (/ l t)) (fma (* -0.3333333333333333 k) k 2.0)) (pow k 4.0))
           (/ 2.0 (* (* t_1 t_1) t)))))
      double code(double t, double l, double k) {
      	double t_1 = k * (k / l);
      	double tmp;
      	if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0))) <= -1e-198) {
      		tmp = ((l * (l / t)) * fma((-0.3333333333333333 * k), k, 2.0)) / pow(k, 4.0);
      	} else {
      		tmp = 2.0 / ((t_1 * t_1) * t);
      	}
      	return tmp;
      }
      
      function code(t, l, k)
      	t_1 = Float64(k * Float64(k / l))
      	tmp = 0.0
      	if (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))) <= -1e-198)
      		tmp = Float64(Float64(Float64(l * Float64(l / t)) * fma(Float64(-0.3333333333333333 * k), k, 2.0)) / (k ^ 4.0));
      	else
      		tmp = Float64(2.0 / Float64(Float64(t_1 * t_1) * t));
      	end
      	return tmp
      end
      
      code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[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], -1e-198], N[(N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.3333333333333333 * k), $MachinePrecision] * k + 2.0), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := k \cdot \frac{k}{\ell}\\
      \mathbf{if}\;\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)} \leq -1 \cdot 10^{-198}:\\
      \;\;\;\;\frac{\left(\ell \cdot \frac{\ell}{t}\right) \cdot \mathsf{fma}\left(-0.3333333333333333 \cdot k, k, 2\right)}{{k}^{4}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (-.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < -9.9999999999999991e-199

        1. Initial program 76.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -9.9999999999999991e-199 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (-.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))))

        1. Initial program 28.4%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\left(\left(k \cdot \frac{k}{\ell}\right) \cdot \left(k \cdot \frac{k}{\ell}\right)\right) \cdot t} \]
        7. Recombined 2 regimes into one program.
        8. Add Preprocessing

        Alternative 3: 85.2% accurate, 1.3× speedup?

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

          1. Initial program 34.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.0000000000000001e149 < (*.f64 l l)

                1. Initial program 32.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 4: 79.4% accurate, 1.3× speedup?

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

                    1. Initial program 30.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                        if 9.9999999999999993e-41 < (*.f64 l l)

                        1. Initial program 36.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 5: 96.5% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 6: 78.1% accurate, 1.5× speedup?

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

                              1. Initial program 27.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if 5.0000000000000003e-134 < (*.f64 l l)

                                1. Initial program 37.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 7: 83.4% accurate, 1.7× speedup?

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

                                    1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 1.42e-6 < k

                                      1. Initial program 31.3%

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{2}{\frac{\left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k}{\ell} \cdot \frac{\frac{k}{\cos k}}{\ell}} \]
                                      7. Recombined 2 regimes into one program.
                                      8. Add Preprocessing

                                      Alternative 8: 83.2% accurate, 1.7× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := k \cdot \frac{k}{\ell}\\ \mathbf{if}\;k \leq 1.42 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\cos \left(2 \cdot k\right), -0.5, 0.5\right) \cdot \left(\frac{t}{\ell} \cdot k\right)\right) \cdot \frac{\frac{k}{\cos k}}{\ell}}\\ \end{array} \end{array} \]
                                      (FPCore (t l k)
                                       :precision binary64
                                       (let* ((t_1 (* k (/ k l))))
                                         (if (<= k 1.42e-6)
                                           (/ 2.0 (* (* t_1 t_1) t))
                                           (/
                                            2.0
                                            (*
                                             (* (fma (cos (* 2.0 k)) -0.5 0.5) (* (/ t l) k))
                                             (/ (/ k (cos k)) l))))))
                                      double code(double t, double l, double k) {
                                      	double t_1 = k * (k / l);
                                      	double tmp;
                                      	if (k <= 1.42e-6) {
                                      		tmp = 2.0 / ((t_1 * t_1) * t);
                                      	} else {
                                      		tmp = 2.0 / ((fma(cos((2.0 * k)), -0.5, 0.5) * ((t / l) * k)) * ((k / cos(k)) / l));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(t, l, k)
                                      	t_1 = Float64(k * Float64(k / l))
                                      	tmp = 0.0
                                      	if (k <= 1.42e-6)
                                      		tmp = Float64(2.0 / Float64(Float64(t_1 * t_1) * t));
                                      	else
                                      		tmp = Float64(2.0 / Float64(Float64(fma(cos(Float64(2.0 * k)), -0.5, 0.5) * Float64(Float64(t / l) * k)) * Float64(Float64(k / cos(k)) / l)));
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.42e-6], N[(2.0 / N[(N[(t$95$1 * t$95$1), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_1 := k \cdot \frac{k}{\ell}\\
                                      \mathbf{if}\;k \leq 1.42 \cdot 10^{-6}:\\
                                      \;\;\;\;\frac{2}{\left(t\_1 \cdot t\_1\right) \cdot t}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\cos \left(2 \cdot k\right), -0.5, 0.5\right) \cdot \left(\frac{t}{\ell} \cdot k\right)\right) \cdot \frac{\frac{k}{\cos k}}{\ell}}\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if k < 1.42e-6

                                        1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 1.42e-6 < k

                                          1. Initial program 31.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \frac{2}{\left(\mathsf{fma}\left(\cos \left(2 \cdot k\right), -0.5, 0.5\right) \cdot \left(\frac{t}{\ell} \cdot k\right)\right) \cdot \frac{\color{blue}{\frac{k}{\cos k}}}{\ell}} \]
                                            4. Recombined 2 regimes into one program.
                                            5. Add Preprocessing

                                            Alternative 9: 77.6% accurate, 1.7× speedup?

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

                                              1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 2.65e-5 < k

                                                1. Initial program 31.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \frac{2}{\mathsf{fma}\left(\cos \left(2 \cdot k\right), -0.5, 0.5\right) \cdot \color{blue}{\frac{\left(k \cdot k\right) \cdot t}{\left(\cos k \cdot \ell\right) \cdot \ell}}} \]
                                                  4. Recombined 2 regimes into one program.
                                                  5. Add Preprocessing

                                                  Alternative 10: 74.4% accurate, 1.8× speedup?

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

                                                    1. Initial program 36.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if 7.99999999999999997e-70 < k

                                                      1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \frac{2}{\left(t \cdot \frac{{k}^{3}}{\ell}\right) \cdot \frac{\frac{k}{\color{blue}{\cos k}}}{\ell}} \]
                                                        4. Recombined 2 regimes into one program.
                                                        5. Add Preprocessing

                                                        Alternative 11: 74.1% accurate, 2.7× speedup?

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

                                                          1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 1.60000000000000011e-36 < k

                                                            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 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot k}{\ell} \cdot \frac{\frac{k}{\cos k}}{\ell}} \]
                                                            8. Recombined 2 regimes into one program.
                                                            9. Add Preprocessing

                                                            Alternative 12: 71.9% accurate, 3.1× speedup?

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

                                                              1. Initial program 26.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  if 5.80000000000000007e-123 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      Alternative 13: 73.4% accurate, 8.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        Alternative 14: 74.3% accurate, 8.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              Alternative 15: 73.6% accurate, 8.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    Alternative 16: 72.2% accurate, 9.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                          Alternative 17: 72.3% accurate, 9.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                Alternative 18: 72.2% accurate, 9.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                    Alternative 19: 70.3% accurate, 11.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                          Reproduce

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