Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.2% → 89.4%
Time: 7.8s
Alternatives: 11
Speedup: 4.4×

Specification

?
\[\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)} \]
(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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(t, l, k)
use fmin_fmax_functions
    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]
\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)}

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 11 alternatives:

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

Initial Program: 35.2% accurate, 1.0× speedup?

\[\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)} \]
(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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(t, l, k)
use fmin_fmax_functions
    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]
\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)}

Alternative 1: 89.4% accurate, 1.1× speedup?

\[\begin{array}{l} t_1 := \cos \left(\left|k\right|\right)\\ \mathbf{if}\;\left|k\right| \leq 2 \cdot 10^{+67}:\\ \;\;\;\;\left(2 \cdot \frac{\ell \cdot t\_1}{\left(\left|k\right| \cdot \left|k\right|\right) \cdot \left(t \cdot {\sin \left(\left|k\right|\right)}^{2}\right)}\right) \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(t\_1 \cdot \ell\right) \cdot 2}{\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|}}{\left|k\right|} \cdot \ell\\ \end{array} \]
(FPCore (t l k)
 :precision binary64
 (let* ((t_1 (cos (fabs k))))
   (if (<= (fabs k) 2e+67)
     (*
      (*
       2.0
       (/ (* l t_1) (* (* (fabs k) (fabs k)) (* t (pow (sin (fabs k)) 2.0)))))
      l)
     (*
      (/
       (/
        (* (* t_1 l) 2.0)
        (* (* (fma (cos (+ (fabs k) (fabs k))) -0.5 0.5) t) (fabs k)))
       (fabs k))
      l))))
double code(double t, double l, double k) {
	double t_1 = cos(fabs(k));
	double tmp;
	if (fabs(k) <= 2e+67) {
		tmp = (2.0 * ((l * t_1) / ((fabs(k) * fabs(k)) * (t * pow(sin(fabs(k)), 2.0))))) * l;
	} else {
		tmp = ((((t_1 * l) * 2.0) / ((fma(cos((fabs(k) + fabs(k))), -0.5, 0.5) * t) * fabs(k))) / fabs(k)) * l;
	}
	return tmp;
}
function code(t, l, k)
	t_1 = cos(abs(k))
	tmp = 0.0
	if (abs(k) <= 2e+67)
		tmp = Float64(Float64(2.0 * Float64(Float64(l * t_1) / Float64(Float64(abs(k) * abs(k)) * Float64(t * (sin(abs(k)) ^ 2.0))))) * l);
	else
		tmp = Float64(Float64(Float64(Float64(Float64(t_1 * l) * 2.0) / Float64(Float64(fma(cos(Float64(abs(k) + abs(k))), -0.5, 0.5) * t) * abs(k))) / abs(k)) * l);
	end
	return tmp
end
code[t_, l_, k_] := Block[{t$95$1 = N[Cos[N[Abs[k], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 2e+67], N[(N[(2.0 * N[(N[(l * t$95$1), $MachinePrecision] / N[(N[(N[Abs[k], $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision] * N[(t * N[Power[N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision], N[(N[(N[(N[(N[(t$95$1 * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(N[(N[Cos[N[(N[Abs[k], $MachinePrecision] + N[Abs[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Abs[k], $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]]]
\begin{array}{l}
t_1 := \cos \left(\left|k\right|\right)\\
\mathbf{if}\;\left|k\right| \leq 2 \cdot 10^{+67}:\\
\;\;\;\;\left(2 \cdot \frac{\ell \cdot t\_1}{\left(\left|k\right| \cdot \left|k\right|\right) \cdot \left(t \cdot {\sin \left(\left|k\right|\right)}^{2}\right)}\right) \cdot \ell\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(t\_1 \cdot \ell\right) \cdot 2}{\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|}}{\left|k\right|} \cdot \ell\\


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

    1. Initial program 35.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. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999997e67 < k

    1. Initial program 35.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. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2\right)\right)\right)\right)}\right)}\right) \cdot \ell \]
      4. pow-negN/A

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

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

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

        \[\leadsto \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \frac{1}{{\sin k}^{-2}}\right)}\right) \cdot \ell \]
    8. Applied rewrites82.3%

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

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

Alternative 2: 89.4% accurate, 1.2× speedup?

\[\begin{array}{l} \mathbf{if}\;\left|k\right| \leq 1.4 \cdot 10^{-8}:\\ \;\;\;\;\left(2 \cdot \frac{\ell \cdot 1}{{\left(\left|k\right|\right)}^{2} \cdot \left(t \cdot {\sin \left(\left|k\right|\right)}^{2}\right)}\right) \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(\cos \left(\left|k\right|\right) \cdot \ell\right) \cdot 2}{\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|}}{\left|k\right|} \cdot \ell\\ \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= (fabs k) 1.4e-8)
   (*
    (* 2.0 (/ (* l 1.0) (* (pow (fabs k) 2.0) (* t (pow (sin (fabs k)) 2.0)))))
    l)
   (*
    (/
     (/
      (* (* (cos (fabs k)) l) 2.0)
      (* (* (fma (cos (+ (fabs k) (fabs k))) -0.5 0.5) t) (fabs k)))
     (fabs k))
    l)))
double code(double t, double l, double k) {
	double tmp;
	if (fabs(k) <= 1.4e-8) {
		tmp = (2.0 * ((l * 1.0) / (pow(fabs(k), 2.0) * (t * pow(sin(fabs(k)), 2.0))))) * l;
	} else {
		tmp = ((((cos(fabs(k)) * l) * 2.0) / ((fma(cos((fabs(k) + fabs(k))), -0.5, 0.5) * t) * fabs(k))) / fabs(k)) * l;
	}
	return tmp;
}
function code(t, l, k)
	tmp = 0.0
	if (abs(k) <= 1.4e-8)
		tmp = Float64(Float64(2.0 * Float64(Float64(l * 1.0) / Float64((abs(k) ^ 2.0) * Float64(t * (sin(abs(k)) ^ 2.0))))) * l);
	else
		tmp = Float64(Float64(Float64(Float64(Float64(cos(abs(k)) * l) * 2.0) / Float64(Float64(fma(cos(Float64(abs(k) + abs(k))), -0.5, 0.5) * t) * abs(k))) / abs(k)) * l);
	end
	return tmp
end
code[t_, l_, k_] := If[LessEqual[N[Abs[k], $MachinePrecision], 1.4e-8], N[(N[(2.0 * N[(N[(l * 1.0), $MachinePrecision] / N[(N[Power[N[Abs[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision], N[(N[(N[(N[(N[(N[Cos[N[Abs[k], $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(N[(N[Cos[N[(N[Abs[k], $MachinePrecision] + N[Abs[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Abs[k], $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|k\right| \leq 1.4 \cdot 10^{-8}:\\
\;\;\;\;\left(2 \cdot \frac{\ell \cdot 1}{{\left(\left|k\right|\right)}^{2} \cdot \left(t \cdot {\sin \left(\left|k\right|\right)}^{2}\right)}\right) \cdot \ell\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(\cos \left(\left|k\right|\right) \cdot \ell\right) \cdot 2}{\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|}}{\left|k\right|} \cdot \ell\\


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

    1. Initial program 35.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. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.4e-8 < k

      1. Initial program 35.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. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2\right)\right)\right)\right)}\right)}\right) \cdot \ell \]
        4. pow-negN/A

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

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

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

          \[\leadsto \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \frac{1}{{\sin k}^{-2}}\right)}\right) \cdot \ell \]
      8. Applied rewrites82.3%

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

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

    Alternative 3: 85.5% accurate, 1.2× speedup?

    \[\begin{array}{l} \mathbf{if}\;\left|k\right| \leq 3.7 \cdot 10^{-8}:\\ \;\;\;\;\left(2 \cdot \frac{\ell \cdot 1}{{\left(\left|k\right|\right)}^{2} \cdot \left(t \cdot {\sin \left(\left|k\right|\right)}^{2}\right)}\right) \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\left(\cos \left(\left|k\right|\right) \cdot \left(\ell \cdot \frac{2}{\left(\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|\right) \cdot \left|k\right|}\right)\right) \cdot \ell\\ \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (if (<= (fabs k) 3.7e-8)
       (*
        (* 2.0 (/ (* l 1.0) (* (pow (fabs k) 2.0) (* t (pow (sin (fabs k)) 2.0)))))
        l)
       (*
        (*
         (cos (fabs k))
         (*
          l
          (/
           2.0
           (*
            (* (* (fma (cos (+ (fabs k) (fabs k))) -0.5 0.5) t) (fabs k))
            (fabs k)))))
        l)))
    double code(double t, double l, double k) {
    	double tmp;
    	if (fabs(k) <= 3.7e-8) {
    		tmp = (2.0 * ((l * 1.0) / (pow(fabs(k), 2.0) * (t * pow(sin(fabs(k)), 2.0))))) * l;
    	} else {
    		tmp = (cos(fabs(k)) * (l * (2.0 / (((fma(cos((fabs(k) + fabs(k))), -0.5, 0.5) * t) * fabs(k)) * fabs(k))))) * l;
    	}
    	return tmp;
    }
    
    function code(t, l, k)
    	tmp = 0.0
    	if (abs(k) <= 3.7e-8)
    		tmp = Float64(Float64(2.0 * Float64(Float64(l * 1.0) / Float64((abs(k) ^ 2.0) * Float64(t * (sin(abs(k)) ^ 2.0))))) * l);
    	else
    		tmp = Float64(Float64(cos(abs(k)) * Float64(l * Float64(2.0 / Float64(Float64(Float64(fma(cos(Float64(abs(k) + abs(k))), -0.5, 0.5) * t) * abs(k)) * abs(k))))) * l);
    	end
    	return tmp
    end
    
    code[t_, l_, k_] := If[LessEqual[N[Abs[k], $MachinePrecision], 3.7e-8], N[(N[(2.0 * N[(N[(l * 1.0), $MachinePrecision] / N[(N[Power[N[Abs[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision], N[(N[(N[Cos[N[Abs[k], $MachinePrecision]], $MachinePrecision] * N[(l * N[(2.0 / N[(N[(N[(N[(N[Cos[N[(N[Abs[k], $MachinePrecision] + N[Abs[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]]
    
    \begin{array}{l}
    \mathbf{if}\;\left|k\right| \leq 3.7 \cdot 10^{-8}:\\
    \;\;\;\;\left(2 \cdot \frac{\ell \cdot 1}{{\left(\left|k\right|\right)}^{2} \cdot \left(t \cdot {\sin \left(\left|k\right|\right)}^{2}\right)}\right) \cdot \ell\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\cos \left(\left|k\right|\right) \cdot \left(\ell \cdot \frac{2}{\left(\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|\right) \cdot \left|k\right|}\right)\right) \cdot \ell\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if k < 3.7e-8

      1. Initial program 35.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. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 3.7e-8 < k

        1. Initial program 35.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. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2\right)\right)\right)\right)}\right)}\right) \cdot \ell \]
          4. pow-negN/A

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

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

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

            \[\leadsto \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \frac{1}{{\sin k}^{-2}}\right)}\right) \cdot \ell \]
        8. Applied rewrites82.3%

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

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

      Alternative 4: 85.5% accurate, 1.2× speedup?

      \[\begin{array}{l} \mathbf{if}\;\left|k\right| \leq 3.7 \cdot 10^{-8}:\\ \;\;\;\;\left(2 \cdot \frac{\ell \cdot 1}{{\left(\left|k\right|\right)}^{2} \cdot \left(t \cdot {\sin \left(\left|k\right|\right)}^{2}\right)}\right) \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{\cos \left(\left|k\right|\right)}{\left(\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|\right) \cdot \left|k\right|} \cdot \left(\ell + \ell\right)\right) \cdot \ell\\ \end{array} \]
      (FPCore (t l k)
       :precision binary64
       (if (<= (fabs k) 3.7e-8)
         (*
          (* 2.0 (/ (* l 1.0) (* (pow (fabs k) 2.0) (* t (pow (sin (fabs k)) 2.0)))))
          l)
         (*
          (*
           (/
            (cos (fabs k))
            (*
             (* (* (fma (cos (+ (fabs k) (fabs k))) -0.5 0.5) t) (fabs k))
             (fabs k)))
           (+ l l))
          l)))
      double code(double t, double l, double k) {
      	double tmp;
      	if (fabs(k) <= 3.7e-8) {
      		tmp = (2.0 * ((l * 1.0) / (pow(fabs(k), 2.0) * (t * pow(sin(fabs(k)), 2.0))))) * l;
      	} else {
      		tmp = ((cos(fabs(k)) / (((fma(cos((fabs(k) + fabs(k))), -0.5, 0.5) * t) * fabs(k)) * fabs(k))) * (l + l)) * l;
      	}
      	return tmp;
      }
      
      function code(t, l, k)
      	tmp = 0.0
      	if (abs(k) <= 3.7e-8)
      		tmp = Float64(Float64(2.0 * Float64(Float64(l * 1.0) / Float64((abs(k) ^ 2.0) * Float64(t * (sin(abs(k)) ^ 2.0))))) * l);
      	else
      		tmp = Float64(Float64(Float64(cos(abs(k)) / Float64(Float64(Float64(fma(cos(Float64(abs(k) + abs(k))), -0.5, 0.5) * t) * abs(k)) * abs(k))) * Float64(l + l)) * l);
      	end
      	return tmp
      end
      
      code[t_, l_, k_] := If[LessEqual[N[Abs[k], $MachinePrecision], 3.7e-8], N[(N[(2.0 * N[(N[(l * 1.0), $MachinePrecision] / N[(N[Power[N[Abs[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision], N[(N[(N[(N[Cos[N[Abs[k], $MachinePrecision]], $MachinePrecision] / N[(N[(N[(N[(N[Cos[N[(N[Abs[k], $MachinePrecision] + N[Abs[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * -0.5 + 0.5), $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l + l), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]]
      
      \begin{array}{l}
      \mathbf{if}\;\left|k\right| \leq 3.7 \cdot 10^{-8}:\\
      \;\;\;\;\left(2 \cdot \frac{\ell \cdot 1}{{\left(\left|k\right|\right)}^{2} \cdot \left(t \cdot {\sin \left(\left|k\right|\right)}^{2}\right)}\right) \cdot \ell\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\frac{\cos \left(\left|k\right|\right)}{\left(\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|\right) \cdot \left|k\right|} \cdot \left(\ell + \ell\right)\right) \cdot \ell\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if k < 3.7e-8

        1. Initial program 35.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. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 3.7e-8 < k

          1. Initial program 35.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. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(2\right)\right)\right)\right)}\right)}\right) \cdot \ell \]
            4. pow-negN/A

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

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

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

              \[\leadsto \left(2 \cdot \frac{\ell \cdot \cos k}{{k}^{2} \cdot \left(t \cdot \frac{1}{{\sin k}^{-2}}\right)}\right) \cdot \ell \]
          8. Applied rewrites82.3%

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

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

        Alternative 5: 82.0% accurate, 1.3× speedup?

        \[\begin{array}{l} t_1 := \sin \left(\left|k\right|\right)\\ \mathbf{if}\;\left|k\right| \leq 2 \cdot 10^{-8}:\\ \;\;\;\;\left(2 \cdot \frac{\ell \cdot 1}{{\left(\left|k\right|\right)}^{2} \cdot \left(t \cdot {t\_1}^{2}\right)}\right) \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left|k\right| \cdot \left(\left|k\right| \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\tan \left(\left|k\right|\right) \cdot t\_1\right)\right)\right)}\\ \end{array} \]
        (FPCore (t l k)
         :precision binary64
         (let* ((t_1 (sin (fabs k))))
           (if (<= (fabs k) 2e-8)
             (* (* 2.0 (/ (* l 1.0) (* (pow (fabs k) 2.0) (* t (pow t_1 2.0))))) l)
             (/
              2.0
              (* (fabs k) (* (fabs k) (* (/ t (* l l)) (* (tan (fabs k)) t_1))))))))
        double code(double t, double l, double k) {
        	double t_1 = sin(fabs(k));
        	double tmp;
        	if (fabs(k) <= 2e-8) {
        		tmp = (2.0 * ((l * 1.0) / (pow(fabs(k), 2.0) * (t * pow(t_1, 2.0))))) * l;
        	} else {
        		tmp = 2.0 / (fabs(k) * (fabs(k) * ((t / (l * l)) * (tan(fabs(k)) * t_1))));
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(t, l, k)
        use fmin_fmax_functions
            real(8), intent (in) :: t
            real(8), intent (in) :: l
            real(8), intent (in) :: k
            real(8) :: t_1
            real(8) :: tmp
            t_1 = sin(abs(k))
            if (abs(k) <= 2d-8) then
                tmp = (2.0d0 * ((l * 1.0d0) / ((abs(k) ** 2.0d0) * (t * (t_1 ** 2.0d0))))) * l
            else
                tmp = 2.0d0 / (abs(k) * (abs(k) * ((t / (l * l)) * (tan(abs(k)) * t_1))))
            end if
            code = tmp
        end function
        
        public static double code(double t, double l, double k) {
        	double t_1 = Math.sin(Math.abs(k));
        	double tmp;
        	if (Math.abs(k) <= 2e-8) {
        		tmp = (2.0 * ((l * 1.0) / (Math.pow(Math.abs(k), 2.0) * (t * Math.pow(t_1, 2.0))))) * l;
        	} else {
        		tmp = 2.0 / (Math.abs(k) * (Math.abs(k) * ((t / (l * l)) * (Math.tan(Math.abs(k)) * t_1))));
        	}
        	return tmp;
        }
        
        def code(t, l, k):
        	t_1 = math.sin(math.fabs(k))
        	tmp = 0
        	if math.fabs(k) <= 2e-8:
        		tmp = (2.0 * ((l * 1.0) / (math.pow(math.fabs(k), 2.0) * (t * math.pow(t_1, 2.0))))) * l
        	else:
        		tmp = 2.0 / (math.fabs(k) * (math.fabs(k) * ((t / (l * l)) * (math.tan(math.fabs(k)) * t_1))))
        	return tmp
        
        function code(t, l, k)
        	t_1 = sin(abs(k))
        	tmp = 0.0
        	if (abs(k) <= 2e-8)
        		tmp = Float64(Float64(2.0 * Float64(Float64(l * 1.0) / Float64((abs(k) ^ 2.0) * Float64(t * (t_1 ^ 2.0))))) * l);
        	else
        		tmp = Float64(2.0 / Float64(abs(k) * Float64(abs(k) * Float64(Float64(t / Float64(l * l)) * Float64(tan(abs(k)) * t_1)))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(t, l, k)
        	t_1 = sin(abs(k));
        	tmp = 0.0;
        	if (abs(k) <= 2e-8)
        		tmp = (2.0 * ((l * 1.0) / ((abs(k) ^ 2.0) * (t * (t_1 ^ 2.0))))) * l;
        	else
        		tmp = 2.0 / (abs(k) * (abs(k) * ((t / (l * l)) * (tan(abs(k)) * t_1))));
        	end
        	tmp_2 = tmp;
        end
        
        code[t_, l_, k_] := Block[{t$95$1 = N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 2e-8], N[(N[(2.0 * N[(N[(l * 1.0), $MachinePrecision] / N[(N[Power[N[Abs[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision], N[(2.0 / N[(N[Abs[k], $MachinePrecision] * N[(N[Abs[k], $MachinePrecision] * N[(N[(t / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[N[Abs[k], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        t_1 := \sin \left(\left|k\right|\right)\\
        \mathbf{if}\;\left|k\right| \leq 2 \cdot 10^{-8}:\\
        \;\;\;\;\left(2 \cdot \frac{\ell \cdot 1}{{\left(\left|k\right|\right)}^{2} \cdot \left(t \cdot {t\_1}^{2}\right)}\right) \cdot \ell\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{2}{\left|k\right| \cdot \left(\left|k\right| \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\tan \left(\left|k\right|\right) \cdot t\_1\right)\right)\right)}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if k < 2e-8

          1. Initial program 35.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. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 2e-8 < k

            1. Initial program 35.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. 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}}} \]
            3. Step-by-step derivation
              1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{{\ell}^{2}} \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right)\right)} \]
              17. tan-quotN/A

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

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

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

              \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\tan k \cdot \sin k\right)\right)\right)}} \]
          9. Recombined 2 regimes into one program.
          10. Add Preprocessing

          Alternative 6: 72.1% accurate, 1.7× speedup?

          \[\begin{array}{l} \mathbf{if}\;\left|k\right| \leq 45:\\ \;\;\;\;\frac{\left(\cos \left(\left|k\right|\right) \cdot \ell\right) \cdot 2}{\left({\left(\left|k\right|\right)}^{3} \cdot t\right) \cdot \left|k\right|} \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \ell}{\left(\left(\left(0.5 - 0.5 \cdot \cos \left(\left|k\right| + \left|k\right|\right)\right) \cdot t\right) \cdot \left|k\right|\right) \cdot \left|k\right|} \cdot \ell\\ \end{array} \]
          (FPCore (t l k)
           :precision binary64
           (if (<= (fabs k) 45.0)
             (* (/ (* (* (cos (fabs k)) l) 2.0) (* (* (pow (fabs k) 3.0) t) (fabs k))) l)
             (*
              (/
               (* 2.0 l)
               (*
                (* (* (- 0.5 (* 0.5 (cos (+ (fabs k) (fabs k))))) t) (fabs k))
                (fabs k)))
              l)))
          double code(double t, double l, double k) {
          	double tmp;
          	if (fabs(k) <= 45.0) {
          		tmp = (((cos(fabs(k)) * l) * 2.0) / ((pow(fabs(k), 3.0) * t) * fabs(k))) * l;
          	} else {
          		tmp = ((2.0 * l) / ((((0.5 - (0.5 * cos((fabs(k) + fabs(k))))) * t) * fabs(k)) * fabs(k))) * l;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(t, l, k)
          use fmin_fmax_functions
              real(8), intent (in) :: t
              real(8), intent (in) :: l
              real(8), intent (in) :: k
              real(8) :: tmp
              if (abs(k) <= 45.0d0) then
                  tmp = (((cos(abs(k)) * l) * 2.0d0) / (((abs(k) ** 3.0d0) * t) * abs(k))) * l
              else
                  tmp = ((2.0d0 * l) / ((((0.5d0 - (0.5d0 * cos((abs(k) + abs(k))))) * t) * abs(k)) * abs(k))) * l
              end if
              code = tmp
          end function
          
          public static double code(double t, double l, double k) {
          	double tmp;
          	if (Math.abs(k) <= 45.0) {
          		tmp = (((Math.cos(Math.abs(k)) * l) * 2.0) / ((Math.pow(Math.abs(k), 3.0) * t) * Math.abs(k))) * l;
          	} else {
          		tmp = ((2.0 * l) / ((((0.5 - (0.5 * Math.cos((Math.abs(k) + Math.abs(k))))) * t) * Math.abs(k)) * Math.abs(k))) * l;
          	}
          	return tmp;
          }
          
          def code(t, l, k):
          	tmp = 0
          	if math.fabs(k) <= 45.0:
          		tmp = (((math.cos(math.fabs(k)) * l) * 2.0) / ((math.pow(math.fabs(k), 3.0) * t) * math.fabs(k))) * l
          	else:
          		tmp = ((2.0 * l) / ((((0.5 - (0.5 * math.cos((math.fabs(k) + math.fabs(k))))) * t) * math.fabs(k)) * math.fabs(k))) * l
          	return tmp
          
          function code(t, l, k)
          	tmp = 0.0
          	if (abs(k) <= 45.0)
          		tmp = Float64(Float64(Float64(Float64(cos(abs(k)) * l) * 2.0) / Float64(Float64((abs(k) ^ 3.0) * t) * abs(k))) * l);
          	else
          		tmp = Float64(Float64(Float64(2.0 * l) / Float64(Float64(Float64(Float64(0.5 - Float64(0.5 * cos(Float64(abs(k) + abs(k))))) * t) * abs(k)) * abs(k))) * l);
          	end
          	return tmp
          end
          
          function tmp_2 = code(t, l, k)
          	tmp = 0.0;
          	if (abs(k) <= 45.0)
          		tmp = (((cos(abs(k)) * l) * 2.0) / (((abs(k) ^ 3.0) * t) * abs(k))) * l;
          	else
          		tmp = ((2.0 * l) / ((((0.5 - (0.5 * cos((abs(k) + abs(k))))) * t) * abs(k)) * abs(k))) * l;
          	end
          	tmp_2 = tmp;
          end
          
          code[t_, l_, k_] := If[LessEqual[N[Abs[k], $MachinePrecision], 45.0], N[(N[(N[(N[(N[Cos[N[Abs[k], $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(N[Power[N[Abs[k], $MachinePrecision], 3.0], $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision], N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[(N[(N[(0.5 - N[(0.5 * N[Cos[N[(N[Abs[k], $MachinePrecision] + N[Abs[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]]
          
          \begin{array}{l}
          \mathbf{if}\;\left|k\right| \leq 45:\\
          \;\;\;\;\frac{\left(\cos \left(\left|k\right|\right) \cdot \ell\right) \cdot 2}{\left({\left(\left|k\right|\right)}^{3} \cdot t\right) \cdot \left|k\right|} \cdot \ell\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{2 \cdot \ell}{\left(\left(\left(0.5 - 0.5 \cdot \cos \left(\left|k\right| + \left|k\right|\right)\right) \cdot t\right) \cdot \left|k\right|\right) \cdot \left|k\right|} \cdot \ell\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if k < 45

            1. Initial program 35.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. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(\cos k \cdot \ell\right) \cdot 2}{\left({k}^{3} \cdot t\right) \cdot k} \cdot \ell \]
            10. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \frac{\left(\cos k \cdot \ell\right) \cdot 2}{\left({k}^{3} \cdot t\right) \cdot k} \cdot \ell \]
              2. lower-pow.f6471.0

                \[\leadsto \frac{\left(\cos k \cdot \ell\right) \cdot 2}{\left({k}^{3} \cdot t\right) \cdot k} \cdot \ell \]
            11. Applied rewrites71.0%

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

            if 45 < k

            1. Initial program 35.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. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{2 \cdot \ell}{\color{blue}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right)} \cdot k} \cdot \ell \]
            10. Step-by-step derivation
              1. lower-*.f6465.2

                \[\leadsto \frac{2 \cdot \ell}{\left(\left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot \color{blue}{k}\right) \cdot k} \cdot \ell \]
            11. Applied rewrites65.2%

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

          Alternative 7: 72.0% accurate, 1.5× speedup?

          \[\left(2 \cdot \frac{\ell \cdot 1}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}\right) \cdot \ell \]
          (FPCore (t l k)
           :precision binary64
           (* (* 2.0 (/ (* l 1.0) (* (pow k 2.0) (* t (pow (sin k) 2.0))))) l))
          double code(double t, double l, double k) {
          	return (2.0 * ((l * 1.0) / (pow(k, 2.0) * (t * pow(sin(k), 2.0))))) * l;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(t, l, k)
          use fmin_fmax_functions
              real(8), intent (in) :: t
              real(8), intent (in) :: l
              real(8), intent (in) :: k
              code = (2.0d0 * ((l * 1.0d0) / ((k ** 2.0d0) * (t * (sin(k) ** 2.0d0))))) * l
          end function
          
          public static double code(double t, double l, double k) {
          	return (2.0 * ((l * 1.0) / (Math.pow(k, 2.0) * (t * Math.pow(Math.sin(k), 2.0))))) * l;
          }
          
          def code(t, l, k):
          	return (2.0 * ((l * 1.0) / (math.pow(k, 2.0) * (t * math.pow(math.sin(k), 2.0))))) * l
          
          function code(t, l, k)
          	return Float64(Float64(2.0 * Float64(Float64(l * 1.0) / Float64((k ^ 2.0) * Float64(t * (sin(k) ^ 2.0))))) * l)
          end
          
          function tmp = code(t, l, k)
          	tmp = (2.0 * ((l * 1.0) / ((k ^ 2.0) * (t * (sin(k) ^ 2.0))))) * l;
          end
          
          code[t_, l_, k_] := N[(N[(2.0 * N[(N[(l * 1.0), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]
          
          \left(2 \cdot \frac{\ell \cdot 1}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}\right) \cdot \ell
          
          Derivation
          1. Initial program 35.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. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 71.6% accurate, 1.8× speedup?

            \[\begin{array}{l} \mathbf{if}\;\left|k\right| \leq 250:\\ \;\;\;\;\left(\frac{{\left(\left|k\right|\right)}^{-4} \cdot \ell}{t} \cdot \ell\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \ell}{\left(\left(\left(0.5 - 0.5 \cdot \cos \left(\left|k\right| + \left|k\right|\right)\right) \cdot t\right) \cdot \left|k\right|\right) \cdot \left|k\right|} \cdot \ell\\ \end{array} \]
            (FPCore (t l k)
             :precision binary64
             (if (<= (fabs k) 250.0)
               (* (* (/ (* (pow (fabs k) -4.0) l) t) l) 2.0)
               (*
                (/
                 (* 2.0 l)
                 (*
                  (* (* (- 0.5 (* 0.5 (cos (+ (fabs k) (fabs k))))) t) (fabs k))
                  (fabs k)))
                l)))
            double code(double t, double l, double k) {
            	double tmp;
            	if (fabs(k) <= 250.0) {
            		tmp = (((pow(fabs(k), -4.0) * l) / t) * l) * 2.0;
            	} else {
            		tmp = ((2.0 * l) / ((((0.5 - (0.5 * cos((fabs(k) + fabs(k))))) * t) * fabs(k)) * fabs(k))) * l;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(t, l, k)
            use fmin_fmax_functions
                real(8), intent (in) :: t
                real(8), intent (in) :: l
                real(8), intent (in) :: k
                real(8) :: tmp
                if (abs(k) <= 250.0d0) then
                    tmp = ((((abs(k) ** (-4.0d0)) * l) / t) * l) * 2.0d0
                else
                    tmp = ((2.0d0 * l) / ((((0.5d0 - (0.5d0 * cos((abs(k) + abs(k))))) * t) * abs(k)) * abs(k))) * l
                end if
                code = tmp
            end function
            
            public static double code(double t, double l, double k) {
            	double tmp;
            	if (Math.abs(k) <= 250.0) {
            		tmp = (((Math.pow(Math.abs(k), -4.0) * l) / t) * l) * 2.0;
            	} else {
            		tmp = ((2.0 * l) / ((((0.5 - (0.5 * Math.cos((Math.abs(k) + Math.abs(k))))) * t) * Math.abs(k)) * Math.abs(k))) * l;
            	}
            	return tmp;
            }
            
            def code(t, l, k):
            	tmp = 0
            	if math.fabs(k) <= 250.0:
            		tmp = (((math.pow(math.fabs(k), -4.0) * l) / t) * l) * 2.0
            	else:
            		tmp = ((2.0 * l) / ((((0.5 - (0.5 * math.cos((math.fabs(k) + math.fabs(k))))) * t) * math.fabs(k)) * math.fabs(k))) * l
            	return tmp
            
            function code(t, l, k)
            	tmp = 0.0
            	if (abs(k) <= 250.0)
            		tmp = Float64(Float64(Float64(Float64((abs(k) ^ -4.0) * l) / t) * l) * 2.0);
            	else
            		tmp = Float64(Float64(Float64(2.0 * l) / Float64(Float64(Float64(Float64(0.5 - Float64(0.5 * cos(Float64(abs(k) + abs(k))))) * t) * abs(k)) * abs(k))) * l);
            	end
            	return tmp
            end
            
            function tmp_2 = code(t, l, k)
            	tmp = 0.0;
            	if (abs(k) <= 250.0)
            		tmp = ((((abs(k) ^ -4.0) * l) / t) * l) * 2.0;
            	else
            		tmp = ((2.0 * l) / ((((0.5 - (0.5 * cos((abs(k) + abs(k))))) * t) * abs(k)) * abs(k))) * l;
            	end
            	tmp_2 = tmp;
            end
            
            code[t_, l_, k_] := If[LessEqual[N[Abs[k], $MachinePrecision], 250.0], N[(N[(N[(N[(N[Power[N[Abs[k], $MachinePrecision], -4.0], $MachinePrecision] * l), $MachinePrecision] / t), $MachinePrecision] * l), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(N[(2.0 * l), $MachinePrecision] / N[(N[(N[(N[(0.5 - N[(0.5 * N[Cos[N[(N[Abs[k], $MachinePrecision] + N[Abs[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]]
            
            \begin{array}{l}
            \mathbf{if}\;\left|k\right| \leq 250:\\
            \;\;\;\;\left(\frac{{\left(\left|k\right|\right)}^{-4} \cdot \ell}{t} \cdot \ell\right) \cdot 2\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{2 \cdot \ell}{\left(\left(\left(0.5 - 0.5 \cdot \cos \left(\left|k\right| + \left|k\right|\right)\right) \cdot t\right) \cdot \left|k\right|\right) \cdot \left|k\right|} \cdot \ell\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if k < 250

              1. Initial program 35.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. Taylor expanded in k around 0

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

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

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

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

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

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
              4. Applied rewrites62.7%

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

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

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

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

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

                  \[\leadsto {\ell}^{2} \cdot \frac{1}{{k}^{4} \cdot t} + \frac{{\ell}^{2}}{\color{blue}{{k}^{4} \cdot t}} \]
                6. mult-flipN/A

                  \[\leadsto {\ell}^{2} \cdot \frac{1}{{k}^{4} \cdot t} + {\ell}^{2} \cdot \color{blue}{\frac{1}{{k}^{4} \cdot t}} \]
                7. distribute-rgt-outN/A

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

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

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

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

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

                  \[\leadsto \frac{\frac{1}{{k}^{4}}}{t} \cdot \left(\color{blue}{2} \cdot {\ell}^{2}\right) \]
                13. lift-pow.f64N/A

                  \[\leadsto \frac{\frac{1}{{k}^{4}}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                14. pow-flipN/A

                  \[\leadsto \frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                15. lower-pow.f64N/A

                  \[\leadsto \frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                16. metadata-evalN/A

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

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left({\ell}^{2} \cdot \color{blue}{2}\right) \]
                18. lower-*.f6462.6

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

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left({\ell}^{2} \cdot 2\right) \]
                20. pow2N/A

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right) \]
                21. lift-*.f6462.6

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right) \]
              6. Applied rewrites62.6%

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
                8. lower-*.f6468.6

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
              8. Applied rewrites68.6%

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

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
                2. lift-/.f64N/A

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

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

                  \[\leadsto \left(\frac{{k}^{-4} \cdot \ell}{t} \cdot \ell\right) \cdot 2 \]
                5. lower-*.f6469.3

                  \[\leadsto \left(\frac{{k}^{-4} \cdot \ell}{t} \cdot \ell\right) \cdot 2 \]
              10. Applied rewrites69.3%

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

              if 250 < k

              1. Initial program 35.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. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2 \cdot \ell}{\color{blue}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right)} \cdot k} \cdot \ell \]
              10. Step-by-step derivation
                1. lower-*.f6465.2

                  \[\leadsto \frac{2 \cdot \ell}{\left(\left(\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot \color{blue}{k}\right) \cdot k} \cdot \ell \]
              11. Applied rewrites65.2%

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

            Alternative 9: 71.4% accurate, 2.0× speedup?

            \[\begin{array}{l} \mathbf{if}\;\left|\ell\right| \leq 2.6 \cdot 10^{+172}:\\ \;\;\;\;\left(\frac{{k}^{-4} \cdot \left|\ell\right|}{t} \cdot \left|\ell\right|\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(\cos k \cdot \left|\ell\right|\right) \cdot 2}{\left(\left(\left(0.5 - 0.5\right) \cdot t\right) \cdot k\right) \cdot k} \cdot \left|\ell\right|\\ \end{array} \]
            (FPCore (t l k)
             :precision binary64
             (if (<= (fabs l) 2.6e+172)
               (* (* (/ (* (pow k -4.0) (fabs l)) t) (fabs l)) 2.0)
               (*
                (/ (* (* (cos k) (fabs l)) 2.0) (* (* (* (- 0.5 0.5) t) k) k))
                (fabs l))))
            double code(double t, double l, double k) {
            	double tmp;
            	if (fabs(l) <= 2.6e+172) {
            		tmp = (((pow(k, -4.0) * fabs(l)) / t) * fabs(l)) * 2.0;
            	} else {
            		tmp = (((cos(k) * fabs(l)) * 2.0) / ((((0.5 - 0.5) * t) * k) * k)) * fabs(l);
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(t, l, k)
            use fmin_fmax_functions
                real(8), intent (in) :: t
                real(8), intent (in) :: l
                real(8), intent (in) :: k
                real(8) :: tmp
                if (abs(l) <= 2.6d+172) then
                    tmp = ((((k ** (-4.0d0)) * abs(l)) / t) * abs(l)) * 2.0d0
                else
                    tmp = (((cos(k) * abs(l)) * 2.0d0) / ((((0.5d0 - 0.5d0) * t) * k) * k)) * abs(l)
                end if
                code = tmp
            end function
            
            public static double code(double t, double l, double k) {
            	double tmp;
            	if (Math.abs(l) <= 2.6e+172) {
            		tmp = (((Math.pow(k, -4.0) * Math.abs(l)) / t) * Math.abs(l)) * 2.0;
            	} else {
            		tmp = (((Math.cos(k) * Math.abs(l)) * 2.0) / ((((0.5 - 0.5) * t) * k) * k)) * Math.abs(l);
            	}
            	return tmp;
            }
            
            def code(t, l, k):
            	tmp = 0
            	if math.fabs(l) <= 2.6e+172:
            		tmp = (((math.pow(k, -4.0) * math.fabs(l)) / t) * math.fabs(l)) * 2.0
            	else:
            		tmp = (((math.cos(k) * math.fabs(l)) * 2.0) / ((((0.5 - 0.5) * t) * k) * k)) * math.fabs(l)
            	return tmp
            
            function code(t, l, k)
            	tmp = 0.0
            	if (abs(l) <= 2.6e+172)
            		tmp = Float64(Float64(Float64(Float64((k ^ -4.0) * abs(l)) / t) * abs(l)) * 2.0);
            	else
            		tmp = Float64(Float64(Float64(Float64(cos(k) * abs(l)) * 2.0) / Float64(Float64(Float64(Float64(0.5 - 0.5) * t) * k) * k)) * abs(l));
            	end
            	return tmp
            end
            
            function tmp_2 = code(t, l, k)
            	tmp = 0.0;
            	if (abs(l) <= 2.6e+172)
            		tmp = ((((k ^ -4.0) * abs(l)) / t) * abs(l)) * 2.0;
            	else
            		tmp = (((cos(k) * abs(l)) * 2.0) / ((((0.5 - 0.5) * t) * k) * k)) * abs(l);
            	end
            	tmp_2 = tmp;
            end
            
            code[t_, l_, k_] := If[LessEqual[N[Abs[l], $MachinePrecision], 2.6e+172], N[(N[(N[(N[(N[Power[k, -4.0], $MachinePrecision] * N[Abs[l], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[Abs[l], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], N[(N[(N[(N[(N[Cos[k], $MachinePrecision] * N[Abs[l], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(N[(N[(0.5 - 0.5), $MachinePrecision] * t), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[Abs[l], $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            \mathbf{if}\;\left|\ell\right| \leq 2.6 \cdot 10^{+172}:\\
            \;\;\;\;\left(\frac{{k}^{-4} \cdot \left|\ell\right|}{t} \cdot \left|\ell\right|\right) \cdot 2\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\left(\cos k \cdot \left|\ell\right|\right) \cdot 2}{\left(\left(\left(0.5 - 0.5\right) \cdot t\right) \cdot k\right) \cdot k} \cdot \left|\ell\right|\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if l < 2.6e172

              1. Initial program 35.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. Taylor expanded in k around 0

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

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

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

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

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

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
              4. Applied rewrites62.7%

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

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

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

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

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

                  \[\leadsto {\ell}^{2} \cdot \frac{1}{{k}^{4} \cdot t} + \frac{{\ell}^{2}}{\color{blue}{{k}^{4} \cdot t}} \]
                6. mult-flipN/A

                  \[\leadsto {\ell}^{2} \cdot \frac{1}{{k}^{4} \cdot t} + {\ell}^{2} \cdot \color{blue}{\frac{1}{{k}^{4} \cdot t}} \]
                7. distribute-rgt-outN/A

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

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

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

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

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

                  \[\leadsto \frac{\frac{1}{{k}^{4}}}{t} \cdot \left(\color{blue}{2} \cdot {\ell}^{2}\right) \]
                13. lift-pow.f64N/A

                  \[\leadsto \frac{\frac{1}{{k}^{4}}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                14. pow-flipN/A

                  \[\leadsto \frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                15. lower-pow.f64N/A

                  \[\leadsto \frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                16. metadata-evalN/A

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

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left({\ell}^{2} \cdot \color{blue}{2}\right) \]
                18. lower-*.f6462.6

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

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left({\ell}^{2} \cdot 2\right) \]
                20. pow2N/A

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right) \]
                21. lift-*.f6462.6

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right) \]
              6. Applied rewrites62.6%

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
                8. lower-*.f6468.6

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
              8. Applied rewrites68.6%

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

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
                2. lift-/.f64N/A

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

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

                  \[\leadsto \left(\frac{{k}^{-4} \cdot \ell}{t} \cdot \ell\right) \cdot 2 \]
                5. lower-*.f6469.3

                  \[\leadsto \left(\frac{{k}^{-4} \cdot \ell}{t} \cdot \ell\right) \cdot 2 \]
              10. Applied rewrites69.3%

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

              if 2.6e172 < l

              1. Initial program 35.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. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 10: 69.3% accurate, 4.4× speedup?

              \[\left(\frac{{k}^{-4} \cdot \ell}{t} \cdot \ell\right) \cdot 2 \]
              (FPCore (t l k) :precision binary64 (* (* (/ (* (pow k -4.0) l) t) l) 2.0))
              double code(double t, double l, double k) {
              	return (((pow(k, -4.0) * l) / t) * l) * 2.0;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  code = ((((k ** (-4.0d0)) * l) / t) * l) * 2.0d0
              end function
              
              public static double code(double t, double l, double k) {
              	return (((Math.pow(k, -4.0) * l) / t) * l) * 2.0;
              }
              
              def code(t, l, k):
              	return (((math.pow(k, -4.0) * l) / t) * l) * 2.0
              
              function code(t, l, k)
              	return Float64(Float64(Float64(Float64((k ^ -4.0) * l) / t) * l) * 2.0)
              end
              
              function tmp = code(t, l, k)
              	tmp = ((((k ^ -4.0) * l) / t) * l) * 2.0;
              end
              
              code[t_, l_, k_] := N[(N[(N[(N[(N[Power[k, -4.0], $MachinePrecision] * l), $MachinePrecision] / t), $MachinePrecision] * l), $MachinePrecision] * 2.0), $MachinePrecision]
              
              \left(\frac{{k}^{-4} \cdot \ell}{t} \cdot \ell\right) \cdot 2
              
              Derivation
              1. Initial program 35.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. Taylor expanded in k around 0

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

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

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

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

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

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
              4. Applied rewrites62.7%

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

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

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

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

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

                  \[\leadsto {\ell}^{2} \cdot \frac{1}{{k}^{4} \cdot t} + \frac{{\ell}^{2}}{\color{blue}{{k}^{4} \cdot t}} \]
                6. mult-flipN/A

                  \[\leadsto {\ell}^{2} \cdot \frac{1}{{k}^{4} \cdot t} + {\ell}^{2} \cdot \color{blue}{\frac{1}{{k}^{4} \cdot t}} \]
                7. distribute-rgt-outN/A

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

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

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

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

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

                  \[\leadsto \frac{\frac{1}{{k}^{4}}}{t} \cdot \left(\color{blue}{2} \cdot {\ell}^{2}\right) \]
                13. lift-pow.f64N/A

                  \[\leadsto \frac{\frac{1}{{k}^{4}}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                14. pow-flipN/A

                  \[\leadsto \frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                15. lower-pow.f64N/A

                  \[\leadsto \frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                16. metadata-evalN/A

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

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left({\ell}^{2} \cdot \color{blue}{2}\right) \]
                18. lower-*.f6462.6

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

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left({\ell}^{2} \cdot 2\right) \]
                20. pow2N/A

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right) \]
                21. lift-*.f6462.6

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right) \]
              6. Applied rewrites62.6%

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
                8. lower-*.f6468.6

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
              8. Applied rewrites68.6%

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

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
                2. lift-/.f64N/A

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

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

                  \[\leadsto \left(\frac{{k}^{-4} \cdot \ell}{t} \cdot \ell\right) \cdot 2 \]
                5. lower-*.f6469.3

                  \[\leadsto \left(\frac{{k}^{-4} \cdot \ell}{t} \cdot \ell\right) \cdot 2 \]
              10. Applied rewrites69.3%

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

              Alternative 11: 68.8% accurate, 4.4× speedup?

              \[\left(\frac{\ell}{{k}^{4} \cdot t} \cdot \ell\right) \cdot 2 \]
              (FPCore (t l k) :precision binary64 (* (* (/ l (* (pow k 4.0) t)) l) 2.0))
              double code(double t, double l, double k) {
              	return ((l / (pow(k, 4.0) * t)) * l) * 2.0;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  code = ((l / ((k ** 4.0d0) * t)) * l) * 2.0d0
              end function
              
              public static double code(double t, double l, double k) {
              	return ((l / (Math.pow(k, 4.0) * t)) * l) * 2.0;
              }
              
              def code(t, l, k):
              	return ((l / (math.pow(k, 4.0) * t)) * l) * 2.0
              
              function code(t, l, k)
              	return Float64(Float64(Float64(l / Float64((k ^ 4.0) * t)) * l) * 2.0)
              end
              
              function tmp = code(t, l, k)
              	tmp = ((l / ((k ^ 4.0) * t)) * l) * 2.0;
              end
              
              code[t_, l_, k_] := N[(N[(N[(l / N[(N[Power[k, 4.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] * 2.0), $MachinePrecision]
              
              \left(\frac{\ell}{{k}^{4} \cdot t} \cdot \ell\right) \cdot 2
              
              Derivation
              1. Initial program 35.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. Taylor expanded in k around 0

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

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

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

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

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

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
              4. Applied rewrites62.7%

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

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

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

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

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

                  \[\leadsto {\ell}^{2} \cdot \frac{1}{{k}^{4} \cdot t} + \frac{{\ell}^{2}}{\color{blue}{{k}^{4} \cdot t}} \]
                6. mult-flipN/A

                  \[\leadsto {\ell}^{2} \cdot \frac{1}{{k}^{4} \cdot t} + {\ell}^{2} \cdot \color{blue}{\frac{1}{{k}^{4} \cdot t}} \]
                7. distribute-rgt-outN/A

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

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

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

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

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

                  \[\leadsto \frac{\frac{1}{{k}^{4}}}{t} \cdot \left(\color{blue}{2} \cdot {\ell}^{2}\right) \]
                13. lift-pow.f64N/A

                  \[\leadsto \frac{\frac{1}{{k}^{4}}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                14. pow-flipN/A

                  \[\leadsto \frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                15. lower-pow.f64N/A

                  \[\leadsto \frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(2 \cdot {\ell}^{2}\right) \]
                16. metadata-evalN/A

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

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left({\ell}^{2} \cdot \color{blue}{2}\right) \]
                18. lower-*.f6462.6

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

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left({\ell}^{2} \cdot 2\right) \]
                20. pow2N/A

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right) \]
                21. lift-*.f6462.6

                  \[\leadsto \frac{{k}^{-4}}{t} \cdot \left(\left(\ell \cdot \ell\right) \cdot 2\right) \]
              6. Applied rewrites62.6%

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
                8. lower-*.f6468.6

                  \[\leadsto \left(\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \ell\right) \cdot 2 \]
              8. Applied rewrites68.6%

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

                \[\leadsto \left(\frac{\ell}{{k}^{4} \cdot t} \cdot \ell\right) \cdot 2 \]
              10. Step-by-step derivation
                1. lower-/.f64N/A

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

                  \[\leadsto \left(\frac{\ell}{{k}^{4} \cdot t} \cdot \ell\right) \cdot 2 \]
                3. lower-pow.f6468.8

                  \[\leadsto \left(\frac{\ell}{{k}^{4} \cdot t} \cdot \ell\right) \cdot 2 \]
              11. Applied rewrites68.8%

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

              Reproduce

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